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 191404 - no easy way to set project as non-main
Summary: no easy way to set project as non-main
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords: UI
: 133408 157833 (view as bug list)
Depends on:
Blocks: 166780
  Show dependency tree
 
Reported: 2010-10-27 12:34 UTC by Ondrej Langr
Modified: 2012-03-26 19:15 UTC (History)
3 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 Ondrej Langr 2010-10-27 12:34:15 UTC
When evaluating main project concept, I discovered that no easy way to set a main project to standard project is available (or have I missed it?). 

Solution: "Set as Main Project" in project contextual menu should be toggle (similarly for example to "View" -> "Show Editor Tollbar"
Comment 1 Jesse Glick 2010-10-27 12:42:27 UTC
(In reply to comment #0)
> no easy way to set a main project to standard project is available

Do you mean to unset the main project?

> (or have I missed it?)

Alt-R M N works for me.

> "Set as Main Project" in project contextual menu should be toggle
> (similarly for example to "View" -> "Show Editor Toolbar"

This is not analogous. The action is not setting some flag on the selected project; it is picking the selected project *instead of* any other. That is why we present a radio button UI in the main menu.

However there could be an action "Unset as Main Project" available just on the context menu of the current main project (if any), if you think this would be useful.
Comment 2 Ondrej Langr 2010-11-02 09:08:25 UTC
(In reply to comment #1)

> Do you mean to unset the main project?
Yes, sorry for being unclear.


> > (or have I missed it?)
> Alt-R M N works for me.

I see, I haven't found it before. Thanks.

> > "Set as Main Project" in project contextual menu should be toggle
> > (similarly for example to "View" -> "Show Editor Toolbar"
> 
> This is not analogous. The action is not setting some flag on the selected
> project; it is picking the selected project *instead of* any other. That is why
> we present a radio button UI in the main menu.

Try to look at it through the set of use-cases. 

1) User needs to set JavaApp main project. Right-clicks it and chooses "Set as Main Project". 
2) User needs to change main project to JavaApp2: Right-clicks it and chooses "Set as Main Project" 
3) Now user decides (s)he does not need any main project: needs to go run->main project-> none

Reverting an action can not be done the same (or reverse) way as the action itself. Not good. 

An action "Unset main project" which you suggest would also do the trick. In this case, for non-main projects, nothing would change. For main project, we'd have two actions on contextual menu: "Set as Main Project" (disabled, because the project is main) and "Unset as Main Project". The toggle I'm suggesting is essentially the same, only it saves space in the menu and gives clear indication (tick) that the project is main (and thus what bold project name means, which is not clear now).  

I agree that in main menu, it still needs to be "radiobutton" UI (mutually exclusive), though. But speaking really just my personal opinion now, it is not quite easy to find - at least I concluded it's not even there. In any way, when the user learns how to set main project, it doesn't help them at all in knowing how to unset it. 

Please reconsider.
Comment 3 Petr Jiricka 2010-11-02 10:06:27 UTC
If we are going to deemphasize the main project concept, do we need the action(s) in the project node's popup menu at all? Could we just remove the Set as Main Project action and only keep the radiobutton-like action in the main Run menu? This way UI for set/unset would be symmetric.
Comment 4 Jesse Glick 2010-11-02 10:12:24 UTC
I just made it a single menu item with a variable label, which seems better than having two menu items one of which is always disabled. core-main #a27d4de9d98a
Comment 5 Jesse Glick 2010-11-02 10:13:00 UTC
(In reply to comment #3)
> Could we just remove the Set as Main Project action

May make sense in the next release when we do other related work.
Comment 6 Quality Engineering 2010-11-03 03:56:32 UTC
Integrated into 'main-golden', will be available in build *201011030000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a27d4de9d98a
User: Jesse Glick <jglick@netbeans.org>
Log: #191404: "Unset as Main Project"
Comment 7 Jesse Glick 2012-03-03 00:06:04 UTC
*** Bug 157833 has been marked as a duplicate of this bug. ***
Comment 8 Jesse Glick 2012-03-26 19:15:25 UTC
*** Bug 133408 has been marked as a duplicate of this bug. ***