Toggle navigation
Home
org.eclipse.che.ide.api.machine.MachineEntity to org.eclipse.che.ide.api.workspace.model.MachineImpl
No. of Instances - 66
No. of Commits - 2
No. of Projects - {'che'}
Hierarchy/Composition: SIBLING
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Cascading Type Change (Similar)
MachineEntity
to
MachineImpl
MachineEntity
to
MachineImpl
MachineEntity
to
MachineImpl
Cascading Type Change (Different)
ExecutorBody<MachineEntity>
to
ExecutorBody<MachineImpl>
ExecutorBody<MachineEntity>
to
ExecutorBody<MachineImpl>
Add or Remove Method invocation
machine.getId()
to
machine.getName()
hasAgent(machine.getDisplayName(),TERMINAL_AGENT)
to
hasAgent(machine.getName(),TERMINAL_AGENT)
hasAgent(machine.getDisplayName(),SSH_AGENT)
to
hasAgent(machine.getName(),SSH_AGENT)
machineId.equals(machine.getId())
to
machineId.equals(machine.getName())
appContext
to
runtime.getMachines()
appContext.getActiveRuntime()
to
runtime
machine.isDev()
to
machine.getServerByName(WSAGENT_REFERENCE).isPresent()
machine.isDev()
to
machine.getServerByName(WSAGENT_REFERENCE).isPresent()
machineId.equals(machineEntity.getId())
to
machineId.equals(machineEntity.getName())
machine.getId()
to
machine.getName()
machine.getDisplayName()
to
machine.getName()
machinesById.put(machine.getId(),machine)
to
machinesById.put(machine.getName(),machine)
machinesList.addItem(machine.getName(),machine.getId())
to
machinesList.addItem(machine.getName())
machine.getId()
to
machine.getName()
machine.getId()
to
machine.getName()
machine.getId()
to
machine.getName()
execAgentClient.getProcess(machine.getId(),pid)
to
execAgentClient.getProcess(machine.getName(),pid)
workspaceRuntime.getMachines()
to
runtime.getMachines().values()
getText(devMachine.getId())
to
getText(devMachine.getName())
execAgentCommandManager.getProcesses(machine.getId(),false).onSuccess(new BiConsumer<String,List<GetProcessesResponseDto>>(){ @Override public void accept( String endpointId, List<GetProcessesResponseDto> processes){ for ( GetProcessesResponseDto process : processes) { final int pid=process.getPid(); final String type=process.getType(); if (!isNullOrEmpty(process.getCommandLine()) && process.getCommandLine().startsWith("#hidden")) { continue; } if (commandTypeRegistry.getCommandTypeById(type).isPresent()) { final String processName=process.getName(); final CommandImpl commandByName=getWorkspaceCommandByName(processName); if (commandByName == null) { final String commandLine=process.getCommandLine(); final CommandImpl command=new CommandImpl(processName,commandLine,type); final CommandOutputConsole console=commandConsoleFactory.create(command,machine); getAndPrintProcessLogs(console,pid); subscribeToProcess(console,pid); addCommandOutput(machine.getId(),console); } else { macroProcessorProvider.get().expandMacros(commandByName.getCommandLine()).then(new Operation<String>(){ @Override public void apply( String expandedCommandLine) throws OperationException { final CommandImpl command=new CommandImpl(commandByName.getName(),expandedCommandLine,commandByName.getType(),commandByName.getAttributes()); final CommandOutputConsole console=commandConsoleFactory.create(command,machine); getAndPrintProcessLogs(console,pid); subscribeToProcess(console,pid); addCommandOutput(machine.getId(),console); } } ); } } } } private void getAndPrintProcessLogs( final CommandOutputConsole console, final int pid){ String from=null; String till=null; int limit=50; int skip=0; execAgentCommandManager.getProcessLogs(machine.getId(),pid,from,till,limit,skip).onSuccess(logs -> { for ( GetProcessLogsResponseDto log : logs) { String text=log.getText(); console.printOutput(text); } } ).onFailure((s,error) -> Log.error(getClass(),"Error trying to get process log with pid: " + pid + ". "+ error.getMessage())); } private void subscribeToProcess( CommandOutputConsole console, int pid){ String stderr="stderr"; String stdout="stdout"; String processStatus="process_status"; String after=null; execAgentCommandManager.subscribe(machine.getId(),pid,asList(stderr,stdout,processStatus),after).thenIfProcessStartedEvent(console.getProcessStartedConsumer()).thenIfProcessDiedEvent(console.getProcessDiedConsumer()).thenIfProcessStdOutEvent(console.getStdOutConsumer()).thenIfProcessStdErrEvent(console.getStdErrConsumer()).then(console.getProcessSubscribeConsumer()); } } )
to
execAgentCommandManager.getProcesses(machine.getName(),false).onSuccess(new BiConsumer<String,List<GetProcessesResponseDto>>(){ @Override public void accept( String endpointId, List<GetProcessesResponseDto> processes){ for ( GetProcessesResponseDto process : processes) { final int pid=process.getPid(); final String type=process.getType(); if (!isNullOrEmpty(process.getCommandLine()) && process.getCommandLine().startsWith("#hidden")) { continue; } if (commandTypeRegistry.getCommandTypeById(type).isPresent()) { final String processName=process.getName(); final CommandImpl commandByName=getWorkspaceCommandByName(processName); if (commandByName == null) { final String commandLine=process.getCommandLine(); final CommandImpl command=new CommandImpl(processName,commandLine,type); final CommandOutputConsole console=commandConsoleFactory.create(command,machine); getAndPrintProcessLogs(console,pid); subscribeToProcess(console,pid); addCommandOutput(machine.getName(),console); } else { macroProcessorProvider.get().expandMacros(commandByName.getCommandLine()).then(new Operation<String>(){ @Override public void apply( String expandedCommandLine) throws OperationException { final CommandImpl command=new CommandImpl(commandByName.getName(),expandedCommandLine,commandByName.getType(),commandByName.getAttributes()); final CommandOutputConsole console=commandConsoleFactory.create(command,machine); getAndPrintProcessLogs(console,pid); subscribeToProcess(console,pid); addCommandOutput(machine.getName(),console); } } ); } } } } private void getAndPrintProcessLogs( final CommandOutputConsole console, final int pid){ String from=null; String till=null; int limit=50; int skip=0; execAgentCommandManager.getProcessLogs(machine.getName(),pid,from,till,limit,skip).onSuccess(logs -> { for ( GetProcessLogsResponseDto log : logs) { String text=log.getText(); console.printOutput(text); } } ).onFailure((s,error) -> Log.error(getClass(),"Error trying to get process log with pid: " + pid + ". "+ error.getMessage())); } private void subscribeToProcess( CommandOutputConsole console, int pid){ String stderr="stderr"; String stdout="stdout"; String processStatus="process_status"; String after=null; execAgentCommandManager.subscribe(machine.getName(),pid,asList(stderr,stdout,processStatus),after).thenIfProcessStartedEvent(console.getProcessStartedConsumer()).thenIfProcessDiedEvent(console.getProcessDiedConsumer()).thenIfProcessStdOutEvent(console.getStdOutConsumer()).thenIfProcessStdErrEvent(console.getStdErrConsumer()).then(console.getProcessSubscribeConsumer()); } } )
machine.getId()
to
machine.getName()
Rename Method invocation
getId
to
getName
getId
to
getName
getId
to
getName
Rename Variable
machineEntity
to
machine
machineEntity
to
machine