Bug 123450 - Make editor menus consistent cross different file types
Make editor menus consistent cross different file types
Status: NEW
Product: ide
Classification: Unclassified
Component: UI
6.x
All All
: P3 (vote)
: TBD
Assigned To: issues@ide
issues@ide
issue_reviewed
: PLAN, UI
Depends on: 138358 138360 138364
Blocks: 133913
  Show dependency treegraph
 
Reported: 2007-12-05 12:28 UTC by jrojcek
Modified: 2011-01-28 08:53 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jrojcek 2007-12-05 12:28:53 UTC
Problem description and solution:

Contextual menus cross different file types are inconsistent. For NetBeans 6.0 we created a UI spec to improve consistency, but we didn't implement it. The spec:
http://wiki.netbeans.org/wiki/view/EditorContextualMenus

---

Note that even though I'm filing this issue as part of the 6.1 planning, the real intention is to address this issue either in 6.1 or in one of the upcoming releases.
Comment 1 Jan Becicka 2008-05-21 09:51:18 UTC
Please review the spec and fix things related to java and reassign to "next" language. Thanks


Comment 2 Jan Becicka 2008-05-26 15:06:19 UTC
Milo, please take a look at it. Thanks.
Comment 3 Miloslav Metelka 2008-06-05 23:12:59 UTC
The java context menu should mostly adhere to the spec except the first separator being above Find Usages at the top and
two extra items "Fix Imports" and "Select In" submenu. There is "Goto Test" in Navigate submenu. More refactorings.
"Insert Code ..." followed by a popup instead of "Insert" submenu. Jano/Ondro could you pls look at a recent dev build
and confirm whether it requires further changes? Thanks.
Comment 4 jrojcek 2008-06-09 16:52:38 UTC
I've updated the spec with the Goto Test and Fix Imports actions and Select In menu. I also replaced the Insert submenu with the Insert Code... action.

Here's the list of remaining items that should be fixed in implementation:

1. The very first separator should be _below_ the Find Usages action
2. The order of Insert, Fix Imports and remaining actions in the second section of the menu should be fixed.
3. The Reverse Engineer action should be removed from the submenu. I expect there's a better way of updating the model than manual refresh from contextual menu. 
If it's not the case, we need to discuss it.
4. The Run and Debug actions should _not_ show the file name when they are enabled.
5. The EJB Methods item should be moved inside the Insert Code menu.
6. The Enterprise Resources items should be moved into the Insert Code menu.
7. The Web Service Client Resources should be moved into the Insert Code menu.

I'm not sure who should fix those issues.
Comment 5 Jan Becicka 2008-06-09 18:17:10 UTC
Milo, please fix issues related to Java & Editor and pass this issue to next module. Thanks
Comment 6 Miloslav Metelka 2008-06-13 17:10:27 UTC
Fixed 1. and 2.

changeset:   84163:90c89c64a54a
tag:         tip
user:        Miloslav Metelka <mmetelka@netbeans.org>
date:        Fri Jun 13 17:38:51 2008 +0200
summary:     #123450 - Make editor menus consistent cross different file types - items 1. and 2.

I have attempted to fix 4. by changing "LBL_RunSingleAction_Name" in org.netbeans.modules.project.ui.actions.Bundle to
LBL_RunSingleAction_Name=&Run File
Although it works for editor's context menu it also changes main menu from Run->Run File->Run "XY.java" to Run->Run
File->Run File. I assume we would rather like to retain the original look in this case, right?
So I pass to projects since the solution there will possibly be more complex.

BTW the UI spec contains "Profiling >". Although it's not among the items from Jano I guess it should be implemented too.
Comment 7 jrojcek 2008-06-16 15:54:23 UTC
Milo, also the separator below the Navigate submenu item should be removed. Thanks!
Comment 8 jrojcek 2008-06-23 11:49:47 UTC
Regarding the Run File action, it doesn't need to show the file name in main menu.
Comment 9 Jan Becicka 2008-11-06 14:14:19 UTC
Let's fix it for 7.0
Comment 10 Milan Kubec 2008-11-12 13:10:32 UTC
Milo, 1. and 2. doesn't seem to be fixed. Please take a look. Thanks.
Comment 11 Miloslav Metelka 2008-11-12 17:03:17 UTC
Caused by mobility's layer.xml - should now be fixed.
I have also reordered text in java.editor's layer.xml to correspond to increasing position ids (no change in fact).
http://hg.netbeans.org/main/rev/7d75cc2ce975

So editor's part should now be fixed.
Comment 12 Quality Engineering 2008-11-13 05:06:49 UTC
Integrated into 'main-golden', will be available in build *200811130201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/7d75cc2ce975
User: Miloslav Metelka <mmetelka@netbeans.org>
Log: #123450 - Make editor menus consistent cross different file types.
Comment 13 hantsy 2008-11-28 03:54:43 UTC
The editor context menu is stupid and confused.
Sometimes two separators are displayed together without content between then.
Why not use a more intelligent way to deal with the context menu?
For example ,use group concept to organize the menu items.
A text file context menu maybe like this.
-----------common----------
Cut
Copy
Past
Find

A generic java file context menu maybe like this.
-----------common----------
Cut
Copy
Past
Find
Select in->
-----------java-------------
Quick open Hierarchy
....
Source Code->(generate code ,code fold ,fix imports )
Go to->
-----------refactor-------------
rename
Refactor->

A EJB file context menu maybe like this.

-----------common----------
Cut
Copy
Past
Find
Select in->
-----------java-------------
Quick open Hierarchy
....
Source Code->(generate code ,code fold ,fix imports )
Go to->
-----------refactor-------------
rename
Refactor->
-----------EJB--------------
Enterprise->
Web Service->
Persistence->

All other 3rd party context actions can be put into a tools group.
--------tools---------------
PMD->
Checkstyle->
Commons Lang->

By the way,  a "Property " action should add to the end of the menu.In the opened "Property" window, user can modify the
Encoding, etc. eg, for a HTML file , user can edit the meta of html.

NetBeans team can define the context category firstly ,when the menu rendered , add a separator between different group.

Another problem , make the context menu is related to the user's action , For example , when user selected some content,
drop unrelated menu item from context menu.

 



By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo