@Inject public OpenInTerminalAction( CoreLocalizationConstant locale, MachineResources machineResources, ProcessesPanelPresenter processesPanelPresenter) { super( Collections.singletonList(PROJECT_PERSPECTIVE_ID), locale.openInTerminalAction(), null, machineResources.addTerminalIcon()); this.processesPanelPresenter = processesPanelPresenter; }
@Inject public CustomCommandType( MachineResources resources, IconRegistry iconRegistry, CustomPagePresenter page) { pages = new LinkedList<>(); pages.add(page); iconRegistry.registerIcon(new Icon("command.type." + ID, resources.customCommandType())); }
/** 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(); }
initWidget(UI_BINDER.createAndBindUi(this)); reRunProcessButton.add(new SVGImage(resources.reRunIcon())); stopProcessButton.add(new SVGImage(resources.stopIcon())); clearOutputsButton.add(new SVGImage(resources.clearOutputsIcon())); downloadOutputsButton.getElement().setInnerHTML(FontAwesome.DOWNLOAD); wrapTextButton.add(new SVGImage(resources.lineWrapIcon())); scrollToBottomButton.add(new SVGImage(resources.scrollToBottomIcon()));
@Override public SpanElement renderNodeContents(ProcessTreeNode node) { final ProcessTreeNodeRenderStrategy renderStrategy = renderStrategyMap.get(node.getType().getStringValue()); checkNotNull(renderStrategy, "Unknown node type"); final SpanElement spanElement = renderStrategy.renderSpanElementFor(node); addClassName(resources.getCss().processTreeNode(), spanElement); return spanElement; }
@Override public SVGResource getTitleIcon() { return resources.output(); }
Elements.createSpanElement(resources.getCss().newTerminalButton()); newTerminalButton.appendChild((Node) new SVGImage(resources.addTerminalIcon()).getElement()); root.appendChild(newTerminalButton); SpanElement sshButton = Elements.createSpanElement(resources.getCss().sshButton()); sshButton.setTextContent("SSH"); root.appendChild(sshButton); Element monitorsElement = Elements.createSpanElement(resources.getCss().machineMonitors()); root.appendChild(monitorsElement); monitorsElement.appendChild(monitorNode); Element nameElement = Elements.createSpanElement(resources.getCss().machineName()); nameElement.setTextContent(machineName); Tooltip.create(nameElement, BOTTOM, MIDDLE, machineName);
@Inject public ShowRuntimeInfoAction( Provider<ProcessesPanelPresenter> processesPanelPresenter, MachineResources resources, RuntimeInfoLocalization locale) { super( singletonList(PROJECT_PERSPECTIVE_ID), locale.showInfoActionTitle(), locale.showInfoActionDescription(), resources.remote()); this.processesPanelPresenter = processesPanelPresenter; }
@Inject public ReRunProcessAction( ProcessesPanelPresenter processesPanelPresenter, CoreLocalizationConstant locale, MachineResources machineResources) { super( singletonList(PROJECT_PERSPECTIVE_ID), locale.reRunControlTitle(), locale.reRunControlDescription(), machineResources.reRunIcon()); this.processesPanelPresenter = processesPanelPresenter; }
@Inject public EditConfigurationsAction( EditDebugConfigurationsPresenter editDebugConfigurationsPresenter, DebuggerLocalizationConstant localizationConstant, MachineResources resources) { super( Collections.singletonList(PROJECT_PERSPECTIVE_ID), localizationConstant.editDebugConfigurationsActionTitle(), localizationConstant.editDebugConfigurationsActionDescription(), resources.editCommands()); this.editCommandsPresenter = editDebugConfigurationsPresenter; }
@Override public void markProcessHasOutput(String processId) { if (processId.equals(activeProcessId)) { return; } final ProcessTreeNode treeNode = processTreeNodes.get(processId); if (treeNode != null) { treeNode.setHasUnreadContent(true); treeNode.getTreeNodeElement().getClassList().add(machineResources.getCss().badgeVisible()); } }
@Override public SVGResource getTitleIcon() { return resources.output(); }
public ShowServersAction(String machineName) { super( runtimeInfoLocalization.showInfoActionTitle(), runtimeInfoLocalization.showInfoActionDescription(), machineResources.remote()); this.machineName = machineName; }
@Override public void setStopButtonVisibility(String nodeId, boolean visible) { ProcessTreeNode processTreeNode = processTreeNodes.get(nodeId); if (processTreeNode == null) { return; } if (visible) { processTreeNode .getTreeNodeElement() .getClassList() .remove(machineResources.getCss().hideStopButton()); } else { processTreeNode .getTreeNodeElement() .getClassList() .add(machineResources.getCss().hideStopButton()); } }
@Inject public PreviewSSHAction( MachineResources resources, CoreLocalizationConstant constant, Provider<ProcessesPanelPresenter> processesPanelPresenter) { super( constant.machineSSHActionTitle(), constant.machineSSHActionDescription(), resources.output()); this.processesPanelPresenter = processesPanelPresenter; }
public NewTerminalMenuAction( CoreLocalizationConstant locale, MachineResources machineResources, String machineName) { super( locale.newTerminal(), locale.newTerminalDescription(), machineResources.addTerminalIcon()); this.machineName = machineName; }
@Override public void onPreviewServers(String machineId) { ProcessTreeNode machineTreeNode = findTreeNodeById(machineId); if (machineTreeNode == null || machineTreeNode.getType() != MACHINE_NODE) { return; } String machineName = (String) machineTreeNode.getData(); RuntimeImpl runtime = appContext.getWorkspace().getRuntime(); if (runtime == null) { return; } Optional<MachineImpl> machine = runtime.getMachineByName(machineName); if (!machine.isPresent()) { return; } List<RuntimeInfo> serverBindings = runtimeInfoProvider.get(machineName); Widget widget = runtimeInfoWidgetFactory.create(machineName, serverBindings); CompositeOutputConsole servers = commandConsoleFactory.create( widget, runtimeInfoLocalization.infoTabTitle(), resources.remote()); addCommandOutput(machineId, servers, true); }
@Override public void showProcessOutput(String processId) { if (!processWidgets.containsKey(processId)) { processId = ""; } onResize(); final WidgetToShow widgetToShow = processWidgets.get(processId); if (!focusedSubPanel.getAllWidgets().contains(widgetToShow)) { return; } final SubPanel subPanel = widget2Panels.get(widgetToShow); if (subPanel != null) { subPanel.activateWidget(widgetToShow); } activeProcessId = processId; final ProcessTreeNode treeNode = processTreeNodes.get(processId); if (treeNode != null && !MACHINE_NODE.equals(treeNode.getType())) { treeNode.setHasUnreadContent(false); treeNode.getTreeNodeElement().getClassList().remove(machineResources.getCss().badgeVisible()); } }
@Inject public DisplayMachineOutputAction( MachineResources resources, CoreLocalizationConstant constant, Provider<ProcessesPanelPresenter> processesPanelPresenter, EventBus eventBus) { super( constant.machineOutputActionTitle(), constant.machineOutputActionDescription(), resources.output()); this.processesPanelPresenter = processesPanelPresenter; this.eventBus = eventBus; }
@Inject public NewTerminalAction( CoreLocalizationConstant locale, MachineResources machineResources, ProcessesPanelPresenter processesPanelPresenter, EventBus eventBus) { super( Collections.singletonList(PROJECT_PERSPECTIVE_ID), locale.newTerminal(), locale.newTerminalDescription(), machineResources.addTerminalIcon()); this.processesPanelPresenter = processesPanelPresenter; eventBus.addHandler(ProcessTreeNodeSelectedEvent.TYPE, this); }