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.
Build 200503301800 For a java class file there is a subnode that apparently represents the class within a source file. For example, beneath "Main.java [Current]" there is "Main" subnode. The popup menu for this subnode contains "Add|{Field...|Constructor...|Method...|...}" items, which are enabled while the class file is in [Current] state. When a user tries to call the commands corresponding to those menu items, IDE opens the appropriate dialogs so user may fill them out, but pressing OK in those dialogs leads only to checking out the class file and doesn't add proposed fields, methods, etc to the class. Such a behavior may disappoint user as he/she provides some information in the dialog and then loses that information. It would make sense to disable "Add" menu on a checked in class as it's done for "Fields", "Constructors", ... subnodes.
This is a Java issue.
Emane, can you reproduce it? Personally I don't undersatand what this issue is about.
There is no problem when adding class elements to non-version-controlled class file, so I suppose it's related probably to file checked out as _readonly_ from some VCS system? Reporter, please provide details about those VCS operations and whether those classes were readonly. Thanks.
Yes, the issue conserns exclusively real-only workfiles and arises with VCS's like VSS and PVCS. These VCS's keep workfiles read-only until they are checked out by user.
Again, this is managed in java. When the file is read-only, there is a call to VCS to make it writable (during FileObject.lock()). The subsequent changes of the file content are made in Java module.
"Add" menu items were removed. This issue is no more valid.