Commit 4b5e6b55 authored by André Pacak's avatar André Pacak

make records and variants look better (list sperated by commas, use : for inside of entries)

parent f82ad822
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -15,6 +15,7 @@
<language id="18bc6592-03a6-4e29-a83a-7ff23bde13ba" name="jetbrains.mps.lang.editor">
<concept id="1071666914219" name="jetbrains.mps.lang.editor.structure.ConceptEditorDeclaration" flags="ig" index="24kQdi" />
<concept id="1140524381322" name="jetbrains.mps.lang.editor.structure.CellModel_ListWithRole" flags="ng" index="2czfm3">
<property id="1140524450557" name="separatorText" index="2czwfO" />
<child id="1140524464360" name="cellLayout" index="2czzBx" />
</concept>
<concept id="1106270571710" name="jetbrains.mps.lang.editor.structure.CellLayout_Vertical" flags="nn" index="2iRkQZ" />
......@@ -25,10 +26,15 @@
<concept id="1078939183254" name="jetbrains.mps.lang.editor.structure.CellModel_Component" flags="sg" stub="3162947552742194261" index="PMmxH">
<reference id="1078939183255" name="editorComponent" index="PMmxG" />
</concept>
<concept id="1186414536763" name="jetbrains.mps.lang.editor.structure.BooleanStyleSheetItem" flags="ln" index="VOi$J">
<property id="1186414551515" name="flag" index="VOm3f" />
</concept>
<concept id="1186414928363" name="jetbrains.mps.lang.editor.structure.SelectableStyleSheetItem" flags="ln" index="VPM3Z" />
<concept id="1630016958697344083" name="jetbrains.mps.lang.editor.structure.IMenu_Concept" flags="ng" index="2ZABuq">
<reference id="6591946374543067572" name="conceptDeclaration" index="aqKnT" />
</concept>
<concept id="1233758997495" name="jetbrains.mps.lang.editor.structure.PunctuationLeftStyleClassItem" flags="ln" index="11L4FC" />
<concept id="1233759184865" name="jetbrains.mps.lang.editor.structure.PunctuationRightStyleClassItem" flags="ln" index="11LMrY" />
<concept id="3308396621974580100" name="jetbrains.mps.lang.editor.structure.SubstituteMenu_Default" flags="ng" index="3p36aQ" />
<concept id="1139848536355" name="jetbrains.mps.lang.editor.structure.CellModel_WithRole" flags="ng" index="1$h60E">
<reference id="1140103550593" name="relationDeclaration" index="1NtTu8" />
......@@ -362,6 +368,7 @@
<property role="3F0ifm" value="{" />
</node>
<node concept="3F2HdR" id="2LeOUT3PgTq" role="3EZMnx">
<property role="2czwfO" value="," />
<ref role="1NtTu8" to="oj0p:$yAo6zIfmb" resolve="entries" />
<node concept="l2Vlx" id="2LeOUT3PgTt" role="2czzBx" />
</node>
......@@ -379,6 +386,7 @@
<property role="3F0ifm" value="{" />
</node>
<node concept="3F2HdR" id="6bPwpXIfZVu" role="3EZMnx">
<property role="2czwfO" value="," />
<ref role="1NtTu8" to="oj0p:1ZoSGYtY0bb" resolve="elems" />
<node concept="l2Vlx" id="6bPwpXIfZVw" role="2czzBx" />
</node>
......@@ -396,7 +404,7 @@
<ref role="1NtTu8" to="tpck:h0TrG11" resolve="name" />
</node>
<node concept="3F0ifn" id="6bPwpXIfZWD" role="3EZMnx">
<property role="3F0ifm" value="=" />
<property role="3F0ifm" value=":" />
</node>
<node concept="3F1sOY" id="6bPwpXIfZXb" role="3EZMnx">
<ref role="1NtTu8" to="oj0p:1ZoSGYtY0bk" resolve="ty" />
......@@ -408,11 +416,19 @@
<property role="3GE5qa" value="term" />
<ref role="1XX52x" to="oj0p:$yAo6zIfos" resolve="Sel" />
<node concept="3EZMnI" id="2LeOUT3PgPs" role="2wV5jI">
<node concept="3F1sOY" id="2LeOUT3PgPD" role="3EZMnx">
<ref role="1NtTu8" to="oj0p:$yAo6zIfox" resolve="t" />
<node concept="1kIj98" id="5z1OnvsHIJq" role="3EZMnx">
<node concept="3F1sOY" id="5z1OnvsHIJE" role="1kIj9b">
<ref role="1NtTu8" to="oj0p:$yAo6zIfox" resolve="t" />
</node>
</node>
<node concept="3F0ifn" id="2LeOUT3PgPP" role="3EZMnx">
<property role="3F0ifm" value="." />
<node concept="11L4FC" id="5z1OnvsKF5K" role="3F10Kt">
<property role="VOm3f" value="true" />
</node>
<node concept="11LMrY" id="5z1OnvsKF5V" role="3F10Kt">
<property role="VOm3f" value="true" />
</node>
</node>
<node concept="3F0A7n" id="2LeOUT3PgQ7" role="3EZMnx">
<ref role="1NtTu8" to="tpck:h0TrG11" resolve="name" />
......
......@@ -221,6 +221,7 @@
<classNode dependClassName="RecordTypes.editor.App_Editor" />
<classNode dependClassName="RecordTypes.editor.Fun_Editor" />
<classNode dependClassName="RecordTypes.editor.Let_Editor" />
<classNode dependClassName="RecordTypes.editor.Sel_Editor" />
<classNode dependClassName="RecordTypes.editor.Succ_Editor" />
<classNode dependClassName="RecordTypes.editor.Var_Editor" />
<classNode dependClassName="com.mbeddr.mpsutil.grammarcells.runtime.AbstractRule" />
......@@ -1173,7 +1174,10 @@
</dependency>
<dependency className="RecordTypes.editor.RecordType_EditorBuilder_a">
<classNode dependClassName="java.lang.Override" />
<classNode dependClassName="jetbrains.mps.editor.runtime.style.StyleAttributes" />
<classNode dependClassName="jetbrains.mps.editor.runtime.style.StyleImpl" />
<classNode dependClassName="jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler" />
<classNode dependClassName="jetbrains.mps.lang.editor.cellProviders.RefNodeListHandlerElementKeyMap" />
<classNode dependClassName="jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode" />
<classNode dependClassName="jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent" />
<classNode dependClassName="jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo" />
......@@ -1186,6 +1190,7 @@
<classNode dependClassName="jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo" />
<classNode dependClassName="jetbrains.mps.openapi.editor.cells.EditorCell" />
<classNode dependClassName="jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation" />
<classNode dependClassName="jetbrains.mps.openapi.editor.style.Style" />
<classNode dependClassName="jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory" />
<classNode dependClassName="org.jetbrains.annotations.NotNull" />
<classNode dependClassName="org.jetbrains.mps.openapi.language.SAbstractConcept" />
......@@ -1202,7 +1207,10 @@
</dependency>
<dependency className="RecordTypes.editor.Record_EditorBuilder_a">
<classNode dependClassName="java.lang.Override" />
<classNode dependClassName="jetbrains.mps.editor.runtime.style.StyleAttributes" />
<classNode dependClassName="jetbrains.mps.editor.runtime.style.StyleImpl" />
<classNode dependClassName="jetbrains.mps.lang.editor.cellProviders.RefNodeListHandler" />
<classNode dependClassName="jetbrains.mps.lang.editor.cellProviders.RefNodeListHandlerElementKeyMap" />
<classNode dependClassName="jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode" />
<classNode dependClassName="jetbrains.mps.nodeEditor.cellLayout.CellLayout_Indent" />
<classNode dependClassName="jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo" />
......@@ -1215,6 +1223,7 @@
<classNode dependClassName="jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo" />
<classNode dependClassName="jetbrains.mps.openapi.editor.cells.EditorCell" />
<classNode dependClassName="jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation" />
<classNode dependClassName="jetbrains.mps.openapi.editor.style.Style" />
<classNode dependClassName="jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory" />
<classNode dependClassName="org.jetbrains.annotations.NotNull" />
<classNode dependClassName="org.jetbrains.mps.openapi.language.SAbstractConcept" />
......@@ -1230,18 +1239,25 @@
<classNode extendsClassName="jetbrains.mps.nodeEditor.DefaultNodeEditor" />
</dependency>
<dependency className="RecordTypes.editor.Sel_EditorBuilder_a">
<classNode dependClassName="com.mbeddr.mpsutil.grammarcells.runtime.CellActionWithReadAccess" />
<classNode dependClassName="java.lang.Iterable" />
<classNode dependClassName="java.lang.Override" />
<classNode dependClassName="java.lang.String" />
<classNode dependClassName="java.util.Objects" />
<classNode dependClassName="jetbrains.mps.baseLanguage.closures.runtime._FunctionTypes" />
<classNode dependClassName="jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSPropertyOrNode" />
<classNode dependClassName="jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSmart" />
<classNode dependClassName="jetbrains.mps.editor.runtime.selection.SelectionUtil" />
<classNode dependClassName="jetbrains.mps.editor.runtime.style.StyleAttributes" />
<classNode dependClassName="jetbrains.mps.editor.runtime.style.StyleImpl" />
<classNode dependClassName="jetbrains.mps.internal.collections.runtime.IWhereFilter" />
<classNode dependClassName="jetbrains.mps.internal.collections.runtime.Sequence" />
<classNode dependClassName="jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor" />
<classNode dependClassName="jetbrains.mps.lang.editor.cellProviders.SingleRoleCellProvider" />
<classNode dependClassName="jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations" />
<classNode dependClassName="jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor" />
<classNode dependClassName="jetbrains.mps.lang.smodel.generator.smodelAdapter.SConceptOperations" />
<classNode dependClassName="jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations" />
<classNode dependClassName="jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations" />
<classNode dependClassName="jetbrains.mps.nodeEditor.EditorManager" />
<classNode dependClassName="jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode" />
......@@ -1259,9 +1275,12 @@
<classNode dependClassName="jetbrains.mps.openapi.editor.cells.EditorCell" />
<classNode dependClassName="jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation" />
<classNode dependClassName="jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo" />
<classNode dependClassName="jetbrains.mps.openapi.editor.selection.SelectionManager" />
<classNode dependClassName="jetbrains.mps.openapi.editor.style.Style" />
<classNode dependClassName="jetbrains.mps.openapi.editor.update.AttributeKind" />
<classNode dependClassName="jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory" />
<classNode dependClassName="org.jetbrains.annotations.NotNull" />
<classNode dependClassName="org.jetbrains.mps.openapi.language.SAbstractConcept" />
<classNode dependClassName="org.jetbrains.mps.openapi.language.SContainmentLink" />
<classNode dependClassName="org.jetbrains.mps.openapi.language.SProperty" />
<classNode dependClassName="org.jetbrains.mps.openapi.model.SNode" />
......
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="35pso6j1kl6urhfqpnrcsjpfzrcpdo2">
<product version="3" modelHash="bi29ybukn2ip0rb4js6vle2pe785rni">
<files names="Add_Editor.java:Add_EditorBuilder_a.java:Anno_Editor.java:Anno_EditorBuilder_a.java:App_Editor.java:App_EditorBuilder_a.java:EditorAspectDescriptorImpl.java:Fun_Editor.java:Fun_EditorBuilder_a.java:GrammarActionsDescriptor.java:GrammarCellsSubstituteMenu_Add.java:GrammarCellsSubstituteMenu_Anno.java:GrammarCellsSubstituteMenu_App.java:GrammarCellsSubstituteMenu_Fun.java:GrammarCellsSubstituteMenu_IModuleElem.java:GrammarCellsSubstituteMenu_Lam.java:GrammarCellsSubstituteMenu_Let.java:GrammarCellsSubstituteMenu_Module.java:GrammarCellsSubstituteMenu_ModuleElemDef.java:GrammarCellsSubstituteMenu_ModuleElemEmpty.java:GrammarCellsSubstituteMenu_ModuleImport.java:GrammarCellsSubstituteMenu_Mult.java:GrammarCellsSubstituteMenu_Nat.java:GrammarCellsSubstituteMenu_ParensTerm.java:GrammarCellsSubstituteMenu_ParensType.java:GrammarCellsSubstituteMenu_Record.java:GrammarCellsSubstituteMenu_RecordEntry.java:GrammarCellsSubstituteMenu_RecordType.java:GrammarCellsSubstituteMenu_RecordTypeEntry.java:GrammarCellsSubstituteMenu_Sel.java:GrammarCellsSubstituteMenu_Succ.java:GrammarCellsSubstituteMenu_Term.java:GrammarCellsSubstituteMenu_Type.java:GrammarCellsSubstituteMenu_Var.java:GrammarCellsSubstituteMenu_Zero.java:Lam_Editor.java:Lam_EditorBuilder_a.java:Let_Editor.java:Let_EditorBuilder_a.java:ModuleElemDef_Editor.java:ModuleElemDef_EditorBuilder_a.java:ModuleElemEmpty_SubstituteMenu.java:ModuleImport_Editor.java:ModuleImport_EditorBuilder_a.java:Module_Editor.java:Module_EditorBuilder_a.java:Mult_Editor.java:Mult_EditorBuilder_a.java:Nat_Editor.java:Nat_EditorBuilder_a.java:ParensTerm_Editor.java:ParensTerm_EditorBuilder_a.java:ParensType_Editor.java:ParensType_EditorBuilder_a.java:RecordEntry_Editor.java:RecordEntry_EditorBuilder_a.java:RecordTypeEntry_Editor.java:RecordTypeEntry_EditorBuilder_a.java:RecordType_Editor.java:RecordType_EditorBuilder_a.java:Record_Editor.java:Record_EditorBuilder_a.java:Sel_Editor.java:Sel_EditorBuilder_a.java:Succ_Editor.java:Succ_EditorBuilder_a.java:Var_Editor.java:Var_EditorBuilder_a.java:Zero_Editor.java:Zero_EditorBuilder_a.java:template_GrammarCellsSideTransformationsMenu.java" />
</product>
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="by0f87re721kkzsjnmtn820lv99sodk">
<product version="3" modelHash="ado8p3v5lho6geh9jsa2b3uug0b5snv">
<files names="Language.java" />
</product>
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="-b22ohtir1kpa9479syiyvypr11obxj2">
<product version="3" modelHash="-2ybac4kskvya9i8uqix4j9z3vlctrer">
<files names="ConceptPresentationAspectImpl.java:LanguageConceptSwitch.java:StructureAspectDescriptor.java" />
</product>
......@@ -93,7 +93,7 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
}
}
private EditorCell createConstant_0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "=");
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ":");
editorCell.setCellId("Constant_8j07si_b0");
editorCell.setDefaultText("");
return editorCell;
......
......@@ -18,9 +18,13 @@ import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
import jetbrains.mps.openapi.editor.cells.CellActionType;
import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode;
import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandlerElementKeyMap;
import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
/*package*/ class RecordType_EditorBuilder_a extends AbstractEditorBuilder {
@NotNull
......@@ -108,12 +112,25 @@ import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo;
if (elementNode != null) {
elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
elementCell.addKeyMap(new RefNodeListHandlerElementKeyMap(this, ","));
}
if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell)));
}
}
}
@Override
public EditorCell createSeparatorCell(SNode prevNode, SNode nextNode) {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), getNode(), ",");
editorCell.setSelectable(false);
Style style = new StyleImpl();
style.set(StyleAttributes.LAYOUT_CONSTRAINT, "");
style.set(StyleAttributes.PUNCTUATION_LEFT, true);
editorCell.getStyle().putAll(style);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
return editorCell;
}
}
private EditorCell createConstant_1() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}");
......
......@@ -18,9 +18,13 @@ import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
import jetbrains.mps.openapi.editor.cells.CellActionType;
import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode;
import jetbrains.mps.lang.editor.cellProviders.RefNodeListHandlerElementKeyMap;
import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
/*package*/ class Record_EditorBuilder_a extends AbstractEditorBuilder {
@NotNull
......@@ -108,12 +112,25 @@ import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo;
if (elementNode != null) {
elementCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
elementCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(elementNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
elementCell.addKeyMap(new RefNodeListHandlerElementKeyMap(this, ","));
}
if (elementCell.getSubstituteInfo() == null || elementCell.getSubstituteInfo() instanceof DefaultSubstituteInfo) {
elementCell.setSubstituteInfo((isEmptyCell ? new SEmptyContainmentSubstituteInfo(elementCell) : new SChildSubstituteInfo(elementCell)));
}
}
}
@Override
public EditorCell createSeparatorCell(SNode prevNode, SNode nextNode) {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), getNode(), ",");
editorCell.setSelectable(false);
Style style = new StyleImpl();
style.set(StyleAttributes.LAYOUT_CONSTRAINT, "");
style.set(StyleAttributes.PUNCTUATION_LEFT, true);
editorCell.getStyle().putAll(style);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.FORWARD));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteNode(prevNode, CellAction_DeleteNode.DeleteDirection.BACKWARD));
return editorCell;
}
}
private EditorCell createConstant_1() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "}");
......
......@@ -18,7 +18,18 @@ import jetbrains.mps.openapi.editor.cells.DefaultSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo;
import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
import jetbrains.mps.baseLanguage.closures.runtime._FunctionTypes;
import com.mbeddr.mpsutil.grammarcells.runtime.CellActionWithReadAccess;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations;
import jetbrains.mps.editor.runtime.selection.SelectionUtil;
import jetbrains.mps.openapi.editor.selection.SelectionManager;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SConceptOperations;
import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
import jetbrains.mps.openapi.editor.style.Style;
import jetbrains.mps.editor.runtime.style.StyleImpl;
import jetbrains.mps.editor.runtime.style.StyleAttributes;
import org.jetbrains.mps.openapi.language.SProperty;
import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo;
import jetbrains.mps.nodeEditor.cells.EditorCell_Property;
......@@ -26,7 +37,6 @@ import jetbrains.mps.nodeEditor.cells.SPropertyAccessor;
import jetbrains.mps.editor.runtime.impl.cellActions.CellAction_DeleteSPropertyOrNode;
import jetbrains.mps.nodeEditor.cellActions.CellAction_DeleteNode;
import jetbrains.mps.nodeEditor.cellMenu.SPropertySubstituteInfo;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations;
import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor;
import jetbrains.mps.internal.collections.runtime.Sequence;
......@@ -61,8 +71,8 @@ import jetbrains.mps.openapi.editor.update.AttributeKind;
editorCell.setBig(true);
setCellContext(editorCell);
editorCell.addEditorCell(createRefNode_0());
editorCell.addEditorCell(createConstant_0());
editorCell.addEditorCell(createProperty_0());
editorCell.addEditorCell(createCustomFactory_1());
editorCell.addEditorCell(createCustomFactory_3());
return editorCell;
}
private EditorCell createRefNode_0() {
......@@ -120,12 +130,132 @@ import jetbrains.mps.openapi.editor.update.AttributeKind;
return "<no t>";
}
}
private EditorCell createCustomFactory_0(final EditorContext editorContext, final SNode node) {
final EditorCell cell = createConstant_0();
EditorCell editorCell = new _FunctionTypes._return_P0_E0<EditorCell>() {
public EditorCell invoke() {
cell.setAction(CellActionType.DELETE, new CellActionWithReadAccess() {
public void execute(EditorContext editorContext) {
SNode unwrapped = SNodeOperations.replaceWithAnother(node, SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t")));
boolean caretLeft = false;
if (caretLeft) {
SelectionUtil.selectLabelCellAnSetCaret(editorContext, unwrapped, SelectionManager.FIRST_CELL, 0);
} else {
SelectionUtil.selectLabelCellAnSetCaret(editorContext, unwrapped, SelectionManager.LAST_CELL, -1);
}
}
@Override
public boolean canExecute_inReadAction(EditorContext editorContext) {
SNode replacement = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t"));
SContainmentLink containmentLink = node.getContainmentLink();
if (containmentLink == null) {
return true;
}
SAbstractConcept expectedConcept = containmentLink.getTargetConcept();
return expectedConcept == null || SConceptOperations.isSubConceptOf(SNodeOperations.asSConcept(SNodeOperations.getConcept(replacement)), SNodeOperations.asSConcept(expectedConcept));
}
});
cell.setAction(CellActionType.BACKSPACE, new CellActionWithReadAccess() {
public void execute(EditorContext editorContext) {
SNode unwrapped = SNodeOperations.replaceWithAnother(node, SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t")));
boolean caretLeft = false;
if (caretLeft) {
SelectionUtil.selectLabelCellAnSetCaret(editorContext, unwrapped, SelectionManager.FIRST_CELL, 0);
} else {
SelectionUtil.selectLabelCellAnSetCaret(editorContext, unwrapped, SelectionManager.LAST_CELL, -1);
}
}
@Override
public boolean canExecute_inReadAction(EditorContext editorContext) {
SNode replacement = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t"));
SContainmentLink containmentLink = node.getContainmentLink();
if (containmentLink == null) {
return true;
}
SAbstractConcept expectedConcept = containmentLink.getTargetConcept();
return expectedConcept == null || SConceptOperations.isSubConceptOf(SNodeOperations.asSConcept(SNodeOperations.getConcept(replacement)), SNodeOperations.asSConcept(expectedConcept));
}
});
return cell;
}
}.invoke();
return editorCell;
}
private EditorCell createCustomFactory_1() {
return createCustomFactory_0(getEditorContext(), myNode);
}
private EditorCell createConstant_0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, ".");
editorCell.setCellId("Constant_mkibvd_b0");
editorCell.setCellId("Constant_mkibvd_a1a");
Style style = new StyleImpl();
style.set(StyleAttributes.PUNCTUATION_LEFT, true);
style.set(StyleAttributes.PUNCTUATION_RIGHT, true);
editorCell.getStyle().putAll(style);
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createCustomFactory_2(final EditorContext editorContext, final SNode node) {
final EditorCell cell = createProperty_0();
EditorCell editorCell = new _FunctionTypes._return_P0_E0<EditorCell>() {
public EditorCell invoke() {
cell.setAction(CellActionType.DELETE, new CellActionWithReadAccess() {
public void execute(EditorContext editorContext) {
SNode unwrapped = SNodeOperations.replaceWithAnother(node, SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t")));
boolean caretLeft = false;
if (caretLeft) {
SelectionUtil.selectLabelCellAnSetCaret(editorContext, unwrapped, SelectionManager.FIRST_CELL, 0);
} else {
SelectionUtil.selectLabelCellAnSetCaret(editorContext, unwrapped, SelectionManager.LAST_CELL, -1);
}
}
@Override
public boolean canExecute_inReadAction(EditorContext editorContext) {
SNode replacement = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t"));
SContainmentLink containmentLink = node.getContainmentLink();
if (containmentLink == null) {
return true;
}
SAbstractConcept expectedConcept = containmentLink.getTargetConcept();
return expectedConcept == null || SConceptOperations.isSubConceptOf(SNodeOperations.asSConcept(SNodeOperations.getConcept(replacement)), SNodeOperations.asSConcept(expectedConcept));
}
});
cell.setAction(CellActionType.BACKSPACE, new CellActionWithReadAccess() {
public void execute(EditorContext editorContext) {
SNode unwrapped = SNodeOperations.replaceWithAnother(node, SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t")));
boolean caretLeft = false;
if (caretLeft) {
SelectionUtil.selectLabelCellAnSetCaret(editorContext, unwrapped, SelectionManager.FIRST_CELL, 0);
} else {
SelectionUtil.selectLabelCellAnSetCaret(editorContext, unwrapped, SelectionManager.LAST_CELL, -1);
}
}
@Override
public boolean canExecute_inReadAction(EditorContext editorContext) {
SNode replacement = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t"));
SContainmentLink containmentLink = node.getContainmentLink();
if (containmentLink == null) {
return true;
}
SAbstractConcept expectedConcept = containmentLink.getTargetConcept();
return expectedConcept == null || SConceptOperations.isSubConceptOf(SNodeOperations.asSConcept(SNodeOperations.getConcept(replacement)), SNodeOperations.asSConcept(expectedConcept));
}
});
return cell;
}
}.invoke();
return editorCell;
}
private EditorCell createCustomFactory_3() {
return createCustomFactory_2(getEditorContext(), myNode);
}
private EditorCell createProperty_0() {
getCellFactory().pushCellContext();
try {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -279,7 +279,6 @@ public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("RecordTypes", "RecordEntry", 0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x2c4ed3ae43d50d92L);
b.class_(false, false, false);
b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
b.parent(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb92d1L);
b.origin("r:a882191d-3685-4616-b5b1-384cf716b30e(RecordTypes.structure)/3192721931268066706");
b.version(2);
b.aggregate("t", 0x2c4ed3ae43d50da6L).target(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb92d1L).optional(false).ordered(true).multiple(false).origin("3192721931268066726").done();
......
......@@ -15,6 +15,7 @@
<language id="18bc6592-03a6-4e29-a83a-7ff23bde13ba" name="jetbrains.mps.lang.editor">
<concept id="1071666914219" name="jetbrains.mps.lang.editor.structure.ConceptEditorDeclaration" flags="ig" index="24kQdi" />
<concept id="1140524381322" name="jetbrains.mps.lang.editor.structure.CellModel_ListWithRole" flags="ng" index="2czfm3">
<property id="1140524450557" name="separatorText" index="2czwfO" />
<child id="1140524464360" name="cellLayout" index="2czzBx" />
</concept>
<concept id="1106270571710" name="jetbrains.mps.lang.editor.structure.CellLayout_Vertical" flags="nn" index="2iRkQZ" />
......@@ -384,6 +385,7 @@
<property role="3F0ifm" value="&lt;" />
</node>
<node concept="3F2HdR" id="6bPwpXIfZVu" role="3EZMnx">
<property role="2czwfO" value="," />
<ref role="1NtTu8" to="z36t:1ZoSGYtY0bb" resolve="elems" />
<node concept="l2Vlx" id="6bPwpXIfZVw" role="2czzBx" />
</node>
......@@ -401,7 +403,7 @@
<ref role="1NtTu8" to="tpck:h0TrG11" resolve="name" />
</node>
<node concept="3F0ifn" id="6bPwpXIfZWD" role="3EZMnx">
<property role="3F0ifm" value="=" />
<property role="3F0ifm" value=":" />
</node>
<node concept="3F1sOY" id="6bPwpXIfZXb" role="3EZMnx">
<ref role="1NtTu8" to="z36t:1ZoSGYtY0bk" resolve="ty" />
......
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="blbyt4hgxxxrflg62dw7kdj2k4yu9ai">
<files names="Add_Editor.java:Add_EditorBuilder_a.java:Anno_Editor.java:Anno_EditorBuilder_a.java:App_Editor.java:App_EditorBuilder_a.java:Case_Editor.java:Case_EditorBuilder_a.java:EditorAspectDescriptorImpl.java:Fun_Editor.java:Fun_EditorBuilder_a.java:GrammarActionsDescriptor.java:GrammarCellsSubstituteMenu_Add.java:GrammarCellsSubstituteMenu_Anno.java:GrammarCellsSubstituteMenu_App.java:GrammarCellsSubstituteMenu_Case.java:GrammarCellsSubstituteMenu_ExpTerm.java:GrammarCellsSubstituteMenu_Fun.java:GrammarCellsSubstituteMenu_IModuleElem.java:GrammarCellsSubstituteMenu_ITerm.java:GrammarCellsSubstituteMenu_Lam.java:GrammarCellsSubstituteMenu_Let.java:GrammarCellsSubstituteMenu_Match.java:GrammarCellsSubstituteMenu_Module.java:GrammarCellsSubstituteMenu_ModuleElemDef.java:GrammarCellsSubstituteMenu_ModuleElemEmpty.java:GrammarCellsSubstituteMenu_ModuleImport.java:GrammarCellsSubstituteMenu_Mult.java:GrammarCellsSubstituteMenu_Nat.java:GrammarCellsSubstituteMenu_ParensTerm.java:GrammarCellsSubstituteMenu_ParensType.java:GrammarCellsSubstituteMenu_Succ.java:GrammarCellsSubstituteMenu_Tag.java:GrammarCellsSubstituteMenu_Type.java:GrammarCellsSubstituteMenu_Var.java:GrammarCellsSubstituteMenu_VariantType.java:GrammarCellsSubstituteMenu_VariantTypeEntry.java:GrammarCellsSubstituteMenu_Zero.java:Lam_Editor.java:Lam_EditorBuilder_a.java:Let_Editor.java:Let_EditorBuilder_a.java:Match_Editor.java:Match_EditorBuilder_a.java:ModuleElemDef_Editor.java:ModuleElemDef_EditorBuilder_a.java:ModuleElemEmpty_SubstituteMenu.java:ModuleImport_Editor.java:ModuleImport_EditorBuilder_a.java:Module_Editor.java:Module_EditorBuilder_a.java:Mult_Editor.java:Mult_EditorBuilder_a.java:Nat_Editor.java:Nat_EditorBuilder_a.java:ParensTerm_Editor.java:ParensTerm_EditorBuilder_a.java:ParensType_Editor.java:ParensType_EditorBuilder_a.java:Succ_Editor.java:Succ_EditorBuilder_a.java:Tag_Editor.java:Tag_EditorBuilder_a.java:Var_Editor.java:Var_EditorBuilder_a.java:VariantTypeEntry_Editor.java:VariantTypeEntry_EditorBuilder_a.java:VariantType_Editor.java:VariantType_EditorBuilder_a.java:Zero_Editor.java:Zero_EditorBuilder_a.java:template_GrammarCellsSideTransformationsMenu.java" />
<product version="3" modelHash="-64r7ktz9q66ksvrn3oqy9wh75mbmf4j">
<files names="Add_Editor.java:Add_EditorBuilder_a.java:Anno_Editor.java:Anno_EditorBuilder_a.java:App_Editor.java:App_EditorBuilder_a.java:Case_Editor.java:Case_EditorBuilder_a.java:EditorAspectDescriptorImpl.java:Fun_Editor.java:Fun_EditorBuilder_a.java:GrammarActionsDescriptor.java:GrammarCellsSubstituteMenu_Add.java:GrammarCellsSubstituteMenu_Anno.java:GrammarCellsSubstituteMenu_App.java:GrammarCellsSubstituteMenu_Case.java:GrammarCellsSubstituteMenu_Fun.java:GrammarCellsSubstituteMenu_IModuleElem.java:GrammarCellsSubstituteMenu_Lam.java:GrammarCellsSubstituteMenu_Let.java:GrammarCellsSubstituteMenu_Match.java:GrammarCellsSubstituteMenu_Module.java:GrammarCellsSubstituteMenu_ModuleElemDef.java:GrammarCellsSubstituteMenu_ModuleElemEmpty.java:GrammarCellsSubstituteMenu_ModuleImport.java:GrammarCellsSubstituteMenu_Mult.java:GrammarCellsSubstituteMenu_Nat.java:GrammarCellsSubstituteMenu_ParensTerm.java:GrammarCellsSubstituteMenu_ParensType.java:GrammarCellsSubstituteMenu_Succ.java:GrammarCellsSubstituteMenu_Tag.java:GrammarCellsSubstituteMenu_Term.java:GrammarCellsSubstituteMenu_Type.java:GrammarCellsSubstituteMenu_Var.java:GrammarCellsSubstituteMenu_VariantType.java:GrammarCellsSubstituteMenu_VariantTypeEntry.java:GrammarCellsSubstituteMenu_Zero.java:Lam_Editor.java:Lam_EditorBuilder_a.java:Let_Editor.java:Let_EditorBuilder_a.java:Match_Editor.java:Match_EditorBuilder_a.java:ModuleElemDef_Editor.java:ModuleElemDef_EditorBuilder_a.java:ModuleElemEmpty_SubstituteMenu.java:ModuleImport_Editor.java:ModuleImport_EditorBuilder_a.java:Module_Editor.java:Module_EditorBuilder_a.java:Mult_Editor.java:Mult_EditorBuilder_a.java:Nat_Editor.java:Nat_EditorBuilder_a.java:ParensTerm_Editor.java:ParensTerm_EditorBuilder_a.java:ParensType_Editor.java:ParensType_EditorBuilder_a.java:Succ_Editor.java:Succ_EditorBuilder_a.java:Tag_Editor.java:Tag_EditorBuilder_a.java:Var_Editor.java:Var_EditorBuilder_a.java:VariantTypeEntry_Editor.java:VariantTypeEntry_EditorBuilder_a.java:VariantType_Editor.java:VariantType_EditorBuilder_a.java:Zero_Editor.java:Zero_EditorBuilder_a.java:template_GrammarCellsSideTransformationsMenu.java" />
</product>
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="9udpqb6sbjx1pekxqloxps847fxr1if">
<product version="3" modelHash="3ldbfgyz2sk1pyf60w9tkxv7r7nj3p5">
<files names="Language.java" />
</product>
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="-ea5ajeiv7fit12u2h4kt0hnwzjmhnrz">
<product version="3" modelHash="c3ck0f250bdxvkwibpshxv6ia6n3lso">
<files names="ConceptPresentationAspectImpl.java:LanguageConceptSwitch.java:StructureAspectDescriptor.java" />
</product>
......@@ -71,7 +71,7 @@ import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
// replace with placeholder
SNode child = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"));
SAbstractConcept childConcept = SNodeOperations.getConcept(child);
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.ExpTerm")))) {
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.Term")))) {
SNodeFactoryOperations.setNewChild(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"), null);
return;
}
......@@ -102,7 +102,7 @@ import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
// replace with placeholder
SNode child = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"));
SAbstractConcept childConcept = SNodeOperations.getConcept(child);
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.ExpTerm")))) {
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.Term")))) {
SNodeFactoryOperations.setNewChild(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"), null);
return;
}
......@@ -266,7 +266,7 @@ import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
// replace with placeholder
SNode child = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"));
SAbstractConcept childConcept = SNodeOperations.getConcept(child);
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.ExpTerm")))) {
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.Term")))) {
SNodeFactoryOperations.setNewChild(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"), null);
return;
}
......@@ -297,7 +297,7 @@ import jetbrains.mps.nodeEditor.cells.EditorCell_Constant;
// replace with placeholder
SNode child = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"));
SAbstractConcept childConcept = SNodeOperations.getConcept(child);
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.ExpTerm")))) {
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.Term")))) {
SNodeFactoryOperations.setNewChild(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"), null);
return;
}
......
......@@ -191,7 +191,7 @@ import jetbrains.mps.smodel.action.SNodeFactoryOperations;
// replace with placeholder
SNode child = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"));
SAbstractConcept childConcept = SNodeOperations.getConcept(child);
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.ExpTerm")))) {
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.Term")))) {
SNodeFactoryOperations.setNewChild(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"), null);
return;
}
......@@ -222,7 +222,7 @@ import jetbrains.mps.smodel.action.SNodeFactoryOperations;
// replace with placeholder
SNode child = SLinkOperations.getTarget(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"));
SAbstractConcept childConcept = SNodeOperations.getConcept(child);
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.ExpTerm")))) {
if (!(GrammarCellsUtil.isExactly(childConcept, MetaAdapterFactory.getInterfaceConcept(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb92d1L, "VariantTypes.structure.Term")))) {
SNodeFactoryOperations.setNewChild(node, MetaAdapterFactory.getContainmentLink(0x3ace5b6c22d54933L, 0x9217595f2ebf8d6aL, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"), null);
return;
}
......
package VariantTypes.editor;
/*Generated by MPS */
import jetbrains.mps.nodeEditor.menus.substitute.SubstituteMenuBase;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import jetbrains.mps.lang.editor.menus.MenuPart;
import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuItem;
import jetbrains.mps.openapi.editor.menus.substitute.SubstituteMenuContext;
import java.util.ArrayList;
import jetbrains.mps.lang.editor.menus.EditorMenuDescriptorBase;
import com.mbeddr.mpsutil.grammarcells.runtime.menu.GrammarCellsSubstituteMenuPart;
import org.jetbrains.mps.openapi.module.SModule;
import org.jetbrains.mps.openapi.module.SRepository;
import org.jetbrains.mps.openapi.persistence.PersistenceFacade;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
public class GrammarCellsSubstituteMenu_ITerm extends SubstituteMenuBase {
public GrammarCellsSubstituteMenu_ITerm() {
super(true);
}
@NotNull
@Override
protected List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> getParts(final SubstituteMenuContext _context) {
List<MenuPart<SubstituteMenuItem, SubstituteMenuContext>> result = new ArrayList<MenuPart<SubstituteMenuItem, SubstituteMenuContext>>();
result.add(new GrammarCellsSubstituteMenu_ITerm.GrammarCellsSubstituteMenuPart_e72h64_a());
return result;
}
@NotNull
@Override
public List<SubstituteMenuItem> createMenuItems(@NotNull SubstituteMenuContext context) {
context.getEditorMenuTrace().pushTraceInfo();
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("contribution to the " + "default substitute menu for " + "ITerm", null));
try {
return super.createMenuItems(context);
} finally {
context.getEditorMenuTrace().popTraceInfo();