GraphicElementManager[] resourcesManagers = UIServices.lookup().getGraphicElementManagers();
for (int i = 0; i < resourcesManagers.length; i++) {
GraphicElementManager manager = resourcesManagers[i];
GraphicElement[] elements = manager.getElements(workspaceId, sectionId, panelId);
for (int j = 0; j < elements.length; j++) {
GraphicElement graphicElement = elements[j];
if ((resourceType != null && resourceType.equals(graphicElement.getCategoryName())) || resourceType == null) {
if (manager.isBaseElement(graphicElement) && !includeBase) {
log.debug("Excluding global element from selection.");
} else {
resourcesToShow.add(graphicElement);
log.debug("Adding element to selection.");
}
}
}
}
if (resourcesToShow.isEmpty()) {
renderFragment("empty");
} else {
renderFragment("outputStart");
for (int i = 0; i < resourcesToShow.size(); i++) {
GraphicElement graphicElement = (GraphicElement) resourcesToShow.get(i);
setAttribute("graphicElement", graphicElement);
setAttribute("description", LocalizeTag.getLocalizedValue(graphicElement.getDescription(), SessionManager.getLang(), true));
setAttribute("id", graphicElement.getId());
setAttribute("class", graphicElement.getClass().getName());
setAttribute("type", graphicElement.getCategoryName());
setAttribute("count", i + 1);
setAttribute("index", i);
renderFragment("output");
}
renderFragment("outputEnd");