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 162385 - [67cat] Double and absent occurences in toolbar customizer
Summary: [67cat] Double and absent occurences in toolbar customizer
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks: 186906
  Show dependency tree
 
Reported: 2009-04-10 12:50 UTC by ulfzibis
Modified: 2016-07-07 08:37 UTC (History)
2 users (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 ulfzibis 2009-04-10 12:50:37 UTC
[ BUILD # : 6.5 Hotfix 3 ]
[ JDK VERSION : 1.6.* ]

Double occurences in toolbar customizer:
- Run Project
- Build Project
- Clean Project
- Clean & Build Project
- Run Project

There should be added "Main" to respectively one of them.

Missing:
- Test Main Project
- Debug Project (without Main semantics)
Comment 1 Stanislav Aubrecht 2009-04-10 13:27:24 UTC
project team, pls look at this. perhaps the actions can have different display names
Comment 2 Quality Engineering 2009-04-11 06:52:08 UTC
Integrated into 'main-golden', will be available in build *200904110201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f0206fe5103b
User: Milan Kubec <mkubec@netbeans.org>
Log: #162385: NPE when category provider is null
Comment 3 Jesse Glick 2010-05-13 14:13:25 UTC
(In reply to comment #0)
> Double occurrences in toolbar customizer:
> - Run Project
> - Run Project

6.9 has Run Project and Run Main Project. (Probably Run Main Project should be renamed Run Project and the former Run Project simply removed from the GUI, since the recommended action behaves well with or without a main project set.) The only duplicate I see is New File.

> Missing:
> - Test Main Project

There has never been such an action.

> - Debug Project (without Main semantics)

Ditto.
Comment 4 ulfzibis 2010-05-27 23:21:01 UTC
(In reply to comment #3)
Due to the mailing disaster I missed answering earlier :-( .

> (In reply to comment #0)
> > Double occurrences in toolbar customizer:
> > - Run Project
> > - Run Project
Don't see this any more in 201005192201, but "Run Main Project" now is there.

> 6.9 has Run Project and Run Main Project. (Probably Run Main Project should be
> renamed Run Project and the former Run Project simply removed from the GUI,
> since the recommended action behaves well with or without a main project set.)
If file/node of other than main project is focussed/marked, "Run Main Project" IMO is useful.
Additionally, "Run Project" is missing in normal menu.
Additionally, "(Clean and) + Build Project" is missing in normal menu.

> The only duplicate I see is New File.
> 
> > Missing:
> > - Test Main Project
> 
> There has never been such an action.
F6 is "Run Main Project", but Alt+F6 is "Test Project". The latter is dependent from the currently focussed/marked file/node. IMO this is confusing.
So for regularity, "Test Main Project" should exist too.

> > - Debug Project (without Main semantics)
> 
> Ditto.
For regularity: Ditto.
Additionally, "Debug Test Project" is missing in toolbar customizer.
Additionally, "Debug Test Main Project" is missing in toolbar customizer.
All 3 are missing in normal menu.

Additionally, "Replace.." is missing in toolbar customizer. "Find.." is existing
(would be very helpful to have them in editor context menu)
Refer to bug 148987

There is Run/Debug File in context menu of test file which actually runs/debugs the test file, not the regular file.

Very important: "Compile File" is missing in editors context menu. :-(
(It's more important than "Run/Debug File" as they only apply to files containing a main method, and erroneously they're enabled there)
Comment 5 Jesse Glick 2010-05-28 14:23:21 UTC
(In reply to comment #4)
> If file/node of other than main project is focussed/marked, "Run Main Project"
> IMO is useful.

"Run Project" I guess you mean. But then you can either unset the main project, or choose Run from the context menu of a specific project.

> Additionally, "Run Project" is missing in normal menu.
> Additionally, "(Clean and) + Build Project" is missing in normal menu.

Intentionally; all these actions are deprecated.

> F6 is "Run Main Project", but Alt+F6 is "Test Project". The latter is dependent
> from the currently focussed/marked file/node.

Intentionally. In a multimodule app, it is often the case that the app can only be run as a whole, from some entry point. But individual modules may be testable. It has been this way since NB 4.0 IIRC.

Anyway discussion of the desirability of various actions is off topic for this bug report; please keep it to nbui, and limit this to visible duplicates in the toolbar customizer.

> "Debug Test Project"

There is no such action. You can only debug an individual test case.

> "Replace.." is missing in toolbar customizer.

Perhaps, but off topic here.
Comment 6 ulfzibis 2010-05-28 15:22:42 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > If file/node of other than main project is focussed/marked, "Run Main Project"
> > IMO is useful.
> 
> "Run Project" I guess you mean. But then you can either unset the main project,
No, I mean "Run Main Project" in the current meaning, so user must not first focus to file/node of the main project to run the main project.
If you rename it, it's not clear, wether the focused or the main project would run after invoking this action.
If that action would be dropped, the current green arrow button (refers always to main project) would disappear too, which nobody would be happy with, for I guess.

> or choose Run from the context menu of a specific project.
> 
> > Additionally, "Run Project" is missing in normal menu.
> > Additionally, "(Clean and) + Build Project" is missing in normal menu.
> 
> Intentionally; all these actions are deprecated.
I don't understand. You want to rename "Run Main Project", to "Run Project" and "Run Project" is deprecated. How should that work?

> > F6 is "Run Main Project", but Alt+F6 is "Test Project". The latter is dependent
> > from the currently focussed/marked file/node.
> 
> Intentionally. In a multimodule app, it is often the case that the app can only
> be run as a whole, from some entry point. But individual modules may be
> testable. It has been this way since NB 4.0 IIRC.
> 
> Anyway discussion of the desirability of various actions is off topic for this
> bug report; please keep it to nbui, and limit this to visible duplicates in the
> toolbar customizer.
Renamed the topic.

> > "Debug Test Project"
> 
> There is no such action. You can only debug an individual test case.
Hm, "Debug Test Project" *is* for the individual test case, but "Debug Test Main Project" would be for the main test case.

> > "Replace.." is missing in toolbar customizer.
> 
> Perhaps, but off topic here.
Renamed the topic.

Please apologize any confusion in my report, but this is caused from the confusing differing availability (additionally sometimes enabled if not applying) of several actions from the several entry points.

OFF TOPIC: Please make all applying actions consistently available from any arbitrary entry point. It's often annoying to click around to find the desired action even if potentially applying to current mark/focus, especially awesome for the find/replace actions.
Comment 7 Jesse Glick 2010-05-28 15:47:53 UTC
(In reply to comment #6)
> If you rename it, it's not clear, whether the focused or the main project
> would run after invoking this action.

The standard behavior of main-project-sensitive actions for the past few releases has been to use the main project if set, else consider selection, else if exactly one project is open to use it. It is possible the old non-main-project-sensitive actions will simply be dropped (they are not shown in the GUI by default anyway), since the new behavior essentially supersedes them.

> "Debug Test Project" *is* for the individual test case

Does not make any sense. A project has many test suites in general.

> "Debug Test Main Project" would be for the main test case.

There is no such thing.
Comment 8 ulfzibis 2010-05-28 16:03:39 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > If you rename it, it's not clear, whether the focused or the main project
> > would run after invoking this action.
> 
> The standard behavior of main-project-sensitive actions for the past few
> releases has been to use the main project if set, else consider selection, else
> if exactly one project is open to use it. It is possible the old
> non-main-project-sensitive actions will simply be dropped (they are not shown
> in the GUI by default anyway), since the new behavior essentially supersedes
> them.
Do I understand right: If I'm in focus of any file which is not part of the main project, the green triangle button action should run the individual project where the file is part of? Currently this is not the case IIRC.

> > "Debug Test Project" *is* for the individual test case
> 
> Does not make any sense. A project has many test suites in general.
Here I mean individual *project*. Action should run *all* tests from the individual project.

> > "Debug Test Main Project" would be for the main test case.
> 
> There is no such thing.
Here I mean the main *project*. Action should run *all* tests from the main project.
Comment 9 Jesse Glick 2010-05-28 16:56:07 UTC
(In reply to comment #8)
> Do I understand right: If I'm in focus of any file which is not part of the
> main project, the green triangle button action should run the individual
> project where the file is part of?

No. Again: if there is a main project set, that is used unconditionally. Otherwise, other criteria are used to select a project. If you prefer to rely on selection, simply do not set a main project.

>>> "Debug Test Project" *is* for the individual test case
>
> Here I mean individual *project*. Action should run *all* tests from the
> individual project.

Does not make sense. Test suites are run each in their own VM, in some sequence. If you want to debug a test failure, you have to pick a particular suite to launch in a debug-mode VM, generally after setting some kind of breakpoint.
Comment 10 jvenkat 2012-09-05 23:33:33 UTC
Jesse, I see duplicate entries for "New File" in Netbeans 7.2. Is this fixed?
Comment 11 Martin Balin 2016-07-07 08:37:42 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