package jetbrains.mps.debugger.java.evaluation.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; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; public class DownCastToLowLevel_Actions { public static void setCellActions(EditorCell editorCell, SNode node, EditorContext context) { editorCell.setAction(CellActionType.DELETE, new DownCastToLowLevel_Actions.DownCastToLowLevel_Actions_DELETE(node)); editorCell.setAction(CellActionType.BACKSPACE, new DownCastToLowLevel_Actions.DownCastToLowLevel_Actions_BACKSPACE(node)); } public static class DownCastToLowLevel_Actions_DELETE extends AbstractCellAction { /*package*/ SNode myNode; public DownCastToLowLevel_Actions_DELETE(SNode node) { this.myNode = node; } public String getDescriptionText() { return "remove downcast"; } public void execute(EditorContext editorContext) { this.execute_internal(editorContext, this.myNode); } public void execute_internal(EditorContext editorContext, SNode node) { SNodeOperations.replaceWithAnother(node, SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x7da4580f9d754603L, 0x816251a896d78375L, 0x6dd9f7bd221bb1d5L, 0x6dd9f7bd221bb39eL, "expression"))); } } public static class DownCastToLowLevel_Actions_BACKSPACE extends AbstractCellAction { /*package*/ SNode myNode; public DownCastToLowLevel_Actions_BACKSPACE(SNode node) { this.myNode = node; } public String getDescriptionText() { return "remove downcast"; } public void execute(EditorContext editorContext) { this.execute_internal(editorContext, this.myNode); } public void execute_internal(EditorContext editorContext, SNode node) { SNodeOperations.replaceWithAnother(node, SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x7da4580f9d754603L, 0x816251a896d78375L, 0x6dd9f7bd221bb1d5L, 0x6dd9f7bd221bb39eL, "expression"))); } } }