use of org.eclipse.che.api.debug.shared.dto.action.StepOutActionDto in project che by eclipse.
the class DebuggerTest method testStepOut.
@Test
public void testStepOut() throws Exception {
StepOutActionDto stepOutAction = mock(StepOutActionDto.class);
doReturn(promiseVoid).when(service).stepOut(SESSION_ID, stepOutAction);
doReturn(stepOutAction).when(dtoFactory).createDto(StepOutActionDto.class);
debugger.stepOut();
verify(observer).onPreStepOut();
assertTrue(debugger.isConnected());
verify(promiseVoid).catchError(operationPromiseErrorCaptor.capture());
operationPromiseErrorCaptor.getValue().apply(promiseError);
verify(promiseError).getCause();
}
use of org.eclipse.che.api.debug.shared.dto.action.StepOutActionDto in project che by eclipse.
the class AbstractDebugger method stepOut.
@Override
public void stepOut() {
if (isConnected()) {
for (DebuggerObserver observer : observers) {
observer.onPreStepOut();
}
removeCurrentLocation();
preserveDebuggerState();
StepOutActionDto action = dtoFactory.createDto(StepOutActionDto.class);
action.setType(Action.TYPE.STEP_OUT);
Promise<Void> promise = service.stepOut(debugSessionDto.getId(), action);
promise.catchError(new Operation<PromiseError>() {
@Override
public void apply(PromiseError arg) throws OperationException {
Log.error(AbstractDebugger.class, arg.getCause());
}
});
}
}
Aggregations