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 20133

Summary: add "context-sensitive new" to file menu
Product: platform Reporter: Jan Benway <benway>
Component: Window SystemAssignee: _ tboudreau <tboudreau>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jan Benway 2002-02-04 18:56:32 UTC
This enhancement is intended to capture a discussion from the nbui alias. The
discussion begins here:

http://www.netbeans.org/servlets/ReadMsg?msgId=244387&listName=nbui

The basic problem is that making File|New context sensitive can lead to
confusion for users who do not expect it to be so, and attempt to create a new
file when their current selection would lead to creating a new X, where X is not
a file.

The recommended changes are:

Change the name of File|New... to File|New File...

Remove the Control-N shortcut from File|New File...

Make File|New File... always bring up the New From Template wizard (remove its
context sensitivity, except with respect to using the currently selected
package, if any, as the default target location).

Add a new command to the file menu which is context sensitive in action and in
name. Add the Control-N shortcut to this item.

So, sometimes the menu would look like this:

File
	New File...
	New Executor... Ctrl-N

and sometimes like this:

File
	New File...
	New Breakpoint... Ctrl-N

and sometimes like this (current selection is a package in explorer):

File
	New File...
	New File... Ctrl-N
Comment 1 iformanek 2002-03-11 17:03:54 UTC
I propose two changes to the proposal:

1. Use Control-N shortcut for the context insensitive "New File..."
instead of the context sensitive New.

I see 2 reasons:
- Creating New File is much more common in the IDE
- Context insensitive shortcut is generally more intuitive (i.e. the
meaning is clear regardless of the context)

2. Do not Allow 
File
	New File...
	New File... Ctrl-N


In this case there should really be only one command 
"New File... Ctrl-N"
Comment 2 Jan Benway 2002-03-11 17:32:53 UTC
As to where the mnemonic goes, here is the part of the discussion
where we decided that the mnemonic goes on the context-sensitive one:

http://www.netbeans.org/servlets/ReadMsg?msgId=245359&listName=nbui

The basic rational is that a user could select a node such as
"Methods" (so is very much in context) and hit control-N to create a
new Method. This is really quick and easy, as opposed to having to
right-click the item.

I can see both pros and cons to this approach, but I just wanted to
point out the reasoning.


As for allowing duplicate items, again there are pros and cons.

Pros for showing duplicate items:

-- Keeps the menu the same length all the time. If we only show 1 menu
item in some cases and 2 items in others, the File menu will change in
length, which can be disorienting.
-- Helps reinforce the user model of the two New items.

Cons for showing duplicate items:

-- Looks dumb
-- May be disorienting until the user model becomes clear to the user.
Comment 3 Marek Grummich 2002-07-22 11:25:02 UTC
Set target milestone to TBD
Comment 4 Marek Grummich 2002-07-22 11:27:46 UTC
Set target milestone to TBD
Comment 5 David Simonek 2002-07-30 10:32:18 UTC
I would suggest to disable (=make grayed) menu item without shortcut
in "duplicate" situation, so menu looks like below:
<grayed>New File...</grayed>
        New File... Ctrl-N
Comment 6 Marian Mirilovic 2002-12-06 17:57:23 UTC
reassigne to Marek, new owner of ui subcomponents
Comment 7 mslama 2004-04-19 15:04:13 UTC
Assigning to Tim
Comment 8 Milos Kleint 2004-10-12 15:12:04 UTC
this issue looks outdated to me.
The current New File... has always the stortcut and is project based.
closing as wontfix, please reopen if yu disagree.