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 151379 - "Go To Spring Bean" menu item is always active
Summary: "Go To Spring Bean" menu item is always active
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Spring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-26 00:20 UTC by Masaki Katakai
Modified: 2011-09-27 11:36 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 Masaki Katakai 2008-10-26 00:20:34 UTC
I got a report from community that "Navigate" > "Go To Spring Bean" menu item is always selectable
even when no Spring support in the opened projects. It's better to deactivate in such case.
Comment 1 Andrei Badea 2008-10-27 18:58:47 UTC
Not sure. Following this logic, you could argue that the Open Project action should be disabled when there are no
projects on your disk to open. Also, this could impact performance when many project are open, since you would have to
check them all for Spring support.
Comment 2 Masaki Katakai 2008-10-30 03:17:33 UTC
Thank you for evaluation. I understand your points.

fixed typo in subject.
Comment 3 Ondrej Langr 2010-09-14 12:47:08 UTC
Re-evaluating. 

Given that in most projects, Spring support is probably not enabled, this makes finding the other "Go to" items more difficult for vast majority of users. 

The general rule is "if the item is not applicable, disable it". 

Another argument for disabling the item is that "Go to Grails Controller" and "Go to Grails View" are also disabled when not applicable. 


(In reply to comment #1)
> Not sure. Following this logic, you could argue that the Open Project action
> should be disabled when there are no
> projects on your disk to open. 

This is not an adequate example as projects can be opened from other locations than my disk. More appropriate is "Open Project action should be disabled when there are no project to be opened, whatsoever.", which, indeed, is true :-)

> Also, this could impact performance when many
> project are open, since you would have to
> check them all for Spring support.

My assumption is that IDE does detect Spring support in some way. So why not to disable the action by default and only enable it when Spring support is detected?
Comment 4 Martin Fousek 2011-09-27 11:36:55 UTC
Sorry, but it's not the same use case. "Go to Grails Controller" and
"Go to Grails View" actions are related just to one opened file in the editor so it has sense and it's without performance troubles to disable these actions in some cases.

About the last paragraph of comment #3. It depends what is clearer. On the other side there would be enabling/disabling of action which wouldn't be obvious for users. Now, when you hasn't any Spring Bean it just didn't find any results.