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 143835 - Move Create JUnit Tests action to Source menu
Summary: Move Create JUnit Tests action to Source menu
Status: RESOLVED INCOMPLETE
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords: UI
: 99743 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-14 00:11 UTC by David Konecny
Modified: 2009-03-27 12:20 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2008-08-14 00:11:09 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 David Konecny 2008-08-19 09:19:21 UTC
I forgot to add Jano on CC to comment. IMO this is UI DEFECT no enhancement because action is in a wrong place.
Regardless of issue type and considering simplicity of fix it would be great to resolve this for NB65.
Comment 2 Marian Petras 2008-08-27 10:24:39 UTC
What is the target position of the "Create JUnit Tests" action in the Source menu? Is it specified somewhere?
Comment 3 jrojcek 2008-08-27 13:00:52 UTC
Position of the menu item...
---

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

---
Copied from the spec:
http://wiki.netbeans.org/MainMenu
Comment 4 Marian Petras 2008-08-27 14:52:55 UTC
Although this looks like a simple change, there is one thing that makes it complicated - context menus on nodes
representing Java files and packages. If an action is removed from the Tools menu, it becomes inaccessible from context
menus of nodes.

I will not implement this change (move) until this is sorted out.
Comment 5 David Konecny 2008-08-27 22:05:30 UTC
I see. For now I would fix this similarly as Honza fixed issue 143836 ("move Analyze Javadoc action"): add action to
Source menu but leave it in Tools as well. The "Source" menu should be user's first place to look for the action. 

Long term solution IMO should be to register "Create JUnit Tests" action in a layer where Java file node and Java
Package node would pick it up. I have no idea whether something like that is possible now or is planned. Honza might now
better. That would resolve situations when eg. in Files tab you select a random folder (eg. 'dist') and right click it
and in Tools menu you get Analyze Javadoc or Internationalize which does not make any sense there.

What do you think guys?
Comment 6 jrojcek 2008-08-28 12:56:25 UTC
Having the same action in both main menus (Source and Tools) is bad. I would rather keep it only in the Tools menu for 6.5 if we cannot solve it some other 
way.

Long term, I think the actions should be in the main Source menu, but they should also be available from contextual menus. The best position would 
probably be a new Source submenu available on java file nodes, packages and source package folders.
Comment 7 David Konecny 2008-08-28 23:53:16 UTC
I agree with the long term solution. I added to issue 143836 possible short term solution.
Comment 8 Alexei Mokeev 2009-03-05 13:50:00 UTC
Assigning issues from Michael to Andrey.
Comment 9 Alexei Mokeev 2009-03-27 12:20:16 UTC
*** Issue 99743 has been marked as a duplicate of this issue. ***