/** * Returns all currently open projects. Returns an empty array if no projects are open. * * @return The openProjects value */ public BProject[] getOpenProjects() { if (!myWrapper.isValid()) throw new ExtensionUnloadedException(); Collection projects = Project.getProjects(); BProject[] result = new BProject[projects.size()]; Iterator iter; int index; for (iter = projects.iterator(), index = 0; iter.hasNext(); index++) { Project prj = (Project) iter.next(); result[index] = prj.getBProject(); } return result; }