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 44812 - Remove Add|Enumeration/Annotation Type if source level < 1.5
Summary: Remove Add|Enumeration/Annotation Type if source level < 1.5
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-14 10:14 UTC by Marek Grummich
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception (5.64 KB, text/plain)
2004-06-14 10:14 UTC, Marek Grummich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Grummich 2004-06-14 10:14:04 UTC
Build 20040613; j2sdk1.4.2 !!!
Steps:
- select java file node in the Project view
- invoke Add | Enumeration ...
- fill items in the Enumeration dialog and confirm it
=> attached exception is thrown

- invoke Add | Enumeration ...
- fill items in the Enumeration dialog and confirm it
- a new enumeration is added
- double click on the enumeration node
=> attached exception is thrown
Comment 1 Marek Grummich 2004-06-14 10:14:31 UTC
Created attachment 15674 [details]
Exception
Comment 2 Jan Pokorsky 2004-06-16 15:11:19 UTC
re: Add | Enumeration menu item is presented on j2sdk1.4.2
Presence of the menu item is intentional. We agreed with HIE on this.
Comment 3 Martin Matula 2004-06-16 18:06:01 UTC
The exception is not thrown anymore, but the enum is not added since
it should be forbidden for source level 1.4 - it is impossible to add
enums via the JMI API when the source level is set to 1.4. This is
intentional, since enabling it would require a lot of additional
handling which at this point we want to avoid. I talked to Honza about
this and the conclusion was that Add Enumeration... and Add Annotation
Type... menu items will not be available if the source level is < 1.5.
Reassigning to Honza to implement the menu items disabling/removal.
Comment 4 Martin Matula 2004-06-16 18:06:50 UTC
Lowering priority since the exception is no longer thrown, and the
code is not corrupted. Just the enum is not added.
Comment 5 Tomas Hurka 2004-06-22 08:41:19 UTC
Moved to new subcomponent java/javacore.
Comment 6 Jan Pokorsky 2004-06-22 16:45:04 UTC
fixed in

/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/ClassNode.java,v
 <--  ClassNode.java
new revision: 1.6; previous revision: 1.5
/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/SourceEditSupport.java,v
 <--  SourceEditSupport.java
new revision: 1.6; previous revision: 1.5
Comment 7 Marek Grummich 2004-07-15 12:54:29 UTC
Verified