/** * Returns the currently open editors for the given type in order of most recently focused * * @throws MapperException */ public Collection<ResourceEditor> getOpenEditors(ResourceType type) throws MapperException { Collection<ResourceEditor> editors = new ArrayList<ResourceEditor>(); for (ResourceEditor editor : openEditors.values()) { if (type == ResourceType.forId(getResourceForEditor(editor).getType())) editors.add(editor); } return editors; }
/** * Returns the currently open editors for the given type in order of most recently focused * * @throws MapperException */ public Collection<IResource> getOpenResources(ResourceType type) throws MapperException { Collection<IResource> resources = new ArrayList<>(); for (ResourceEditor editor : openEditors.values()) { if (type == ResourceType.forId(getResourceForEditor(editor).getType())) resources.add(getResourceForEditor(editor)); } return resources; }