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 116968 - [60cat] All relevant actions available for a given file in the project tree should be available in the editor
Summary: [60cat] All relevant actions available for a given file in the project tree s...
Status: REOPENED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 2 votes (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-27 16:56 UTC by wobster
Modified: 2016-07-07 23:33 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Editor Context Menu (5.49 KB, application/octet-stream)
2007-09-27 17:13 UTC, wobster
Details
Context menu in project tree for same file (4.94 KB, application/octet-stream)
2007-09-27 17:15 UTC, wobster
Details
NetBeans Java editor menu items for NetBeans IDE Dev 20160707002 (53.08 KB, image/png)
2016-07-07 23:33 UTC, wobster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wobster 2007-09-27 16:56:36 UTC
I've noticed that there are actions for a given file (like .java) available in the project node tree that are not
available from within the editor for that same file. This inconsistency can make it awkward to perform functions like
compile, svn functions, etc while in the editor since you are forced to find the file in the project tree in order to
perform those functions rather than just right clicking from within the editor. I've attached two screen shots of the
context menu for a given Java file from the project tree and from within the editor to illustrate the missing functions.
Comment 1 wobster 2007-09-27 17:13:13 UTC
Created attachment 49698 [details]
Editor Context Menu
Comment 2 wobster 2007-09-27 17:15:49 UTC
Created attachment 49699 [details]
Context menu in project tree for same file
Comment 3 Jiri Prox 2007-10-01 09:45:39 UTC
This is as designed. The context menu in editor contains action which are connected with current caret position. Jano,
am I right?
Comment 4 wobster 2008-04-22 14:27:32 UTC
Not being able to right click within the source code to compile is very annoying. I realize that I can use shortcuts to
compile, but why not expose the relevant functionality via context menus in the place that matters? I either have to
find the file in the node tree or use the keyboard shortcut (when I remember it).
Comment 5 Vitezslav Stejskal 2008-04-23 09:59:32 UTC
This is an everlasting struggle for keeping the editor popup menus as short as possible and yet providing access to
functionality that is most needed. You would like to add compile action, other folks would like to add VCS actions, etc.
I am afraid that we will have to wait until UI people re-evaluate current state and decide that the menus need to be
changed.
Comment 6 wobster 2008-04-23 14:38:49 UTC
I'd be for having a couple of the VCS functions (update and commit) available as well! I would think that functions that
are used often would be candidates for the context menu.

Why are the requirements for the editor context menu any different than the context menu of the tree? Right now they are
out of synch. 

Maybe this could be user-preference or some type of actions editor could be added to add your desired actions to the
context menu?
Comment 7 wobster 2008-06-21 15:36:53 UTC
Are the UI people evaluating this issue? 
Comment 8 jrojcek 2008-06-23 11:54:45 UTC
We're updating the contextual menu in editor for the 6.5 release. See this issue:
http://www.netbeans.org/issues/show_bug.cgi?id=123450

It doesn't yet cover adding additional actions. In case of Versioning and Local History, we would very likely add them. Maybe for 6.5 if time permits. In case of 
Compilation, we're introducing "Compile on Save" feature for 6.5, which would do the compilation automatically.

Comment 9 wobster 2008-06-23 15:57:55 UTC
FWIW, I haven't been a big fan of the automated tasking in the newer NetBeans. Usually, it just gets in the way and
causes me grief with little benefit. For instance, every time NetBeans starts it reindexes all dependent packages for my
project. This can take a few minutes or half an hour depending on my classpath (if there is a network drive involved
with thousands of files it can be slow.) There is no way to turn this feature off either, which is really annoying. (I'm
not a big fan of Eclipse, but one feature it has is the manual "refresh project" that allows the developer to decide
whether the dependencies need reevaluation.

I see automatic compilation on save useful sometimes, but if there are a lot of errors in the file when you save it,
automatic compilation is not necessary and will likely slow down the development process. The developer should have the
option to turn this off. The developer should also have easy access to the ability to compile the file as well. (I'm not
sure why adding "compile" to the context menu is so controversial when "edit, compile, run" are the three most frequent
steps of development!)

Comment 10 wobster 2009-10-06 14:46:55 UTC
Any progress on this?
Comment 11 Ondrej Langr 2009-10-09 16:09:05 UTC
As for initial description, it is not desirable to unify the two menus. These menus are often called "contextual menus",
meaning they should only include items useful in given context. So, given the original request asks to unify the two
menus, I almost tend to close as wontfix. 

For editor, the context is editing, items which are not directly related to editing the file should not be there.
Versioning items are already present in contextual menu on tab of given file. 

Can you be more specific which items you miss in editor contextual menu? 
Comment 12 wobster 2009-10-10 16:04:00 UTC
I'd like the common operations that apply to a given file available from within the editor via the right click option.

Here is a list of some of the missing common operations that I use:

1.) compile file
2.) commit file
3.) update file
4.) diff file

Basically, if you compare the attached screen shots of the right click context menu available for the file in the tree
versus editor you'll see the missing items. Any action that is specific to a file should be available from within the
editor as well as the tree. It is a hassle to find the node in the tree or to move the mouse up to the menu bar and
navigate the cascading menus to find the action to apply. 
Comment 13 Ondrej Langr 2009-10-19 15:19:04 UTC
All the actions you mentioned apply to the file as a whole, while actions in editor contextual menu are applicable to
particular area/line in the file or editing the file. 

These actions should be available in the contextual menu on the tab of the given file, *not* in the contextual menu in
the editor. 

Since this requests the two menus to be unified (which I strongly disagree with), I'm closing as wontfix. 

If you want to have the actions on the tab contextual menu, please file as a separate issue, CC me and I'll support it.
So far I haven't seen any similar requests but I must admit it makes sense. 

BTW: for finding the open file in the tree, you can also use the "select in projects/files" actions. Not very intuitive,
but will do the trick. 
Comment 14 wobster 2009-11-08 14:54:43 UTC
Not acceptable. 

Why is this so damned controversial! Shouldn't developers be able to right click within the file and do a compile, commit, update etc? They can do a run, fix imports, profile, etc., so your reasoning is specious at best.

NetBeans developers: please listen to your users (customers) and come down from your Ivory towers before everybody migrates to other IDEs.
Comment 15 Ondrej Langr 2009-11-10 06:32:41 UTC
This is so damn controversial, because it'd blow the contextual menu to a unusable level (the more items there are, the more difficult to locate the one you're looking for): 

run
test
compile
check (non-java)
validate (non-java)
debug
commit
update 
diff 
show changes

These all (and potentially many others) are items you're asking to add to the editor contextual menu, although they already are at other places where users are used to locate them. 

Both menus serve a different purpose! 

Projects contextual menu: working with a file as a whole. 
Editor contextual menu: working with elements/code within the file.

They are *not* meant to be the same, which this issue asks for. 

We (netbeans developers) are not sitting on ivory towers, we get a *lot of* feedback, we think about it and we discuss it back. We (you and me) just happen to have a different opinion on this particular issue, that's all.

(again, by this, I'm not saying that having to locate an open file in projects view in order to compile it is correct, I'm just saying that editor contextual menu is not a place to overcome this)
Comment 16 wobster 2009-11-12 07:10:12 UTC
We need a better process for evaluating proposed features. I've had a number of long drawn out pedantic discussions with some of the NetBeans developers over issues that should not be that controversial. <soapbox>(here are pages of discussion on the very annoying classpath scanning problem that I complained about 2 years ago and has still not been fixed! This single problem is driving me away from using NetBeans. But instead of fixing these types of major performance and usability problems, more features and languages are added.</soapbox>

This is a feature request not a bug so saying that you won't fix it isn't acceptable. If you want to punt on it then move it to a future release for continued evaluation. I think NetBeans needs a enhancement review board to properly evaluate these types of requests.

I've been doing GUI programming for 15 years now so please spare me the lectures on what is proper. (I also run a local Java user group of 1200 on the mailing list and have been one of the few advocates of NetBeans compared to Eclipse.)

Let me ask you this, what functions do you perform most often when editing a class?

I do these steps:

open class
edit class
refactor class
compile
run or debug program or file
commit file

I commit often so I can avoid collisions and have a fine grained log of what I've changed. I have no idea why putting compile and commit on a node in the tree is a good idea.

Anyway, I'm done arguing about this stupid thing. If I need to, I'll just write my own plugin to override the settings.
Comment 17 Martin Balin 2016-07-07 07:32:02 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 18 wobster 2016-07-07 23:32:11 UTC
I just downloaded the dev version of NetBeans and noticed that the Java editor's context sensitive menus still do not contain the requested items in this enhancement request.
Comment 19 wobster 2016-07-07 23:33:06 UTC
Created attachment 160307 [details]
NetBeans Java editor menu items for NetBeans IDE Dev 20160707002