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.
I need API to get all opened projects. Replacement to temporary workaround: // XXX there is planed better api to get all opened projects GlobalPathRegistry registry = GlobalPathRegistry.getDefault(); Set sourceRoots = registry.getPaths(ClassPath.SOURCE); Iterator it = sourceRoots.iterator(); while (it.hasNext()) { ClassPath next = (ClassPath) it.next(); FileObject[] roots = next.getRoots(); if (roots == null || roots.length == 0) continue; Project project = FileOwnerQuery.getOwner(roots[0]); if (projects.contains(project)) continue; projects.add(project); Sources sources = (Sources) project.getLookup().lookup(Sources.class); I expect ProjectManager's method: public Project[] getAllOpened();
Jesse do you really want me to do it? The last decision was to avoid it. I'm confused
Well, last decision was to add it. With Javadoc describing valid vs. invalid usages.
Not the very last one. Then we found that for debuuger are MainProject and Project sensitive actions enough. Form the bug I can't tell whether it would help you as well. Would you be so kind and specify why you are requesting it.
I need to list all opened projects. I have window with global action: find TODOs in selected folder. The globalness is mapped to all opened projects. User can choose arbitrary folder from any opened project.
I believe this use case does require such an API.
Finally decided to publish the list of open project. Thus making it a defect and setting the TM to promo-d
The API is in, including tests. See org.netbeans.api.project.ui.OpenProjects.
Thanks. Support for PCLs is an extra (from my side).
Not enlisted in Public-Packages attribute.
Oops. Sorry.