use of org.eclipse.che.ide.extension.machine.client.machine.MachineItem in project che by eclipse.
the class ProcessesPanelPresenter method printMachineOutput.
/**
* Prints text to the machine console.
*
* @param machineName
* machine name
* @param text
* text to be printed
*/
public void printMachineOutput(final String machineName, final String text) {
// Create a temporary machine node to display outputs.
if (!consoles.containsKey(machineName)) {
MachineDto machineDto = dtoFactory.createDto(MachineDto.class).withId(machineName).withStatus(CREATING).withConfig(dtoFactory.createDto(MachineConfigDto.class).withDev("dev-machine".equals(machineName)).withName(machineName).withType("docker"));
provideMachineNode(new MachineItem(machineDto), true);
}
OutputConsole console = consoles.get(machineName);
if (console != null && console instanceof DefaultOutputConsole) {
((DefaultOutputConsole) console).printText(text);
}
}
Aggregations