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