@Inject public MavenCommandType( MavenResources resources, MavenCommandPagePresenter page, IconRegistry iconRegistry) { pages = new LinkedList<>(); pages.add(page); iconRegistry.registerIcon(new Icon("command.type." + ID, resources.maven())); }
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; }
@Inject public GwtCommandType( GwtResources resources, GwtCommandPagePresenter page, CurrentProjectPathMacro currentProjectPathMacro, DevMachineHostNameMacro devMachineHostNameMacro, IconRegistry iconRegistry) { this.currentProjectPathMacro = currentProjectPathMacro; this.devMachineHostNameMacro = devMachineHostNameMacro; pages = new LinkedList<>(); pages.add(page); iconRegistry.registerIcon(new Icon("command.type." + ID, resources.gwtCommandType())); }
/** 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; } }
@Inject public CustomCommandType( MachineResources resources, IconRegistry iconRegistry, CustomPagePresenter page) { pages = new LinkedList<>(); pages.add(page); iconRegistry.registerIcon(new Icon("command.type." + ID, resources.customCommandType())); }
@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(); }
@Inject private void prepareActions(NodeJsResources resources, IconRegistry iconRegistry) { iconRegistry.registerIcon( new Icon(NODE_JS_CATEGORY + ".samples.category.icon", resources.jsIcon())); } }
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; }
@Inject private void registerIcons(IconRegistry iconRegistry, JavaResources resources) { // icon for category in Wizard iconRegistry.registerIcon( new Icon(Constants.JAVA_CATEGORY + ".samples.category.icon", resources.javaCategoryIcon())); } }
Icon icon = iconRegistry.getIconIfExist(categoryTitle + ".debug.configuration.type.icon"); if (icon != null) { final SVGImage iconSVG = icon.getSVGImage();
@Inject public NodeJsDebuggerConfigurationType( NodeJsDebuggerConfigurationPagePresenter page, IconRegistry iconRegistry, NodeJsDebuggerResources resources) { this.page = page; iconRegistry.registerIcon( new Icon( NodeJsDebugger.ID + ".debug.configuration.type.icon", resources.nodeJsDebugConfigurationType())); }
@Inject public GwtCheCommandType(PluginsResources resources, IconRegistry iconRegistry) { iconRegistry.registerIcon(new Icon("command.type." + ID, resources.gwtCheCommandType())); }
@Inject public DefaultIconsRegistrar(IconRegistry iconRegistry, Resources resources) { iconRegistry.registerIcon( new Icon( "default.projecttype.small.icon", "default/project.png", resources.defaultProject())); iconRegistry.registerIcon( new Icon("default.folder.small.icon", "default/folder.png", resources.defaultFolder())); iconRegistry.registerIcon( new Icon("default.file.small.icon", "default/file.png", resources.defaultFile())); iconRegistry.registerIcon(new Icon("default", "default/default.jpg", resources.defaultIcon())); } }
@Inject public JavaCommandType( JavaResources resources, JavaCommandPagePresenter page, CurrentProjectPathMacro currentProjectPathMacro, SourcepathMacro sourcepathMacro, OutputDirMacro outputDirMacro, ClasspathMacro classpathMacro, IconRegistry iconRegistry, JavaLocalizationConstant localizationConstants) { this.currentProjectPathMacro = currentProjectPathMacro; this.sourcepathMacro = sourcepathMacro; this.outputDirMacro = outputDirMacro; this.classpathMacro = classpathMacro; this.localizationConstants = localizationConstants; pages = new LinkedList<>(); pages.add(page); iconRegistry.registerIcon(new Icon("command.type." + ID, resources.javaCategoryIcon())); }
/** Instantiates {@link StandardComponentInitializer} an creates standard content. */ @Inject public StandardComponentInitializer( IconRegistry iconRegistry, MachineResources machineResources, StandardComponentInitializer.ParserResource parserResource) { iconRegistry.registerIcon( new Icon(BLANK_CATEGORY + ".samples.category.icon", parserResource.samplesCategoryBlank())); iconRegistry.registerIcon(new Icon("che.machine.icon", machineResources.devMachine())); machineResources.getCss().ensureInjected(); }
/** * Web Extension adds JavaScript, HTML and CSS Support to IDE Application. It provides syntax * highlighting for CSS, JS, HTML files and code completion features for CSS files to IDE. */ @Inject public WebExtension( HtmlEditorProvider htmlEditorProvider, JsEditorProvider jsEditorProvider, EditorRegistry editorRegistry, WebExtensionResource resources, IconRegistry iconRegistry, @Named("JSFileType") FileType jsFile, @Named("HTMLFileType") FileType htmlFile, @Named("ES6FileType") FileType es6File, @Named("JSXFileType") FileType jsxFile) { // register new Icon for javascript project type iconRegistry.registerIcon( new Icon("JavaScript.samples.category.icon", resources.samplesCategoryJs())); editorRegistry.registerDefaultEditor(jsFile, jsEditorProvider); editorRegistry.registerDefaultEditor(es6File, jsEditorProvider); editorRegistry.registerDefaultEditor(jsxFile, jsEditorProvider); editorRegistry.registerDefaultEditor(htmlFile, htmlEditorProvider); }
@Inject private void prepareActions( CreateCeylonFileAction createCeylonFileAction, ActionManager actionManager, CeylonResources resources, IconRegistry iconRegistry) { DefaultActionGroup newGroup = (DefaultActionGroup) actionManager.getAction(GROUP_FILE_NEW); actionManager.registerAction("newCeylonFile", createCeylonFileAction); newGroup.add(createCeylonFileAction); iconRegistry.registerIcon( new Icon(CEYLON_CATEGORY + ".samples.category.icon", resources.category())); } }
@Inject private void prepareActions( CreatePhpSourceFileAction phpSourceFileAction, ActionManager actionManager, PhpResources resources, IconRegistry iconRegistry) { DefaultActionGroup newGroup = (DefaultActionGroup) actionManager.getAction(GROUP_FILE_NEW); actionManager.registerAction("newPhpFile", phpSourceFileAction); newGroup.add(phpSourceFileAction); iconRegistry.registerIcon( new Icon(PHP_CATEGORY + ".samples.category.icon", resources.category())); } }
@Inject private void prepareActions( CreateCSharpSourceFileAction csharpSourceFileAction, ActionManager actionManager, CSharpResources resources, IconRegistry iconRegistry) { DefaultActionGroup newGroup = (DefaultActionGroup) actionManager.getAction(GROUP_FILE_NEW); actionManager.registerAction("newCSharpFile", csharpSourceFileAction); newGroup.add(csharpSourceFileAction); iconRegistry.registerIcon( new Icon(CSHARP_CATEGORY + ".samples.category.icon", resources.category())); } }