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 209973

Summary: Set Main Project submenu unusable when too long
Product: projects Reporter: Vladimir Voskresensky <vv159170>
Component: Generic Projects UIAssignee: Martin Kozeny <mkozeny>
Status: RESOLVED FIXED    
Severity: normal CC: anebuzelsky, markiewb, mentlicher, pjiricka, wbrana
Priority: P3 Keywords: UI
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 210148    
Bug Blocks: 166780    

Description Vladimir Voskresensky 2012-03-23 05:00:31 UTC
we are using Main Project concept. Now it's impossible to switch between Main projects if number of opened projects is big, because is just not visible in Run->Set Main Project and submenu is not scrollable
Comment 1 Vladimir Voskresensky 2012-03-23 05:01:52 UTC
btw, it's extremely difficult to find project in Run->Set as Main list comparing to "Set as main" in project's context menu :-(
Comment 2 Jesse Glick 2012-03-23 14:25:14 UTC
Good point, Swing does not automatically manage long menus well. If above a certain number of items, probably the submenu should break apart into subsubmenus, or show a dialog with a JList.

(In reply to comment #1)
> it's extremely difficult to find project in Run->Set as Main list
> comparing to "Set as main" in project's context menu

Intentionally - the entire concept was deemphasized in the GUI. There is nothing stopping you from restoring this context menu item for CND project types if you feel it is appropriate there; should be a one-liner.
Comment 3 Petr Jiricka 2012-03-26 16:08:06 UTC
> show a dialog with a JList

I like this idea (though I admit it's really easy to have an opinion about UI).
Comment 4 Jesse Glick 2012-03-26 21:53:09 UTC
Still valid, but lower priority after fix of bug #210148.
Comment 5 Jesse Glick 2012-03-27 20:03:41 UTC
*** Bug 210177 has been marked as a duplicate of this bug. ***
Comment 6 Milos Kleint 2012-11-14 09:49:50 UTC
*** Bug 222097 has been marked as a duplicate of this bug. ***
Comment 7 PatrikOlsson 2013-03-15 13:11:02 UTC
I just want to chime in to say that I too have this problem and don't get the motivation behind removing the 'main project' feature.

An option is to add a checkbox inside the projects properties dialog.

Noticed a bug related to this, appears the option to set main project is available once you have selected a random project in the drop down list under Run menu. I will not report this as I use it to get around the on-topic problem.
Comment 8 Martin Kozeny 2013-12-04 06:20:07 UTC
https://hg.netbeans.org/core-main/rev/b8233f4061b1
Comment 9 Milos Kleint 2013-12-04 08:58:22 UTC
just fyi, on mac this seems to work ok as the main menu allows scrolling
Comment 10 Quality Engineering 2013-12-05 02:53:22 UTC
Integrated into 'main-silver', will be available in build *201312050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/b8233f4061b1
User: Martin Kozeny <mkozeny@netbeans.org>
Log: #209973: Set Main Project submenu unusable when too long.
Comment 11 Martin Kozeny 2013-12-06 15:32:30 UTC
Change computation of menu size: https://hg.netbeans.org/core-main/rev/a499a27d182f
Comment 12 Quality Engineering 2013-12-07 04:22:26 UTC
Integrated into 'main-silver', will be available in build *201312070002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/a499a27d182f
User: Martin Kozeny <mkozeny@netbeans.org>
Log: #209973: Set Main Project submenu unusable when too long.