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 172324

Summary: No apparent way to add annotations to package-info.java
Product: java Reporter: Jesse Glick <jglick>
Component: SourceAssignee: Jan Lahoda <jlahoda>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 171284    

Description Jesse Glick 2009-09-15 20:34:47 UTC
Perhaps I'm missing something, but TreeMaker seems a lack of way of adding annotations to a package-info.java file.

There is addModifiersAnnotation, but I don't suppose there are any ModifiersTree's in a package file.

CompilationUnitTree.getPackageAnnotations() looks like the read method corresponding to the desired write method.
Comment 1 Jesse Glick 2009-09-15 20:39:01 UTC
Needed for apisupport.project's CreatedModifiedFilesFactory.PackageInfo in case you create a new Options Panel and check
Allow Secondary Panels when using 6.8+ as the platform.
Comment 2 Jan Lahoda 2009-09-15 22:32:02 UTC
Yes, this is truly not possible now.

*** This issue has been marked as a duplicate of 157760 ***
Comment 3 Quality Engineering 2009-09-18 22:19:52 UTC
Integrated into 'main-golden', will be available in build *200909181401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6c08609a8a8b
User: Jesse Glick <jglick@netbeans.org>
Log: Development-time support for #171284: annotations for options panels.
Incomplete support for @ContainerRegistration pending #172324.