package jetbrains.mps.baseLanguage.lightweightdsl.editor; /*Generated by MPS */ import jetbrains.mps.openapi.editor.cells.EditorCell; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.openapi.editor.EditorContext; import jetbrains.mps.openapi.editor.cells.CellActionType; import jetbrains.mps.editor.runtime.cells.AbstractCellAction; public class Placeholder2RealObject { public static void setCellActions(EditorCell editorCell, SNode node, EditorContext context) { editorCell.setAction(CellActionType.INSERT, new Placeholder2RealObject.Placeholder2RealObject_INSERT(node)); editorCell.setAction(CellActionType.INSERT_BEFORE, new Placeholder2RealObject.Placeholder2RealObject_INSERT_BEFORE(node)); } public static class Placeholder2RealObject_INSERT extends AbstractCellAction { /*package*/ SNode myNode; public Placeholder2RealObject_INSERT(SNode node) { this.myNode = node; } public void execute(EditorContext editorContext) { this.execute_internal(editorContext, this.myNode); } public void execute_internal(EditorContext editorContext, SNode node) { EditorUtil.substitutePlaceholder(node); } } public static class Placeholder2RealObject_INSERT_BEFORE extends AbstractCellAction { /*package*/ SNode myNode; public Placeholder2RealObject_INSERT_BEFORE(SNode node) { this.myNode = node; } public void execute(EditorContext editorContext) { this.execute_internal(editorContext, this.myNode); } public void execute_internal(EditorContext editorContext, SNode node) { EditorUtil.substitutePlaceholder(node); } } }