Commit e7e43255 authored by André Pacak's avatar André Pacak
Browse files

functional implementation of typechecker (sumtypes) in IncA

parent 63d6f349
......@@ -7,8 +7,8 @@ import jetbrains.mps.openapi.editor.cells.EditorCell;
import jetbrains.mps.openapi.editor.EditorContext;
import org.jetbrains.mps.openapi.model.SNode;
public class CaseCase_Editor extends DefaultNodeEditor {
public class CCase_Editor extends DefaultNodeEditor {
public EditorCell createEditorCell(EditorContext editorContext, SNode node) {
return new CaseCase_EditorBuilder_a(editorContext, node).createCell();
return new CCase_EditorBuilder_a(editorContext, node).createCell();
}
}
......@@ -43,11 +43,11 @@ import jetbrains.mps.nodeEditor.cellMenu.SEmptyContainmentSubstituteInfo;
import jetbrains.mps.nodeEditor.cellMenu.SChildSubstituteInfo;
import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
/*package*/ class CaseCase_EditorBuilder_a extends AbstractEditorBuilder {
/*package*/ class CCase_EditorBuilder_a extends AbstractEditorBuilder {
@NotNull
private SNode myNode;
public CaseCase_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
public CCase_EditorBuilder_a(@NotNull EditorContext context, @NotNull SNode node) {
super(context);
myNode = node;
}
......@@ -64,7 +64,7 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
private EditorCell createCollection_0() {
EditorCell_Collection editorCell = new EditorCell_Collection(getEditorContext(), myNode, new CellLayout_Indent());
editorCell.setCellId("Collection_i40dfq_a");
editorCell.setCellId("Collection_8otkf0_a");
editorCell.setBig(true);
setCellContext(editorCell);
editorCell.addEditorCell(createCustomFactory_1());
......@@ -217,19 +217,19 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
}
private EditorCell createConstant_0() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "->");
editorCell.setCellId("Constant_i40dfq_a1a");
editorCell.setCellId("Constant_8otkf0_a1a");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_0() {
SingleRoleCellProvider provider = new CaseCase_EditorBuilder_a.tSingleRoleHandler_i40dfq_c0(myNode, MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, 0x1a4a252762eba8afL, "t"), getEditorContext());
SingleRoleCellProvider provider = new CCase_EditorBuilder_a.tSingleRoleHandler_8otkf0_c0(myNode, MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, 0x1a4a252762eba8afL, "t"), getEditorContext());
return provider.createCell();
}
private static class tSingleRoleHandler_i40dfq_c0 extends SingleRoleCellProvider {
private static class tSingleRoleHandler_8otkf0_c0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public tSingleRoleHandler_i40dfq_c0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
public tSingleRoleHandler_8otkf0_c0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
......
......@@ -19,6 +19,23 @@ 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.nodeEditor.cells.EditorCell_Indent;
import org.jetbrains.mps.openapi.language.SProperty;
import jetbrains.mps.openapi.editor.menus.transformation.SPropertyInfo;
import jetbrains.mps.nodeEditor.cells.EditorCell_Property;
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;
import jetbrains.mps.internal.collections.runtime.IWhereFilter;
import java.util.Objects;
import jetbrains.mps.lang.core.behavior.PropertyAttribute__BehaviorDescriptor;
import jetbrains.mps.nodeEditor.EditorManager;
import jetbrains.mps.openapi.editor.update.AttributeKind;
/*package*/ class Case_EditorBuilder_a extends AbstractEditorBuilder {
@NotNull
......@@ -47,7 +64,13 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
editorCell.addEditorCell(createConstant_0());
editorCell.addEditorCell(createRefNode_0());
editorCell.addEditorCell(createConstant_1());
editorCell.addEditorCell(createIndentCell_0());
editorCell.addEditorCell(createProperty_0());
editorCell.addEditorCell(createConstant_2());
editorCell.addEditorCell(createRefNode_1());
editorCell.addEditorCell(createIndentCell_1());
editorCell.addEditorCell(createProperty_1());
editorCell.addEditorCell(createConstant_3());
editorCell.addEditorCell(createRefNode_2());
return editorCell;
}
......@@ -118,15 +141,52 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createIndentCell_0() {
EditorCell_Indent editorCell = new EditorCell_Indent(getEditorContext(), myNode);
return editorCell;
}
private EditorCell createProperty_0() {
getCellFactory().pushCellContext();
try {
final SProperty property = MetaAdapterFactory.getProperty(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x65862e756f28fc0aL, "name1");
getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property));
EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode);
editorCell.setDefaultText("<no name1>");
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSPropertyOrNode(myNode, property, CellAction_DeleteNode.DeleteDirection.FORWARD));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSPropertyOrNode(myNode, property, CellAction_DeleteNode.DeleteDirection.BACKWARD));
editorCell.setCellId("property_name1");
editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property));
setCellContext(editorCell);
Iterable<SNode> propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"));
Iterable<SNode> currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter<SNode>() {
public boolean accept(SNode it) {
return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property);
}
});
if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell);
} else
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
private EditorCell createConstant_2() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "->");
editorCell.setCellId("Constant_87dhgu_f0");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_1() {
SingleRoleCellProvider provider = new Case_EditorBuilder_a.c1SingleRoleHandler_87dhgu_d0(myNode, MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "c1"), getEditorContext());
SingleRoleCellProvider provider = new Case_EditorBuilder_a.t1SingleRoleHandler_87dhgu_g0(myNode, MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "t1"), getEditorContext());
return provider.createCell();
}
private static class c1SingleRoleHandler_87dhgu_d0 extends SingleRoleCellProvider {
private static class t1SingleRoleHandler_87dhgu_g0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public c1SingleRoleHandler_87dhgu_d0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
public t1SingleRoleHandler_87dhgu_g0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
......@@ -139,8 +199,8 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "c1"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "c1"), child));
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "t1"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "t1"), child));
installCellInfo(child, editorCell, false);
return editorCell;
}
......@@ -152,16 +212,16 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
editorCell.setSubstituteInfo((isEmpty ? new SEmptyContainmentSubstituteInfo(editorCell) : new SChildSubstituteInfo(editorCell)));
}
if (editorCell.getSRole() == null) {
editorCell.setSRole(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "c1"));
editorCell.setSRole(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "t1"));
}
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "c1")));
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "t1")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_c1");
editorCell.setCellId("empty_t1");
installCellInfo(null, editorCell, true);
setCellContext(editorCell);
return editorCell;
......@@ -170,18 +230,55 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
}
}
protected String getNoTargetText() {
return "<no c1>";
return "<no t1>";
}
}
private EditorCell createIndentCell_1() {
EditorCell_Indent editorCell = new EditorCell_Indent(getEditorContext(), myNode);
return editorCell;
}
private EditorCell createProperty_1() {
getCellFactory().pushCellContext();
try {
final SProperty property = MetaAdapterFactory.getProperty(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x65862e756f28fc0cL, "name2");
getCellFactory().setPropertyInfo(new SPropertyInfo(myNode, property));
EditorCell_Property editorCell = EditorCell_Property.create(getEditorContext(), new SPropertyAccessor(myNode, property, false, false), myNode);
editorCell.setDefaultText("<no name2>");
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSPropertyOrNode(myNode, property, CellAction_DeleteNode.DeleteDirection.FORWARD));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSPropertyOrNode(myNode, property, CellAction_DeleteNode.DeleteDirection.BACKWARD));
editorCell.setCellId("property_name2");
editorCell.setSubstituteInfo(new SPropertySubstituteInfo(editorCell, property));
setCellContext(editorCell);
Iterable<SNode> propertyAttributes = SNodeOperations.ofConcept(AttributeOperations.getAttributeList(myNode, new IAttributeDescriptor.AllAttributes()), MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x2eb1ad060897da56L, "jetbrains.mps.lang.core.structure.PropertyAttribute"));
Iterable<SNode> currentPropertyAttributes = Sequence.fromIterable(propertyAttributes).where(new IWhereFilter<SNode>() {
public boolean accept(SNode it) {
return Objects.equals(PropertyAttribute__BehaviorDescriptor.getProperty_id1avfQ4BBzOo.invoke(it), property);
}
});
if (Sequence.fromIterable(currentPropertyAttributes).isNotEmpty()) {
EditorManager manager = EditorManager.getInstanceFromContext(getEditorContext());
return manager.createNodeRoleAttributeCell(Sequence.fromIterable(currentPropertyAttributes).first(), AttributeKind.PROPERTY, editorCell);
} else
return editorCell;
} finally {
getCellFactory().popCellContext();
}
}
private EditorCell createConstant_3() {
EditorCell_Constant editorCell = new EditorCell_Constant(getEditorContext(), myNode, "->");
editorCell.setCellId("Constant_87dhgu_j0");
editorCell.setDefaultText("");
return editorCell;
}
private EditorCell createRefNode_2() {
SingleRoleCellProvider provider = new Case_EditorBuilder_a.c2SingleRoleHandler_87dhgu_e0(myNode, MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "c2"), getEditorContext());
SingleRoleCellProvider provider = new Case_EditorBuilder_a.t2SingleRoleHandler_87dhgu_k0(myNode, MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "t2"), getEditorContext());
return provider.createCell();
}
private static class c2SingleRoleHandler_87dhgu_e0 extends SingleRoleCellProvider {
private static class t2SingleRoleHandler_87dhgu_k0 extends SingleRoleCellProvider {
@NotNull
private SNode myNode;
public c2SingleRoleHandler_87dhgu_e0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
public t2SingleRoleHandler_87dhgu_k0(SNode ownerNode, SContainmentLink containmentLink, EditorContext context) {
super(containmentLink, context);
myNode = ownerNode;
}
......@@ -194,8 +291,8 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
protected EditorCell createChildCell(SNode child) {
EditorCell editorCell = getUpdateSession().updateChildNodeCell(child);
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "c2"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "c2"), child));
editorCell.setAction(CellActionType.DELETE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "t2"), child));
editorCell.setAction(CellActionType.BACKSPACE, new CellAction_DeleteSmart(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "t2"), child));
installCellInfo(child, editorCell, false);
return editorCell;
}
......@@ -207,16 +304,16 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
editorCell.setSubstituteInfo((isEmpty ? new SEmptyContainmentSubstituteInfo(editorCell) : new SChildSubstituteInfo(editorCell)));
}
if (editorCell.getSRole() == null) {
editorCell.setSRole(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "c2"));
editorCell.setSRole(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "t2"));
}
}
@Override
protected EditorCell createEmptyCell() {
getCellFactory().pushCellContext();
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "c2")));
getCellFactory().setNodeLocation(new SNodeLocation.FromParentAndLink(getNode(), MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "t2")));
try {
EditorCell editorCell = super.createEmptyCell();
editorCell.setCellId("empty_c2");
editorCell.setCellId("empty_t2");
installCellInfo(null, editorCell, true);
setCellContext(editorCell);
return editorCell;
......@@ -225,7 +322,7 @@ import jetbrains.mps.openapi.editor.menus.transformation.SNodeLocation;
}
}
protected String getNoTargetText() {
return "<no c2>";
return "<no t2>";
}
}
}
......@@ -27,9 +27,9 @@ public class EditorAspectDescriptorImpl extends EditorAspectDescriptorBase {
case 2:
return Collections.<ConceptEditor>singletonList(new App_Editor());
case 3:
return Collections.<ConceptEditor>singletonList(new Case_Editor());
return Collections.<ConceptEditor>singletonList(new CCase_Editor());
case 4:
return Collections.<ConceptEditor>singletonList(new CaseCase_Editor());
return Collections.<ConceptEditor>singletonList(new Case_Editor());
case 5:
return Collections.<ConceptEditor>singletonList(new Fun_Editor());
case 6:
......@@ -91,9 +91,9 @@ public class EditorAspectDescriptorImpl extends EditorAspectDescriptorBase {
case 2:
return Collections.<SubstituteMenu>singletonList(new GrammarCellsSubstituteMenu_App());
case 3:
return Collections.<SubstituteMenu>singletonList(new GrammarCellsSubstituteMenu_Case());
return Collections.<SubstituteMenu>singletonList(new GrammarCellsSubstituteMenu_CCase());
case 4:
return Collections.<SubstituteMenu>singletonList(new GrammarCellsSubstituteMenu_CaseCase());
return Collections.<SubstituteMenu>singletonList(new GrammarCellsSubstituteMenu_Case());
case 5:
return Collections.<SubstituteMenu>singletonList(new GrammarCellsSubstituteMenu_Fun());
case 6:
......@@ -139,7 +139,7 @@ public class EditorAspectDescriptorImpl extends EditorAspectDescriptorBase {
return Collections.<SubstituteMenu>emptyList();
}
private static final ConceptSwitchIndex conceptIndex = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9302L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb937fL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb936bL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9390L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9359L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9362L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9322L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb933aL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x505c3e530010046cL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c94d790bL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c94d78b7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9312L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93ecL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93f1L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93faL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92e0L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d2L)).seal();
private static final ConceptSwitchIndex conceptIndex = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9302L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb937fL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb936bL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9390L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9359L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9362L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9322L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb933aL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x505c3e530010046cL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c94d790bL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c94d78b7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9312L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93ecL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93f1L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93faL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92e0L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d2L)).seal();
private static final ConceptSwitchIndex conceptIndex1 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL)).seal();
private static final ConceptSwitchIndex conceptIndex2 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9302L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb937fL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb936bL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9390L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c953ef86L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9359L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9362L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9322L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb933aL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x505c3e530010046cL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c94d790bL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c91f3ab7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c94d78b7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9312L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93ecL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93f1L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93faL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d1L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb938fL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92e0L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d2L)).seal();
private static final ConceptSwitchIndex conceptIndex2 = new ConceptSwitchIndexBuilder().put(MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9302L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb937fL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb936bL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9390L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c953ef86L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9359L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9362L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9322L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb933aL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x505c3e530010046cL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c94d790bL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c91f3ab7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x6efbff39c94d78b7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9312L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93ecL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93f1L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93faL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d7L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d1L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb938fL), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92e0L), MetaIdFactory.conceptId(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d2L)).seal();
}
......@@ -507,11 +507,11 @@ public class GrammarActionsDescriptor extends AbstractGrammarActionDescriptor im
public Iterable<SubstituteMenuItem> query() {
List<SubstituteMenuItem> result = ListSequence.fromList(new ArrayList<SubstituteMenuItem>());
_context.getEditorMenuTrace().pushTraceInfo();
_context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("grammar.wrap in " + "CaseCase", new SNodePointer("r:0568d2ce-ce69-49aa-8176-238e55a72c80(SumTypes.editor)", "7775541183377311455")));
_context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("grammar.wrap in " + "CCase", new SNodePointer("r:0568d2ce-ce69-49aa-8176-238e55a72c80(SumTypes.editor)", "7775541183377311455")));
try {
if (SConceptOperations.isExactly(SNodeOperations.asSConcept(expectedOutputConceptExactly), MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CaseCase"))) {
if (SConceptOperations.isExactly(SNodeOperations.asSConcept(expectedOutputConceptExactly), MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CCase"))) {
final SAbstractConcept wrappedConcept = MetaAdapterFactory.getInterfaceConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d1L, "SumTypes.structure.Term");
for (SConcept subconcept : ListSequence.fromList(GrammarCellsUtil.getVisibleSubconceptsNonAbstract(MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CaseCase"), _context.getModel(), CaseCase_Editor.class, _context.getEditorContext()))) {
for (SConcept subconcept : ListSequence.fromList(GrammarCellsUtil.getVisibleSubconceptsNonAbstract(MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CCase"), _context.getModel(), CCase_Editor.class, _context.getEditorContext()))) {
final SConcept outputConcept = ((SConcept) subconcept);
final SAbstractConcept expectedOutputConcept = GrammarCellsUtil.getExpectedOutputConcept(_context, expectedOutputConceptExactly);
......@@ -1609,7 +1609,7 @@ public class GrammarActionsDescriptor extends AbstractGrammarActionDescriptor im
public Iterable<TransformationMenuItem> query(final TransformationMenuContext _context) {
List<TransformationMenuItem> result = ListSequence.fromList(new ArrayList<TransformationMenuItem>());
_context.getEditorMenuTrace().pushTraceInfo();
_context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("grammar.wrap in " + "CaseCase", new SNodePointer("r:0568d2ce-ce69-49aa-8176-238e55a72c80(SumTypes.editor)", "7775541183377311455")));
_context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("grammar.wrap in " + "CCase", new SNodePointer("r:0568d2ce-ce69-49aa-8176-238e55a72c80(SumTypes.editor)", "7775541183377311455")));
try {
if (_context.getMenuLocation() == MenuLocations.LEFT_SIDE_TRANSFORM) {
final SNode sourceNode = new Parser(_context.getModel()).isEndOf(_context.getNode(), _context.getMenuLocation() == MenuLocations.LEFT_SIDE_TRANSFORM, MetaAdapterFactory.getInterfaceConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d1L, "SumTypes.structure.Term"), null);
......@@ -1618,7 +1618,7 @@ public class GrammarActionsDescriptor extends AbstractGrammarActionDescriptor im
final SAbstractConcept sourceNodeConcept = SNodeOperations.getConcept(sourceNode);
SContainmentLink link = sourceNode.getContainmentLink();
SAbstractConcept expectedConcept = (link == null ? null : link.getTargetConcept());
for (final SAbstractConcept subconcept : GrammarCellsUtil.getVisibleSubconceptsNonAbstract(MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CaseCase"), _context.getModel(), CaseCase_Editor.class, _context.getEditorContext())) {
for (final SAbstractConcept subconcept : GrammarCellsUtil.getVisibleSubconceptsNonAbstract(MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CCase"), _context.getModel(), CCase_Editor.class, _context.getEditorContext())) {
boolean wrapperAllowed = expectedConcept == null || SConceptOperations.isSubConceptOf(SNodeOperations.asSConcept(subconcept), SNodeOperations.asSConcept(expectedConcept));
if (wrapperAllowed) {
final Iterable<String> matchingText = Sequence.<String>singleton("->");
......@@ -1638,7 +1638,7 @@ public class GrammarActionsDescriptor extends AbstractGrammarActionDescriptor im
}
protected SNode doSubstitute(@Nullable EditorContext editorContext, String pattern) {
String matchingText = getMatchingText(pattern);
SNode wrapper = SNodeOperations.cast(SNodeFactoryOperations.createNewNode(subconcept, null), MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CaseCase"));
SNode wrapper = SNodeOperations.cast(SNodeFactoryOperations.createNewNode(subconcept, null), MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CCase"));
SNodeOperations.replaceWithAnother(sourceNode, wrapper);
SLinkOperations.setTarget(wrapper, MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, 0x1a4a252762eba8afL, "t"), SNodeOperations.cast(sourceNode, MetaAdapterFactory.getInterfaceConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d1L, "SumTypes.structure.Term")));
......
......@@ -17,15 +17,15 @@ import org.jetbrains.mps.openapi.persistence.PersistenceFacade;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
public class GrammarCellsSubstituteMenu_CaseCase extends SubstituteMenuBase {
public GrammarCellsSubstituteMenu_CaseCase() {
public class GrammarCellsSubstituteMenu_CCase extends SubstituteMenuBase {
public GrammarCellsSubstituteMenu_CCase() {
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_CaseCase.GrammarCellsSubstituteMenuPart_hr7tfy_a());
result.add(new GrammarCellsSubstituteMenu_CCase.GrammarCellsSubstituteMenuPart_e59miz_a());
return result;
}
......@@ -33,7 +33,7 @@ public class GrammarCellsSubstituteMenu_CaseCase extends SubstituteMenuBase {
@Override
public List<SubstituteMenuItem> createMenuItems(@NotNull SubstituteMenuContext context) {
context.getEditorMenuTrace().pushTraceInfo();
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("contribution to the " + "default substitute menu for " + "CaseCase", null));
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("contribution to the " + "default substitute menu for " + "CCase", null));
try {
return super.createMenuItems(context);
} finally {
......@@ -42,14 +42,14 @@ public class GrammarCellsSubstituteMenu_CaseCase extends SubstituteMenuBase {
}
private class GrammarCellsSubstituteMenuPart_hr7tfy_a extends GrammarCellsSubstituteMenuPart {
private class GrammarCellsSubstituteMenuPart_e59miz_a extends GrammarCellsSubstituteMenuPart {
@Override
public SModule getModule(SRepository repository) {
return PersistenceFacade.getInstance().createModuleReference("08d23328-33fa-47ce-89df-daaa7554f251(SumTypes)").resolve(repository);
}
@Override
public SAbstractConcept getExpectedOutputConcept() {
return MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CaseCase");
return MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, "SumTypes.structure.CCase");
}
}
}
......@@ -12,8 +12,8 @@ public class ConceptPresentationAspectImpl extends ConceptPresentationAspectBase
private ConceptPresentation props_Add;
private ConceptPresentation props_Anno;
private ConceptPresentation props_App;
private ConceptPresentation props_CCase;
private ConceptPresentation props_Case;
private ConceptPresentation props_CaseCase;
private ConceptPresentation props_Fun;
private ConceptPresentation props_IModuleElem;
private ConceptPresentation props_InL;
......@@ -61,6 +61,13 @@ public class ConceptPresentationAspectImpl extends ConceptPresentationAspectBase
props_App = cpb.create();
}
return props_App;
case LanguageConceptSwitch.CCase:
if (props_CCase == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
cpb.presentationByName();
props_CCase = cpb.create();
}
return props_CCase;
case LanguageConceptSwitch.Case:
if (props_Case == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
......@@ -68,13 +75,6 @@ public class ConceptPresentationAspectImpl extends ConceptPresentationAspectBase
props_Case = cpb.create();
}
return props_Case;
case LanguageConceptSwitch.CaseCase:
if (props_CaseCase == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
cpb.presentationByName();
props_CaseCase = cpb.create();
}
return props_CaseCase;
case LanguageConceptSwitch.Fun:
if (props_Fun == null) {
ConceptPresentationBuilder cpb = new ConceptPresentationBuilder();
......
......@@ -12,8 +12,8 @@ public final class LanguageConceptSwitch {
public static final int Add = 0;
public static final int Anno = 1;
public static final int App = 2;
public static final int Case = 3;
public static final int CaseCase = 4;
public static final int CCase = 3;
public static final int Case = 4;
public static final int Fun = 5;
public static final int IModuleElem = 6;
public static final int InL = 7;
......@@ -40,8 +40,8 @@ public final class LanguageConceptSwitch {
builder.put(0x1a4a252762eb9302L, Add);
builder.put(0x1a4a252762eb937fL, Anno);
builder.put(0x1a4a252762eb936bL, App);
builder.put(0x1a4a252762eba8aaL, CCase);
builder.put(0x1a4a252762eba873L, Case);
builder.put(0x1a4a252762eba8aaL, CaseCase);
builder.put(0x1a4a252762eb9390L, Fun);
builder.put(0x6efbff39c953ef86L, IModuleElem);
builder.put(0x1a4a252762eb9359L, InL);
......
......@@ -11,13 +11,14 @@ import jetbrains.mps.smodel.adapter.ids.SConceptId;
import jetbrains.mps.smodel.runtime.DataTypeDescriptor;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.runtime.impl.ConceptDescriptorBuilder2;
import jetbrains.mps.smodel.adapter.ids.PrimitiveTypeId;
public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
/*package*/ final ConceptDescriptor myConceptAdd = createDescriptorForAdd();
/*package*/ final ConceptDescriptor myConceptAnno = createDescriptorForAnno();
/*package*/ final ConceptDescriptor myConceptApp = createDescriptorForApp();
/*package*/ final ConceptDescriptor myConceptCCase = createDescriptorForCCase();
/*package*/ final ConceptDescriptor myConceptCase = createDescriptorForCase();
/*package*/ final ConceptDescriptor myConceptCaseCase = createDescriptorForCaseCase();
/*package*/ final ConceptDescriptor myConceptFun = createDescriptorForFun();
/*package*/ final ConceptDescriptor myConceptIModuleElem = createDescriptorForIModuleElem();
/*package*/ final ConceptDescriptor myConceptInL = createDescriptorForInL();
......@@ -46,7 +47,7 @@ public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
@Override
public Collection<ConceptDescriptor> getDescriptors() {
return Arrays.asList(myConceptAdd, myConceptAnno, myConceptApp, myConceptCase, myConceptCaseCase, myConceptFun, myConceptIModuleElem, myConceptInL, myConceptInR, myConceptLam, myConceptLet, myConceptModule, myConceptModuleElemDef, myConceptModuleElemEmpty, myConceptModuleImport, myConceptMult, myConceptNat, myConceptParensTerm, myConceptParensType, myConceptSucc, myConceptSum, myConceptTerm, myConceptType, myConceptVar, myConceptZero);
return Arrays.asList(myConceptAdd, myConceptAnno, myConceptApp, myConceptCCase, myConceptCase, myConceptFun, myConceptIModuleElem, myConceptInL, myConceptInR, myConceptLam, myConceptLet, myConceptModule, myConceptModuleElemDef, myConceptModuleElemEmpty, myConceptModuleImport, myConceptMult, myConceptNat, myConceptParensTerm, myConceptParensType, myConceptSucc, myConceptSum, myConceptTerm, myConceptType, myConceptVar, myConceptZero);
}
@Override
......@@ -59,10 +60,10 @@ public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
return myConceptAnno;
case LanguageConceptSwitch.App:
return myConceptApp;
case LanguageConceptSwitch.CCase:
return myConceptCCase;
case LanguageConceptSwitch.Case:
return myConceptCase;
case LanguageConceptSwitch.CaseCase:
return myConceptCaseCase;
case LanguageConceptSwitch.Fun:
return myConceptFun;
case LanguageConceptSwitch.IModuleElem:
......@@ -149,27 +150,29 @@ public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
b.aggregate("t2", 0x1a4a252762eb9378L).target(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d1L).optional(false).ordered(true).multiple(false).origin("1894367444356273016").done();
return b.create();
}
private static ConceptDescriptor createDescriptorForCCase() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("SumTypes", "CCase", 0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL);
b.class_(false, false, false);
b.parent(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L);
b.origin("r:07a3e6d7-5995-4fdf-b406-0bacec7c4659(SumTypes.structure)/1894367444356278442");
b.version(2);