use of org.eclipse.che.api.core.model.machine.Machine in project che by eclipse.
the class SshMachineInstanceProviderTest method shouldThrowExceptionOnDevMachineCreationFromRecipe.
@Test(expectedExceptions = MachineException.class, expectedExceptionsMessageRegExp = "Dev machine is not supported for Ssh machine implementation")
public void shouldThrowExceptionOnDevMachineCreationFromRecipe() throws Exception {
Machine machine = createMachine(true);
provider.createInstance(machine, LineConsumer.DEV_NULL);
}
use of org.eclipse.che.api.core.model.machine.Machine in project che by eclipse.
the class ServerPortProvider method registerProviders.
private void registerProviders() {
Machine devMachine = appContext.getDevMachine();
if (devMachine != null) {
providers = getProviders(devMachine);
commandPropertyRegistry.register(providers);
}
}
use of org.eclipse.che.api.core.model.machine.Machine in project che by eclipse.
the class ExecuteSelectedCommandAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
CommandImpl command = selectCommandAction.getSelectedCommand();
Machine machine = selectCommandAction.getSelectedMachine();
if (command != null && machine != null) {
commandManager.executeCommand(command, machine);
}
}
use of org.eclipse.che.api.core.model.machine.Machine in project che by eclipse.
the class SelectCommandComboBox method getMachines.
private List<MachineEntity> getMachines(Workspace workspace) {
WorkspaceRuntime workspaceRuntime = workspace.getRuntime();
if (workspaceRuntime == null) {
return emptyList();
}
List<? extends Machine> runtimeMachines = workspaceRuntime.getMachines();
List<MachineEntity> machines = new ArrayList<>(runtimeMachines.size());
for (Machine machine : runtimeMachines) {
if (machine instanceof MachineDto) {
MachineEntity machineEntity = entityFactory.createMachine((MachineDto) machine);
machines.add(machineEntity);
}
}
return machines;
}
use of org.eclipse.che.api.core.model.machine.Machine in project che by eclipse.
the class MachinePanelPresenter method getMachines.
private List<MachineEntity> getMachines(Workspace workspace) {
WorkspaceRuntime workspaceRuntime = workspace.getRuntime();
if (workspaceRuntime == null) {
return emptyList();
}
List<? extends Machine> runtimeMachines = workspaceRuntime.getMachines();
List<MachineEntity> machines = new ArrayList<>(runtimeMachines.size());
for (Machine machine : runtimeMachines) {
if (machine instanceof MachineDto) {
MachineEntity machineEntity = entityFactory.createMachine((MachineDto) machine);
machines.add(machineEntity);
}
}
return machines;
}
Aggregations