public boolean canExecute(final KeyEvent keyEvent, final EditorContext editorContext) { EditorCell contextCell = editorContext.getContextCell(); if ((contextCell == null)) { return false; } SNode contextNode = contextCell.getSNode(); if (contextNode == null) { return false; } if (contextNode.isInstanceOfConcept("jetbrains.mps.build.packaging.structure.Module")) { return true; } return false; }
public boolean canExecute(final KeyEvent keyEvent, final EditorContext editorContext) { EditorCell contextCell = editorContext.getContextCell(); if ((contextCell == null)) { return false; } SNode contextNode = contextCell.getSNode(); if (contextNode == null) { return false; } if (contextNode.isInstanceOfConcept( "jetbrains.mps.baseLanguage.structure.ParenthesizedExpression")) { return true; } return false; }
public void execute(final KeyEvent keyEvent, final EditorContext editorContext) { EditorCell contextCell = editorContext.getContextCell(); this.execute_internal( keyEvent, editorContext, contextCell.getSNode(), this.getSelectedNodes(editorContext)); }