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 215207 - [72cat] No more "Set as main project" in project popup dialog
Summary: [72cat] No more "Set as main project" in project popup dialog
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.2
Hardware: PC All
: P2 normal with 2 votes (vote)
Assignee: Milos Kleint
URL:
Keywords:
: 226353 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-05 14:55 UTC by jmborer
Modified: 2019-07-14 08:08 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (39.83 KB, image/png)
2012-07-05 14:55 UTC, jmborer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jmborer 2012-07-05 14:55:50 UTC
Created attachment 121762 [details]
Screenshot

After a fresh install of 7.2 FCS, there is no more the "Set as main Project" item in the popup dialog of a Maven project (see screenshot).

Once you have set it through Run->Set Main Project menus, the option becomes available again.


Product Version: NetBeans IDE 7.2 (Build 201206291011)
Java: 1.6.0_30; Java HotSpot(TM) Client VM 20.5-b03
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 1 Milos Kleint 2012-07-05 15:13:52 UTC
afaik that's as designed by jglick for 7.2, will double check.
Comment 2 chunkyks 2012-07-06 18:41:41 UTC
This happens on Linux, too. It's clearly by design, as it made it into the release notes for 7.2

That being said, I'd like the feature to be seriously reconsidered, or at least not made the default. The drawbacks of this approach far outweigh the benefits, at least for me.

Once the run menu "set as main project" button has been used, netbeans seems to behave just like it did pre-7.2. Perhaps that could be added to the release notes. Or just leave the "set as main project" right click menu item, and add "unset as main project". Leaving the old behaviour as default [setting a main project] would be nice. Additionally, even if you have a main project set, the "open as main project" check is gone from the open project window; if someone sends me a project that I open, it's now an extra three or four clicks to run that project.


Specific things in the new approach that cause me problems:

1) Actually using the "set as main project" feature under the run menu is a whole bunch of extra clicks and menu-digging.

Putting it under the "run" menu seems unintuitive, as this is relevant for things other than just running code. For example, it also affects main window buttons that correlate to "debug" and "profile" menus.

I only found it after looking in "File", "Tools", "Navigate" and finally looking for this bug. At no point did my brain thing to look under the "run" menu, as it it's a project setting and doesn't map to the "run" concept, in my brain.

2) Turns out I do a lot of things where the scope isn't project, but I still expect the "run" button to work.

For example, I just profiled a project. I clicked "yes" to "open profile output in a window" when it completed, and now I'm looking at a window in which the run/debug/profile buttons have all been grayed out.

3) The method by which the project is picked is entirely undiscoverable. How do I switch scope to a project? Is it only when I select a file in that project, in the project window? Is it when the editor is open to a tab for a particular project's code?

Tab focus in netbeans isn't usually relevant, and the UI breadcrumbs to indicate it aren't particularly noticable. This feature makes tab focus of vital importance.

More than once, I've clicked "run" with the editor tab set to code from a different project. For example: I edit some code, then save and close that editor tab. Click the run icon, and suddenly I have a different project running to the one whose code I just edited, because it chose a code tab from another project.

4) "unset as main project" is still attached to the right click menu for a selected main project.

I click it. Now I'm in limbo; "None" is selected as the main project under the run menu, but my projects all now have the "Set as Main Project" right click menu option. This works as it used to. Now I set the project as a main project, and go back to the run menu and choose "None" as the main project; now the "set as main project" right click menu item has vanished. Clearly some state is being carried internally, different behaviour with no indication why


Overall, I think deciding which project to run based on context is a reasonable idea in theory, but the current getup feels awkward and difficult to use.
Comment 3 Marian Mirilovic 2012-07-27 13:12:30 UTC
yes, it was intentional - see issue 210046
Comment 4 Milos Kleint 2012-09-05 09:03:28 UTC
please see discussion in issue 166780 for details on the current behaviour

(In reply to comment #2)
> Additionally, even if you have a main project set, the
> "open as main project" check is gone from the open project window; if someone
> sends me a project that I open, it's now an extra three or four clicks to run
> that project.
>

Yes, if there's no project set (which we hope to be the current default, most common behaviour), then the selected project is run when you hit F6. 
The extra clicks only apply if you have another project set as main and wish to make the new project main (have it run long term). for occasional runs, you have the project's popup menu.

 
> 
> Specific things in the new approach that cause me problems:
> 
> 1) Actually using the "set as main project" feature under the run menu is a
> whole bunch of extra clicks and menu-digging.
> 
> Putting it under the "run" menu seems unintuitive, as this is relevant for
> things other than just running code. For example, it also affects main window
> buttons that correlate to "debug" and "profile" menus.

It's been there all the time ever since 4.0  I believe.

> 
> 2) Turns out I do a lot of things where the scope isn't project, but I still
> expect the "run" button to work.
> 
> For example, I just profiled a project. I clicked "yes" to "open profile output
> in a window" when it completed, and now I'm looking at a window in which the
> run/debug/profile buttons have all been grayed out.
> 
> 3) The method by which the project is picked is entirely undiscoverable. How do
> I switch scope to a project? Is it only when I select a file in that project,
> in the project window? Is it when the editor is open to a tab for a particular
> project's code?

both should apply.

consider the current behaviour correct (at the time being) -> wontfix.
Comment 5 Marian Mirilovic 2013-02-19 19:37:22 UTC
*** Bug 226353 has been marked as a duplicate of this bug. ***
Comment 6 KGF123 2019-07-14 08:08:55 UTC
How to find my documents windows 10,this is simple process http://documentswindows10.com basically some users confused in this case,then try to understand this way.