This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179543 - UnsupportedOperationException: XXX #172324: do not know how to attach @org.netbeans.spi.options.OptionsPanelController.ContainerRegistration(id = "AWS", categoryName = "#OptionsCategory_Name_AWS", ico
Summary: UnsupportedOperationException: XXX #172324: do not know how to attach @org.ne...
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on: 157760
Blocks:
  Show dependency tree
 
Reported: 2010-01-15 06:32 UTC by Exceptions Reporter
Modified: 2010-09-29 03:10 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 164149


Attachments
stacktrace (2.72 KB, text/plain)
2010-01-15 06:32 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2010-01-15 06:32:50 UTC
Build: NetBeans IDE 6.8 (Build 200912041610)
VM: OpenJDK 64-Bit Server VM, 14.0-b16, OpenJDK Runtime Environment, 1.6.0_0-b16
OS: Linux, 2.6.31.9-174.fc12.x86_64, amd64

User Comments:
Rokko: I was tryng to add a PrimaryOptionPanel allowing secondary panels. When I click the Finish button, the exception in summary arises.
In order to get a PrimaryOptionPanel, I am forced to create a PrimaryOptionPanel with "Allows Secondary Panel" set to FALSE.

dbeer: Trying to add  a new options panel. 

1. Create a new options panel with secondary panels selected as an option
2. Fill in info and click Finish



Stacktrace: 
java.lang.UnsupportedOperationException: XXX #172324: do not know how to attach @org.netbeans.spi.options.OptionsPanelController.ContainerRegistration(id = "AWS", categoryName = "#OptionsCategory_Name_AWS", iconBase = "awsadministrator/awscredentials/preferences-desktop1.png", keywords = "#OptionsCategory_Keywords_AWS", keywordsCategory = "AWS") to package awsadministrator.awscredentials.ui;

   at org.netbeans.modules.apisupport.project.CreatedModifiedFilesFactory$PackageInfo$1$1.run(CreatedModifiedFilesFactory.java:851)
   at org.netbeans.modules.apisupport.project.CreatedModifiedFilesFactory$PackageInfo$1$1.run(CreatedModifiedFilesFactory.java:834)
   at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:653)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)
   at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:190)
Comment 1 Exceptions Reporter 2010-01-15 06:32:55 UTC
Created attachment 93316 [details]
stacktrace
Comment 2 Jesse Glick 2010-01-15 09:12:15 UTC
For now you have to create a package-info.java and manually add that annotation. Awaiting the API to fix this.
Comment 3 David.m Beer 2010-01-15 10:20:12 UTC
(In reply to comment #2)
> For now you have to create a package-info.java and manually add that
> annotation. Awaiting the API to fix this.

Do you mean like @org.netbeans.spi.options.OptionsPanelController.ContainerRegistration(..); in package-info.java

under the package where I wish to add the options panel
Comment 4 Jesse Glick 2010-01-15 11:05:33 UTC
(In reply to comment #3)
> Do you mean like
> @org.netbeans.spi.options.OptionsPanelController.ContainerRegistration(..); in
> package-info.java
> 
> under the package where I wish to add the options panel

Exactly. I hope to get this fixed soon one way or the other. I did not expect a lot of people to be using container-only registrations (there are only a handful in the whole NB source base), otherwise I would have gotten to this sooner.
Comment 5 David.m Beer 2010-01-15 11:19:30 UTC
If I add the following to package-info.java @org.netbeans.spi.options.OptionsPanelController.ContainerRegistration(id = "AWS", categoryName = "#OptionsCategory_Name_AWS", iconBase ="awsadministrator/awscredentials/preferences-desktop1.png", keywords ="#OptionsCategory_Keywords_AWS", keywordsCategory = "AWS"); 

I get the following error. "class, interface or enum expected"

I only have a packaged declared there.

I am trying to add and a new section to the options panel which will be like the miscalleanous panel where I can add more panels if needed. 

is this the best way to do it.
Comment 6 Jesse Glick 2010-01-15 11:24:39 UTC
(In reply to comment #5)
> If I add the following to package-info.java
> @ContainerRegistration(...); 
> 
> I get the following error. "class, interface or enum expected"
> 
> I only have a packaged declared there.

I'm not sure what the semicolon is there for. Your file should look like

@CR(...)
package whatever.package;
import ....;

> I am trying to add a new section to the options panel which will be like
> the miscellaneous panel where I can add more panels if needed. 
> 
> is this the best way to do it.

Yes.
Comment 7 David.m Beer 2010-01-15 11:33:39 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > If I add the following to package-info.java
> > @ContainerRegistration(...); 
> > 
> > I get the following error. "class, interface or enum expected"
> > 
> > I only have a packaged declared there.
> 
> I'm not sure what the semicolon is there for. Your file should look like
> 
> @CR(...)
> package whatever.package;
> import ....;
Thanks that was my error.
> 
> > I am trying to add a new section to the options panel which will be like
> > the miscellaneous panel where I can add more panels if needed. 
> > 
> > is this the best way to do it.
> 
> Yes.
Great.
Comment 8 Exceptions Reporter 2010-02-08 09:49:06 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=164149
Comment 9 Jesse Glick 2010-03-09 19:23:42 UTC
Writing out package-info.java manually for now: core-main #73f4d6b234a5
Comment 10 Quality Engineering 2010-03-10 23:09:41 UTC
Integrated into 'main-golden', will be available in build *201003110200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/73f4d6b234a5
User: Jesse Glick <jglick@netbeans.org>
Log: #179543: quick fix to create package-info.java.
Comment 11 Quality Engineering 2010-09-29 03:10:45 UTC
Integrated into 'main-golden', will be available in build *201009290000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/28bf1d99d434
User: Jesse Glick <jglick@netbeans.org>
Log: #179543 revisited: use proper API from #157760 to create/modify package-info.java.