@Override public void doExecute(@NotNull final AnActionEvent event, final Map<String, Object> _params) { FeatureUsageTracker.getInstance().triggerFeatureUsed("navigation.goto.definition"); final SNode targetNode = APICellAdapter.getSNodeWRTReference( ((EditorCell) MapSequence.fromMap(_params).get("cell"))); NavigationSupport.getInstance() .openNode( ((IOperationContext) MapSequence.fromMap(_params).get("context")), targetNode, true, !(SNodeOperations.isRoot(targetNode))); }
@Override public boolean isApplicable(AnActionEvent event, final Map<String, Object> _params) { SNode targetNode = APICellAdapter.getSNodeWRTReference( ((EditorCell) MapSequence.fromMap(_params).get("cell"))); if (targetNode == null) { return false; } if (targetNode == ((EditorCell) MapSequence.fromMap(_params).get("cell")).getSNode()) { return false; } return true; }