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 143836 - move Analyze Javadoc action from Tools to Source top level menu
Summary: move Analyze Javadoc action from Tools to Source top level menu
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-14 00:12 UTC by David Konecny
Modified: 2013-09-02 14:23 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
possible patch to hide Tools action from top level menu (needs polishing) (1.23 KB, text/plain)
2008-08-28 23:38 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2008-08-14 00:12:58 UTC
Jano, would you agree with this change? It seems to me that this action is in Tools menu historically because Tools was
traditional extensibility point.
Comment 1 Jan Becicka 2008-08-15 12:53:52 UTC
Definitely
Comment 2 Jan Pokorsky 2008-08-19 15:19:50 UTC
java.hints.analyzer action. Reassigning.
Comment 3 jrojcek 2008-08-26 11:07:04 UTC
I believe this feature should actually be integrated into the Task list. If the task list permitted the user to fix the listed problems, there's no need for a 
separate menu item and _window_ for the Javadoc use case. I see the current design as an interim solution.

For 6.5, we can move it into the Source menu like this:

| Source |                        S (mnemonics)
==========                       
...
===============================
Insert Next Matching Word         N
Insert Previous Matching Word     P
===============================
Analyze Javadoc                   J
Internationalization          >   z
===============================
Preprocessor Blocks           >   B

Note there's a few other issues with the Analyze Javadoc feature:

- the window name should be "Analyzer", not "Analyzer Window" as it is now.
- in case there's no problems found, the window should display a message "<No Javadoc problems found in xxx>", where xxx is a file, folder or project it 
was invoked on.
- currently the analyzer window gives no clues what it was invoked on when there's problems found. I think the problem is that it shows the full tree even 
if it was invoked on a file. In such case, there should be no tree, just the file shown in the window. In other words, the top level node in the window should 
always be the item the action was invoked on.



Comment 4 Jan Becicka 2008-08-26 13:06:57 UTC
This issue is about Analyze Javadoc. Your suggestion is to move Internationalization as well?
Comment 5 jrojcek 2008-08-26 14:17:52 UTC
There's a separate issue filed against the Internationalization action:
http://www.netbeans.org/issues/show_bug.cgi?id=143826

I put it into one "spec" so that we can see it together.
Comment 6 Jan Becicka 2008-08-27 09:38:16 UTC
fixed
Comment 7 David Konecny 2008-08-27 23:20:54 UTC
While verifying this I noticed:

* Analyze Javadoc action is what? Cookie based action? and as such its enabled based on a selected node in IDE but most
of other actions in Source menu seems to be tied to a file opened in editor. Is that OK?

* even if you select non-Java node in IDE (eg. Services->Servers) the action is enabled and clicking it disables the
action. Should not it be enabled only on nodes which are Java file and/or Java package?
Comment 8 Quality Engineering 2008-08-28 06:37:54 UTC
Integrated into 'main-golden', available in build *200808280201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/49b38f5549d1
User: Jan Becicka <jbecicka@netbeans.org>
Log: #143836: move Analyze Javadoc action from Tools to Source top level menu
Comment 9 Jan Becicka 2008-08-28 06:49:33 UTC
Well, maybe we should make decisions what we are going to do.
David filed 3 similar issues requesting changes in main menu, It was move analyze javadoc, some unit test and i18n actions.
Afaik i18n actions are not going to move, and now David realized, that Analyze Javadoc Action is not consistent in
Source menu.

Analyze Javadoc can be invoked on source, package, folder and project.
So I propose to rollback my change. Change this issue to enhancement and solve it consistently with other actions in 7.0
Comment 10 David Konecny 2008-08-28 23:37:10 UTC
I'm wearing user's hat and reporting whatever inconsistencies or problems I find. :-)

Re. "I propose to rollback my change" - if it is difficult to fix properly and/or there is no time and current half-way
solution makes it worse than it was then I agree. I would not necessarily rollback it only because other actions (i18n,
junit test) cannot implement it - incremental improvement is better that no improvement.

Now I'm putting my developer's hat on. :-) Just to brainstorm some possible *short term* solution:

* first problem is that moving action from Tools to Source removes it from all contextual Tools menus as well. OK, let's
keep the declaration in both places but hide the action in Tools top level menu. I'm attaching a patch (just for
illustration) which would allow that (4 lines of code). Patch needs polishing (define a constant and Javadoc it) and
review because it is an API.

* second problem is that Analyze Javadoc seems to be always enabled. Looking at AnalyzeFolder.java there are two
actions: AnalyzeFolder and AnalyzeFolder$Tools. Well, that's good that allows us to change AnalyzeFolder one to behave
as other Source menu actions while keeping AnalyzeFolder$Tools to behave as Tools action. I still think that enablement
logic is broken and should be fixed regardless of outcome of this dicsussion (eg. enabling the action on
Services->Servers node has no sense, right?)

That resolves all the problems I'm aware of. Do you see some others?
Comment 11 David Konecny 2008-08-28 23:38:25 UTC
Created attachment 68584 [details]
possible patch to hide Tools action from top level menu (needs polishing)
Comment 12 Jan Becicka 2008-08-29 09:56:42 UTC
Wearing user's hat I must agree with you, Davide.
Putting' developer's hat on, thanks for the patch.
And now putting manager's hat :)
UI freeze is on Monday, and this issue is more enhancement. We have more important things to do. If anyone volunteer to
do do this change, go through review etc. I'm not against. But we are fully focused on fixing functional issues.

I did rollback of my change.
Comment 13 Quality Engineering 2008-08-30 05:40:55 UTC
Integrated into 'main-golden', available in build *200808300201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/7eae20834680
User: Jan Becicka <jbecicka@netbeans.org>
Log: #143836: revert of
 move Analyze Javadoc action from Tools to Source top level menu
Comment 14 David Konecny 2008-08-31 21:21:46 UTC
UI freeze? already? ok. If Jano feels strongly that we should fix this despite being in UI freeze I would volunteer to
take the API change through review process (fast track).
Comment 15 jrojcek 2008-09-01 09:28:47 UTC
I would say lets wait with this change so that it's fixed consistently in main menu and contextual menus.