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.
Summary: | Select main project | ||
---|---|---|---|
Product: | projects | Reporter: | Padraig Obriain <padraigob> |
Component: | Generic Projects UI | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | CC: | jrice |
Priority: | P3 | Keywords: | API |
Version: | 6.x | ||
Hardware: | Sun | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
Padraig Obriain
2007-04-25 11:21:26 UTC
org.netbeans.api.project.ui.OpenProjects.setMainProject? (in module projects/projectuiapi) We call setMainProject but that does not select the project. Ok, I misunderstood the request, sorry. Yep this is the API. What we want is on making the setMainProject call is to have selection set to the project we have just set as our main project. An option to expand it one or more levels would be nice as well, but the key for us is to have the selection set to this project. Seems like reasonable default behaviour, but could always add a setSelection flag if you didn't want this to be the default. org.netbeans.api.project.ui.OpenProjects: Code snippet: public static void openProject(Project p, Object caller) { Project[] projects = new Project[] {p}; OpenProjects.getDefault().open(projects, false); OpenProjects.getDefault().setMainProject(p); } I think it's useless to have "set as Main project". I find that when you select none project as "Main one", then the "Run" icon in the tool bar just recognize the project you select as the option. It is enough to do so. Also, when you select a project as "Main project" using the right-click menu, you just cannot degrade it as "none Main project" by right-clicking. You must use "Run" in the menu bar. Even than, there is a small bug that when you select "NONE" in the "Set Main Project", the current Main one won't be degraded until you de-select all the items in the sub-menu "Set Main Project". |