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.
The change should address a lack of methods for opening and closing projects. Change: Adding of the following two methods into org.netbeans.api.project.ui.OpenProjects. public void open (Project[] projects, boolean openRequiredProjects); public void close (Project[] projects); Stability Category: Official
Created attachment 19233 [details] Diff
Change is ok. Do not forget @since and apichanges, etc.
As Yarda said, @since tag and apichanges.xml patch should be included in the diff given here. Should clarify behavior if - some projects to be opened are already open - some projects to be closed are not currently open - list of projects contains duplicates Should use "openSubprojects" rather than "openRequiredProjects", for consistency. Always use {@link ...} for reference to other API classes or methods or constants. Please apply standard JavaSoft formatting conventions to all newly added code, for consistency. Should have a "use cases" addition to arch.xml, or more simply a <div class="nonnormative"> section of the Javadoc for these methods, describing when you might want to call such methods - and, more importantly, when you would *not* and what you should do instead. In particular, at this time AFAIK we only expect the new methods to be called in response to actions performed on nodes inside the logical views of already-open projects: e.g. "Open" on a subproject node. A note to other reviewers: this change will also require an incompatible change in a friend API interface in a non-public package used only to communicate between the projectui and projectuiapi modules (using an impl dep). I assume this kind of change requires no review since it is not exposed to other components - correct me if I am wrong.
Updates to private contract between projectui and projectuiapi is probably out of scope of api review until they change the module dependencies. Which they probably do not: <dependency> <code-name-base>org.netbeans.modules.projectuiapi</code-name-base> <build-prerequisite/> <compile-dependency/> <run-dependency> <release-version>0</release-version> <!-- XXX declare the impl dep somehow... --> </run-dependency> </dependency>
One more use case: I'm writing end2end module for Mobile Edition. The user (his current main project is mobile project ) needs to choose one web project he'd like to interact with. He gets the list of all web projects that are opened. If his web project is not opened , he will get a JFileChooser with all project's folders. After choosing one - the project should be opened.
Created attachment 19286 [details] apichanges
The module dependencies is not changed.
Note to Sigal (not directly related to this issue): making your own Open Project dialog is probably a bad idea; a lot of work went into the current dialog which you would not want to do without (or have to copy). Perhaps ProjectChooser.projectChooser will do what you want.
Created attachment 19290 [details] Added usecases
I have no comments. If you solved all Jesse's and Jarda's issues please go ahead and commit.
http://projects.netbeans.org/source/browse/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectList.java.diff?r1=1.26&r2=1.27 http://projects.netbeans.org/source/browse/projects/projectui/src/org/netbeans/modules/project/ui/OpenProjectsTrampolineImpl.java.diff?r1=1.3&r2=1.4 http://projects.netbeans.org/source/browse/projects/projectuiapi/apichanges.xml.diff?r1=1.1&r2=1.2 http://projects.netbeans.org/source/browse/projects/projectuiapi/src/org/netbeans/api/project/ui/OpenProjects.java.diff?r1=1.4&r2=1.5 http://projects.netbeans.org/source/browse/projects/projectuiapi/src/org/netbeans/modules/project/uiapi/OpenProjectsTrampoline.java.diff?r1=1.2&r2=1.3
Verified.