use of org.eclipse.che.api.core.model.workspace.WorkspaceRuntime in project che by eclipse.
the class ProcessesPanelPresenter 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.workspace.WorkspaceRuntime in project che by eclipse.
the class WorkspaceEventsHandler method getDevMachineName.
private String getDevMachineName(final WorkspaceDto workspace) {
WorkspaceRuntime runtime = workspace.getRuntime();
if (runtime == null) {
return null;
}
String activeEnv = runtime.getActiveEnv();
EnvironmentDto environment = workspace.getConfig().getEnvironments().get(activeEnv);
if (environment != null) {
return Utils.getDevMachineName(environment);
}
// if no machine with ws-agent found
return null;
}
use of org.eclipse.che.api.core.model.workspace.WorkspaceRuntime 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.workspace.WorkspaceRuntime 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