private void execute_internal( final KeyEvent keyEvent, final EditorContext editorContext, final SNode node, final List<SNode> selectedNodes) { SNode nodeMacro = QueriesUtil.addNodeMacro(node); // set caret editorContext.selectAndSetCaret(nodeMacro, 1); }
private void execute_internal( final KeyEvent keyEvent, final EditorContext editorContext, final SNode node, final List<SNode> selectedNodes) { SNode propertyMacro = QueriesUtil.addPropertyMacro(node, editorContext.getSelectedCell()); // set caret editorContext.selectAndSetCaret(propertyMacro, 0); EditorInspector inspector = editorContext.getInspector(); assert inspector != null; inspector.activate(); }
public void handleAction_impl( SNode parameterObject, SNode node, SModel model, IScope scope, IOperationContext operationContext, EditorContext editorContext) { SNode macro = SNodeFactoryOperations.createNewNode(NameUtil.nodeFQName(parameterObject), node); SNodeOperations.replaceWithAnother(node, macro); editorContext.selectAndSetCaret(macro, 1); editorContext.openInspector(); }
private void execute_internal( final KeyEvent keyEvent, final EditorContext editorContext, final SNode node, final List<SNode> selectedNodes) { SNode referenceMacro = QueriesUtil.addReferenceMacro( node, (jetbrains.mps.nodeEditor.cells.EditorCell) editorContext.getSelectedCell()); // set caret editorContext.selectAndSetCaret(referenceMacro, 2); EditorInspector inspector = editorContext.getInspector(); assert inspector != null; inspector.activate(); }