コード例 #1
0
 public void handleAction_impl(
     SNode parameterObject,
     SNode node,
     SModel model,
     IOperationContext operationContext,
     EditorContext editorContext) {
   SNode macro =
       SNodeFactoryOperations.createNewNode(NameUtil.nodeFQName(parameterObject), node);
   SNodeOperations.replaceWithAnother(node, macro);
   SelectionUtil.selectLabelCellAnSetCaret(editorContext, macro, SelectionManager.FIRST_CELL, 1);
   editorContext.openInspector();
 }
コード例 #2
0
ファイル: replace_node_macro.java プロジェクト: sprig/MPS
 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();
 }