Search in sources :

Example 1 with ProcessFinishedEvent

use of org.eclipse.che.ide.extension.machine.client.processes.ProcessFinishedEvent in project che by eclipse.

the class CommandOutputConsolePresenter method getProcessDiedOperation.

@Override
public Operation<ProcessDiedEventDto> getProcessDiedOperation() {
    return new Operation<ProcessDiedEventDto>() {

        @Override
        public void apply(ProcessDiedEventDto event) throws OperationException {
            finished = true;
            view.enableStopButton(false);
            view.toggleScrollToEndButton(false);
            eventBus.fireEvent(new ProcessFinishedEvent(pid));
        }
    };
}
Also used : ProcessFinishedEvent(org.eclipse.che.ide.extension.machine.client.processes.ProcessFinishedEvent) Operation(org.eclipse.che.api.promises.client.Operation) ProcessDiedEventDto(org.eclipse.che.api.machine.shared.dto.execagent.event.ProcessDiedEventDto)

Example 2 with ProcessFinishedEvent

use of org.eclipse.che.ide.extension.machine.client.processes.ProcessFinishedEvent in project che by eclipse.

the class ProcessesPanelPresenterTest method stopButtonShouldBeHiddenWhenProcessFinished.

@Test
public void stopButtonShouldBeHiddenWhenProcessFinished() {
    when(outputConsole.isFinished()).thenReturn(true);
    presenter.consoles.put(PROCESS_ID, outputConsole);
    presenter.onProcessFinished(new ProcessFinishedEvent(PID));
    verify(view).setStopButtonVisibility(PROCESS_ID, false);
}
Also used : ProcessFinishedEvent(org.eclipse.che.ide.extension.machine.client.processes.ProcessFinishedEvent) Test(org.junit.Test)

Aggregations

ProcessFinishedEvent (org.eclipse.che.ide.extension.machine.client.processes.ProcessFinishedEvent)2 ProcessDiedEventDto (org.eclipse.che.api.machine.shared.dto.execagent.event.ProcessDiedEventDto)1 Operation (org.eclipse.che.api.promises.client.Operation)1 Test (org.junit.Test)1