@Override public void doUpdate(@NotNull AnActionEvent event, final Map<String, Object> _params) { IBreakpoint breakpoint = BreakpointsUtil.MPS_BREAKPOINT.getData(event.getDataContext()); event .getPresentation() .setEnabled(breakpoint != null && breakpoint instanceof ILocationBreakpoint); }
@Override public void doExecute(@NotNull final AnActionEvent event, final Map<String, Object> _params) { IBreakpoint breakpoint = BreakpointsUtil.MPS_BREAKPOINT.getData(event.getDataContext()); if (breakpoint == null || !(breakpoint instanceof ILocationBreakpoint)) { return; } new EditorNavigator(((MPSProject) MapSequence.fromMap(_params).get("mpsProject"))) .shallFocus(false) .shallSelect(true) .open(((ILocationBreakpoint) breakpoint).getLocation().getNodePointer()); }