private SVGResource getCommandGoalIcon() { final String goalId = commandGoal.getId(); final Icon icon = iconRegistry.getIconIfExist("command.goal." + goalId); if (icon != null) { final SVGImage svgImage = icon.getSVGImage(); if (svgImage != null) { return icon.getSVGResource(); } } return null; } }
/** Returns the icon for the given command type ID or {@code null} if none. */ @Nullable public SVGResource getCommandTypeIcon(String typeId) { final Optional<CommandType> commandType = commandTypeRegistry.getCommandTypeById(typeId); if (commandType.isPresent()) { final Icon icon = iconRegistry.getIconIfExist("command.type." + commandType.get().getId()); if (icon != null) { final SVGImage svgImage = icon.getSVGImage(); if (svgImage != null) { return icon.getSVGResource(); } } } return null; }
/** Returns the icon for the given command goal ID or {@code null} if none. */ @Nullable public SVGResource getCommandGoalIcon(String goalId) { final Optional<CommandGoal> goalOptional = goalRegistry.getPredefinedGoalById(goalId); if (goalOptional.isPresent()) { final Icon icon = iconRegistry.getIconIfExist("command.goal." + goalOptional.get().getId()); if (icon != null) { final SVGImage svgImage = icon.getSVGImage(); if (svgImage != null) { return icon.getSVGResource(); } } } return null; } }
@Nullable @Override public SVGResource getTitleImage() { final VirtualFile file = getEditorInput().getFile(); if (file instanceof CommandFileNode) { final CommandImpl command = ((CommandFileNode) file).getData(); final Icon icon = iconRegistry.getIconIfExist("command.type." + command.getType()); if (icon != null) { final SVGImage svgImage = icon.getSVGImage(); if (svgImage != null) { return icon.getSVGResource(); } } } return input.getSVGResource(); }
private Element renderCategoryHeader(String category) { SpanElement categoryElement = Document.get().createSpanElement(); categoryElement.setClassName(resources.defaultCategoriesListCss().headerText()); SpanElement iconElement = Document.get().createSpanElement(); categoryElement.appendChild(iconElement); SpanElement textElement = Document.get().createSpanElement(); categoryElement.appendChild(textElement); textElement.setInnerText(category); Icon icon = iconRegistry.getIconIfExist(category + ".samples.category.icon"); if (icon != null) { final SVGImage iconSVG = icon.getSVGImage(); if (iconSVG != null) { iconElement.appendChild(iconSVG.getElement()); return categoryElement; } } return categoryElement; }
if (proposal.getIcon() != null && proposal.getIcon().getSVGImage() != null) { icon.appendChild((Node) proposal.getIcon().getSVGImage().getElement()); } else if (proposal.getIcon() != null && proposal.getIcon().getImage() != null) { icon.appendChild((Node) proposal.getIcon().getImage().getElement());
final SVGImage iconSVG = icon.getSVGImage(); if (iconSVG != null) { iconElement.appendChild(iconSVG.getElement());