예제 #1
0
 @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)));
 }
예제 #2
0
 @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;
 }