Search in sources :

Example 11 with DebuggerObserver

use of org.eclipse.che.ide.debug.DebuggerObserver 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());
            }
        });
    }
}
Also used : JsPromiseError(org.eclipse.che.api.promises.client.js.JsPromiseError) PromiseError(org.eclipse.che.api.promises.client.PromiseError) StepOutActionDto(org.eclipse.che.api.debug.shared.dto.action.StepOutActionDto) DebuggerObserver(org.eclipse.che.ide.debug.DebuggerObserver) OperationException(org.eclipse.che.api.promises.client.OperationException)

Aggregations

OperationException (org.eclipse.che.api.promises.client.OperationException)11 PromiseError (org.eclipse.che.api.promises.client.PromiseError)11 JsPromiseError (org.eclipse.che.api.promises.client.js.JsPromiseError)11 DebuggerObserver (org.eclipse.che.ide.debug.DebuggerObserver)11 Operation (org.eclipse.che.api.promises.client.Operation)6 DebugSessionDto (org.eclipse.che.api.debug.shared.dto.DebugSessionDto)2 LocationDto (org.eclipse.che.api.debug.shared.dto.LocationDto)2 DebuggerInfo (org.eclipse.che.api.debug.shared.model.DebuggerInfo)2 Breakpoint (org.eclipse.che.ide.api.debug.Breakpoint)2 DebuggerDescriptor (org.eclipse.che.ide.debug.DebuggerDescriptor)2 BreakpointDto (org.eclipse.che.api.debug.shared.dto.BreakpointDto)1 ResumeActionDto (org.eclipse.che.api.debug.shared.dto.action.ResumeActionDto)1 StepIntoActionDto (org.eclipse.che.api.debug.shared.dto.action.StepIntoActionDto)1 StepOutActionDto (org.eclipse.che.api.debug.shared.dto.action.StepOutActionDto)1 StepOverActionDto (org.eclipse.che.api.debug.shared.dto.action.StepOverActionDto)1 DebuggerEventDto (org.eclipse.che.api.debug.shared.dto.event.DebuggerEventDto)1 Function (org.eclipse.che.api.promises.client.Function)1 Promise (org.eclipse.che.api.promises.client.Promise)1 JsPromise (org.eclipse.che.api.promises.client.js.JsPromise)1 WsAgentStateEvent (org.eclipse.che.ide.api.machine.events.WsAgentStateEvent)1