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 57307 - VCS: Enabled Add menu subitems do not work for checked in class
Summary: VCS: Enabled Add menu subitems do not work for checked in class
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-01 10:46 UTC by Andrei Chistiakov
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2005-04-01 10:46:00 UTC
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.
Comment 1 Martin Entlicher 2005-04-01 12:27:39 UTC
This is a Java issue.
Comment 2 Jan Becicka 2005-04-01 12:57:23 UTC
Emane, can you reproduce it? Personally I don't undersatand what this issue is
about.
Comment 3 Milan Kubec 2005-08-09 10:24:32 UTC
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.
Comment 4 Andrei Chistiakov 2005-08-09 10:49:05 UTC
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.
Comment 5 Martin Entlicher 2005-12-09 18:20:26 UTC
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.
Comment 6 Jan Becicka 2007-09-11 09:24:27 UTC
"Add" menu items were removed. This issue is no more valid.