package jetbrains.mps.lang.actions.migration; /*Generated by MPS */ import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.smodel.Language; import org.jetbrains.mps.openapi.model.SModel; import jetbrains.mps.smodel.LanguageAspect; import jetbrains.mps.internal.collections.runtime.Sequence; import jetbrains.mps.baseLanguage.util.IdentifierConstraintsUtil; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SPropertyOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SConceptOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import org.jetbrains.mps.openapi.language.SAbstractConcept; import jetbrains.mps.internal.collections.runtime.ListSequence; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SNodeOperations; import jetbrains.mps.internal.collections.runtime.IVisitor; import jetbrains.mps.internal.collections.runtime.IWhereFilter; import java.util.List; import java.util.ArrayList; import jetbrains.mps.internal.collections.runtime.ISelector; import org.jetbrains.mps.openapi.model.SModelReference; import jetbrains.mps.smodel.SModelInternal; import java.util.Collection; import org.jetbrains.mps.openapi.module.SRepository; import jetbrains.mps.internal.collections.runtime.CollectionSequence; import org.jetbrains.mps.openapi.language.SLanguage; import org.jetbrains.mps.openapi.model.SReference; import jetbrains.mps.smodel.constraints.ModelConstraints; import org.jetbrains.mps.openapi.module.SModule; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SModelOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.AttributeOperations; import jetbrains.mps.lang.smodel.generator.smodelAdapter.IAttributeDescriptor; import org.jetbrains.mps.openapi.persistence.PersistenceFacade; import jetbrains.mps.smodel.SModelUtil_new; import org.jetbrains.mps.openapi.model.SNodeAccessUtil; public class ActionMigrationHelper { public static boolean isDefinedInLanguage(SNode concept, Language language) { SModel structure = LanguageAspect.STRUCTURE.get(language); return structure != null && Sequence.fromIterable(((Iterable<SNode>) structure.getRootNodes())).contains(concept); } public static SModel getOrCreateEditorAspect(Language language) { SModel editorAspect = getEditorAspect(language); if (editorAspect == null) { editorAspect = LanguageAspect.EDITOR.createNew(language); } return editorAspect; } public static SModel getEditorAspect(Language language) { return LanguageAspect.EDITOR.get(language); } public static SModel getActionsAspect(Language language) { return LanguageAspect.ACTIONS.get(language); } public static String getValidName(String name) { if (name == null) { return name; } name = name.replace(' ', '_'); if (IdentifierConstraintsUtil.isJavaReserved(name)) { name = name + "_"; } return name; } public static String getMainMenuContributionName(SNode concept, String tag) { return SPropertyOperations.getString(concept, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")) + "_" + tag + "_Contribution"; } public static String getMainMenuContributionName(SNode concept) { return SPropertyOperations.getString(concept, MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")) + "_Contribution"; } public static SNode wrapDotExpressionToStatement(SNode expression) { SNode expressionStatement = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, "jetbrains.mps.baseLanguage.structure.ExpressionStatement")); SLinkOperations.setTarget(expressionStatement, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, 0xf8cc56b214L, "expression"), expression); return expressionStatement; } public static void replace(SNode result, SAbstractConcept conceptToReplace, final SAbstractConcept conceptToReplaceOnto) { ListSequence.fromList(SNodeOperations.getNodeDescendants(result, SNodeOperations.asSConcept(conceptToReplace), false, new SAbstractConcept[]{})).visitAll(new IVisitor<SNode>() { public void visit(SNode it) { SNodeOperations.replaceWithAnother(it, SConceptOperations.createNewNode(SNodeOperations.asInstanceConcept(conceptToReplaceOnto))); } }); } public static SNode getLastStatement(SNode statementList) { return ListSequence.fromList(SLinkOperations.getChildren(statementList, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L, 0xf8cc6bf961L, "statement"))).reversedList().findFirst(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return !((eq_qgr84z_a0a0a0a0a0a0a0j(SNodeOperations.getConcept(it), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b215L, "jetbrains.mps.baseLanguage.structure.Statement")))); } }); } public static List<SNode> getAllReturnedExpressions(SNode body) { List<SNode> expressionsToWrap = ListSequence.fromList(new ArrayList<SNode>()); SNode lastStatement = ActionMigrationHelper.getLastStatement(body); if (SNodeOperations.isInstanceOf(lastStatement, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, "jetbrains.mps.baseLanguage.structure.ExpressionStatement")) && !(SNodeOperations.isInstanceOf(SLinkOperations.getTarget(SNodeOperations.cast(lastStatement, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, "jetbrains.mps.baseLanguage.structure.ExpressionStatement")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, 0xf8cc56b214L, "expression")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940cd6167L, "jetbrains.mps.baseLanguage.structure.NullLiteral")))) { ListSequence.fromList(expressionsToWrap).addElement(SLinkOperations.getTarget(SNodeOperations.cast(lastStatement, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, "jetbrains.mps.baseLanguage.structure.ExpressionStatement")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, 0xf8cc56b214L, "expression"))); } ListSequence.fromList(expressionsToWrap).addSequence(ListSequence.fromList(SNodeOperations.getNodeDescendants(body, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7feL, "jetbrains.mps.baseLanguage.structure.ReturnStatement"), false, new SAbstractConcept[]{})).select(new ISelector<SNode, SNode>() { public SNode select(SNode it) { return SLinkOperations.getTarget(SNodeOperations.cast(it, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7feL, "jetbrains.mps.baseLanguage.structure.ReturnStatement")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7feL, 0xf8cc6bf96cL, "expression")); } })); return expressionsToWrap; } public static void addModelImport(SModel model, SModel modelToImport) { if (neq_qgr84z_a0a0l(modelToImport, model)) { SModelReference reference = modelToImport.getReference(); if (model instanceof SModelInternal && !(((SModelInternal) model).getModelImports().contains(reference))) { ((SModelInternal) model).addModelImport(reference); } } } public static void replaceReturnsWithSelectAndReturn(SNode body) { SNode lastStatement = ActionMigrationHelper.getLastStatement(body); if (SNodeOperations.isInstanceOf(lastStatement, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, "jetbrains.mps.baseLanguage.structure.ExpressionStatement"))) { if (SNodeOperations.isInstanceOf(SLinkOperations.getTarget(SNodeOperations.cast(lastStatement, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, "jetbrains.mps.baseLanguage.structure.ExpressionStatement")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, 0xf8cc56b214L, "expression")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940cd6167L, "jetbrains.mps.baseLanguage.structure.NullLiteral"))) { SNodeOperations.deleteNode(lastStatement); } else { SNode dot = createSelectingOperation(SLinkOperations.getTarget(SNodeOperations.cast(lastStatement, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, "jetbrains.mps.baseLanguage.structure.ExpressionStatement")), MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b213L, 0xf8cc56b214L, "expression"))); SNode expressionStatement = ActionMigrationHelper.wrapDotExpressionToStatement(dot); SNodeOperations.replaceWithAnother(lastStatement, expressionStatement); } } List<SNode> returns = SNodeOperations.getNodeDescendants(body, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7feL, "jetbrains.mps.baseLanguage.structure.ReturnStatement"), false, new SAbstractConcept[]{}); for (SNode returnStatement : ListSequence.fromList(returns)) { if (SNodeOperations.isInstanceOf(SLinkOperations.getTarget(returnStatement, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7feL, 0xf8cc6bf96cL, "expression")), MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940cd6167L, "jetbrains.mps.baseLanguage.structure.NullLiteral"))) { SNodeOperations.deleteNode(SLinkOperations.getTarget(returnStatement, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7feL, 0xf8cc6bf96cL, "expression"))); continue; } SNode returnExpression = SLinkOperations.getTarget(returnStatement, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7feL, 0xf8cc6bf96cL, "expression")); SNode dot = createSelectingOperation(returnExpression); SNode selectingStatement = ActionMigrationHelper.wrapDotExpressionToStatement(dot); SNodeOperations.replaceWithAnother(returnStatement, selectingStatement); if (neq_qgr84z_a0f0d0n(returnStatement, lastStatement)) { SNodeOperations.insertNextSiblingChild(selectingStatement, _quotation_createNode_qgr84z_a0a0a5a3a31()); } } } public static void replaceReturnsIconNodeWithReturnIconResource(SNode body) { List<SNode> expressionsToWrap = getAllReturnedExpressions(body); ListSequence.fromList(expressionsToWrap).visitAll(new IVisitor<SNode>() { public void visit(SNode expression) { SNode expressionToReplaceWith; if (SNodeOperations.isInstanceOf(expression, MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x110f9eb64c6L, "jetbrains.mps.lang.smodel.structure.ConceptRefExpression"))) { SNode conceptDeclaration = SLinkOperations.getTarget(SNodeOperations.cast(expression, MetaAdapterFactory.getConcept(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x110f9eb64c6L, "jetbrains.mps.lang.smodel.structure.ConceptRefExpression")), MetaAdapterFactory.getReferenceLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x110f9eb64c6L, 0x110f9ec0c2aL, "conceptDeclaration")); expressionToReplaceWith = _quotation_createNode_qgr84z_a0b0b0a0a1a41(conceptDeclaration); SNodeOperations.replaceWithAnother(expression, expressionToReplaceWith); } else if (!(SNodeOperations.isInstanceOf(expression, MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf940cd6167L, "jetbrains.mps.baseLanguage.structure.NullLiteral")))) { expressionToReplaceWith = _quotation_createNode_qgr84z_a0a0a1a0a0b0o(); SNodeOperations.replaceWithAnother(expression, expressionToReplaceWith); SLinkOperations.setTarget(SNodeOperations.cast(expressionToReplaceWith, MetaAdapterFactory.getConcept(0x982eb8df2c964bd7L, 0x996311712ea622e5L, 0x7ce019825925c1aL, "jetbrains.mps.lang.resources.structure.NodeIconResourceExpression")), MetaAdapterFactory.getContainmentLink(0x982eb8df2c964bd7L, 0x996311712ea622e5L, 0x7ce019825925c1aL, 0x7ce019825925c1cL, "node"), expression); } } }); } public static SNode createSelectingOperation(SNode returnExpression) { SNode dot = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, "jetbrains.mps.baseLanguage.structure.DotExpression")); SLinkOperations.setTarget(dot, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46a4416L, "operand"), returnExpression); SNode select = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x329d4406465c63a0L, "jetbrains.mps.lang.editor.structure.SelectInEditorOperation")); SLinkOperations.setTarget(select, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x329d4406465c63a0L, 0x1b0a9b8c0e947adeL, "editorContext"), SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x10e76200a6fL, "jetbrains.mps.lang.editor.structure.ConceptFunctionParameter_editorContext"))); SLinkOperations.setTarget(select, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x329d4406465c63a0L, 0x1b0a9b8c0eb90bdeL, "cellSelector"), _quotation_createNode_qgr84z_a0e0p()); SLinkOperations.setTarget(select, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x329d4406465c63a0L, 0x320558d6ffc96d72L, "selectionStart"), _quotation_createNode_qgr84z_a0f0p()); SLinkOperations.setTarget(dot, MetaAdapterFactory.getContainmentLink(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46a08c4L, 0x116b46b36c4L, "operation"), select); return dot; } public static void addMissingImports(Collection<SNode> roots, SModel newModel, SModel oldModel, SRepository repository) { if (!(newModel instanceof SModelInternal) || !(oldModel instanceof SModelInternal)) { return; } for (SNode root : CollectionSequence.fromCollection(roots)) { for (SNode node : ListSequence.fromList(SNodeOperations.getNodeDescendants(root, MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL, "jetbrains.mps.lang.core.structure.BaseConcept"), false, new SAbstractConcept[]{}))) { ActionMigrationHelper.addMissingLanguageImport(node, ((SModelInternal) oldModel), ((SModelInternal) newModel)); ActionMigrationHelper.addMissingModelImports(node, repository, ((SModelInternal) oldModel), ((SModelInternal) newModel)); } } } private static void addMissingModelImports(SNode node, SRepository repository, SModelInternal oldModel, SModelInternal newModel) { List<SModelReference> missingModelImports = findMissingModelImports(node, repository); for (SModelReference modelImport : ListSequence.fromList(missingModelImports)) { SModel resolve = modelImport.resolve(repository); if ((oldModel.getModelImports().contains(modelImport) || eq_qgr84z_a0a0a0b0b0r(oldModel, resolve)) && !(newModel.getModelImports().contains(modelImport)) && neq_qgr84z_a0a1a1a71(newModel, resolve)) { newModel.addModelImport(modelImport); } } } private static void addMissingLanguageImport(SNode node, SModelInternal oldModel, SModelInternal newModel) { SLanguage language = node.getConcept().getLanguage(); if ((oldModel.importedLanguageIds().contains(language) || eq_qgr84z_a0a0a1a81(language, MetaAdapterFactory.getLanguage(0x982eb8df2c964bd7L, 0x996311712ea622e5L, "jetbrains.mps.lang.resources"))) && !(newModel.importedLanguageIds().contains(language))) { newModel.addLanguage(language); } } /** * copied from Dependency Helper */ private static List<SModelReference> findMissingModelImports(SNode node, SRepository repository) { ArrayList<SModelReference> rv = new ArrayList<SModelReference>(); for (SReference ref : node.getReferences()) { SModelReference targetModelRef = ref.getTargetSModelReference(); SModel modelToImport = (targetModelRef == null ? null : targetModelRef.resolve(repository)); if (modelToImport == null) { continue; } if (!(ModelConstraints.getScope(ref).contains(ref.getTargetNode()))) { rv.add(targetModelRef); } } return rv; } public static SNode createLocation(String side) { if (side == null) { side = ""; } SNode result = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x28336854e4c19a06L, "jetbrains.mps.lang.editor.structure.TransformationLocation_SideTransform")); if (eq_qgr84z_a0c0v(side, "left")) { addLeftPlaceInCell(result); } else if (eq_qgr84z_a0a2a12(side, "")) { addRightPlaceInCell(result); } else if (eq_qgr84z_a0b2a12(side, "both")) { addLeftPlaceInCell(result); addRightPlaceInCell(result); } return result; } private static void addLeftPlaceInCell(SNode result) { SNode place = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x30335f3d1845bdccL, "jetbrains.mps.lang.editor.structure.TransformationLocation_SideTransform_PlaceInCellHolder")); SPropertyOperations.set(place, MetaAdapterFactory.getProperty(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x30335f3d1845bdccL, 0x30335f3d1845bdcdL, "placeInCell"), "LEFT"); ListSequence.fromList(SLinkOperations.getChildren(result, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x28336854e4c19a06L, 0x30335f3d1845bdcfL, "placeInCell"))).addElement(place); } private static void addRightPlaceInCell(SNode result) { SNode place = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x30335f3d1845bdccL, "jetbrains.mps.lang.editor.structure.TransformationLocation_SideTransform_PlaceInCellHolder")); SPropertyOperations.set(place, MetaAdapterFactory.getProperty(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x30335f3d1845bdccL, 0x30335f3d1845bdcdL, "placeInCell"), "RIGHT"); ListSequence.fromList(SLinkOperations.getChildren(result, MetaAdapterFactory.getContainmentLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x28336854e4c19a06L, 0x30335f3d1845bdcfL, "placeInCell"))).addElement(place); } public static SNode findMainNamedMenu(final SNode concept, final String tag) { SModule module = SNodeOperations.getModel(concept).getModule(); if (!(module instanceof Language)) { return null; } SModel conceptEditorAspect = ActionMigrationHelper.getEditorAspect(((Language) module)); return ListSequence.fromList(SModelOperations.roots(conceptEditorAspect, MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x4e0f93d8a0ac4ee8L, "jetbrains.mps.lang.editor.structure.TransformationMenu_Named"))).where(new IWhereFilter<SNode>() { public boolean accept(SNode it) { return eq_qgr84z_a0a0a0a0a0a0a4a52(SLinkOperations.getTarget(it, MetaAdapterFactory.getReferenceLink(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x169efbc9a9048c53L, 0x5b7b4c4d511049b4L, "conceptDeclaration")), concept) && (AttributeOperations.getAttribute(it, new IAttributeDescriptor.NodeAttribute(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x7ce019825aa4e82L, "jetbrains.mps.lang.editor.structure.MigratedSideTransformMenuAttribute"))) != null) && eq_qgr84z_a0a0a0a0a0a0e0z(SPropertyOperations.getString(AttributeOperations.getAttribute(it, new IAttributeDescriptor.NodeAttribute(MetaAdapterFactory.getConcept(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x7ce019825aa4e82L, "jetbrains.mps.lang.editor.structure.MigratedSideTransformMenuAttribute"))), MetaAdapterFactory.getProperty(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x7ce019825aa4e82L, 0x7ce019825aa4f13L, "transformTag")), tag); } }).first(); } private static boolean eq_qgr84z_a0a0a0a0a0a0a0j(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } private static boolean neq_qgr84z_a0a0l(Object a, Object b) { return !(((a != null ? a.equals(b) : a == b))); } private static SNode _quotation_createNode_qgr84z_a0a0a5a3a31() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc67c7feL, "ReturnStatement"), null, null, false); return quotedNode_1; } private static boolean neq_qgr84z_a0f0d0n(Object a, Object b) { return !(((a != null ? a.equals(b) : a == b))); } private static SNode _quotation_createNode_qgr84z_a0b0b0a0a1a41(Object parameter_1) { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_2 = null; SNode quotedNode_3 = null; quotedNode_2 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x982eb8df2c964bd7L, 0x996311712ea622e5L, "jetbrains.mps.lang.resources"), 0x7ce01982590bd1eL, "ConceptIconResourceExpression"), null, null, false); quotedNode_3 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, "jetbrains.mps.lang.smodel"), 0x1120c45902cL, "RefConcept_Reference"), null, null, false); SNodeAccessUtil.setReferenceTarget(quotedNode_3, MetaAdapterFactory.getReferenceLink(0x7866978ea0f04cc7L, 0x81bc4d213d9375e1L, 0x1120c45902cL, 0x1120c45d024L, "conceptDeclaration"), (SNode) parameter_1); quotedNode_2.addChild(MetaAdapterFactory.getContainmentLink(0x982eb8df2c964bd7L, 0x996311712ea622e5L, 0x7ce01982590bd1eL, 0x426bf72c54e74e64L, "concept"), quotedNode_3); return quotedNode_2; } private static SNode _quotation_createNode_qgr84z_a0a0a1a0a0b0o() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x982eb8df2c964bd7L, 0x996311712ea622e5L, "jetbrains.mps.lang.resources"), 0x7ce019825925c1aL, "NodeIconResourceExpression"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_qgr84z_a0e0p() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, "jetbrains.mps.lang.editor"), 0x313a48d996236c93L, "PredefinedSelector"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_1, MetaAdapterFactory.getProperty(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x313a48d996236c93L, 0x1e02662c4b881e34L, "cellId"), "mostRelevant"); return quotedNode_1; } private static SNode _quotation_createNode_qgr84z_a0f0p() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf8cc59b314L, "IntegerConstant"), null, null, false); SNodeAccessUtil.setProperty(quotedNode_1, MetaAdapterFactory.getProperty(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc59b314L, 0xf8cc59b315L, "value"), "-1"); return quotedNode_1; } private static boolean neq_qgr84z_a0a1a1a71(Object a, Object b) { return !(((a != null ? a.equals(b) : a == b))); } private static boolean eq_qgr84z_a0a0a0b0b0r(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } private static boolean eq_qgr84z_a0a0a1a81(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } private static boolean eq_qgr84z_a0c0v(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } private static boolean eq_qgr84z_a0a2a12(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } private static boolean eq_qgr84z_a0b2a12(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } private static boolean eq_qgr84z_a0a0a0a0a0a0e0z(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } private static boolean eq_qgr84z_a0a0a0a0a0a0a4a52(Object a, Object b) { return (a != null ? a.equals(b) : a == b); } }