public void execute(jetbrains.mps.openapi.editor.EditorContext context) { EditorCell selection = (EditorCell) context.getSelectedCell(); ((EditorComponent) context.getEditorComponent()) .activateNodeSubstituteChooser( selection, ((selection instanceof EditorCell_Label) && ((EditorCell_Label) selection).isEverythingSelected()), true); }
public boolean canExecute(jetbrains.mps.openapi.editor.EditorContext context) { EditorCell selection = (EditorCell) context.getSelectedCell(); return selection != null && selection.getSubstituteInfo() != null; }