use of org.eclipse.che.ide.debug.Debugger in project che by eclipse.
the class DebuggerPresenter method onExpandVariablesTree.
@Override
public void onExpandVariablesTree() {
List<? extends Variable> rootVariables = selectedVariable.getVariables();
if (rootVariables.isEmpty()) {
Debugger debugger = debuggerManager.getActiveDebugger();
if (debugger != null) {
Promise<SimpleValue> promise = debugger.getValue(selectedVariable);
promise.then(new Operation<SimpleValue>() {
@Override
public void apply(SimpleValue arg) throws OperationException {
selectedVariable.setValue(arg.getValue());
view.setVariablesIntoSelectedVariable(arg.getVariables());
view.updateSelectedVariable();
}
}).catchError(new Operation<PromiseError>() {
@Override
public void apply(PromiseError arg) throws OperationException {
notificationManager.notify(constant.failedToGetVariableValueTitle(), arg.getMessage(), FAIL, FLOAT_MODE);
}
});
}
}
}
use of org.eclipse.che.ide.debug.Debugger in project che by eclipse.
the class DisconnectDebuggerAction method updateInPerspective.
@Override
public void updateInPerspective(ActionEvent event) {
Debugger debugger = debuggerManager.getActiveDebugger();
event.getPresentation().setEnabled(debugger != null && debugger.isConnected());
}
use of org.eclipse.che.ide.debug.Debugger in project che by eclipse.
the class ResumeExecutionAction method updateInPerspective.
@Override
public void updateInPerspective(ActionEvent event) {
Debugger debugger = debuggerManager.getActiveDebugger();
event.getPresentation().setEnabled(debugger != null && debugger.isSuspended());
}
use of org.eclipse.che.ide.debug.Debugger in project che by eclipse.
the class StepOutAction method updateInPerspective.
@Override
public void updateInPerspective(ActionEvent event) {
Debugger debugger = debuggerManager.getActiveDebugger();
event.getPresentation().setEnabled(debugger != null && debugger.isSuspended());
}
use of org.eclipse.che.ide.debug.Debugger in project che by eclipse.
the class SuspendAction method updateInPerspective.
@Override
public void updateInPerspective(ActionEvent event) {
final Presentation presentation = event.getPresentation();
final Debugger debugger = debuggerManager.getActiveDebugger();
if (debugger == null) {
presentation.setEnabledAndVisible(false);
return;
}
//Workaround: we don't support this action for another types of debugger
presentation.setVisible("gdb".equals(debugger.getDebuggerType()));
presentation.setEnabled(debugger.isConnected() && !debugger.isSuspended());
}
Aggregations