private static SNode _quotation_createNode_icy1a5_a0a2a1(Object parameter_1, Object parameter_2) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           MetaAdapterFactory.getConcept(
               0x8388864671ce4f1cL,
               0x9c53c54016f6ad4fL,
               0x120c2ad6432L,
               "jetbrains.mps.baseLanguage.collections.structure.LinkedHashMapCreator"),
           null,
           null,
           false);
   quotedNode_4 = (SNode) parameter_1;
   if (quotedNode_4 != null) {
     quotedNode_3.addChild(
         MetaAdapterFactory.getContainmentLink(
             0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x116dbb34f2dL, 0x116dbb5b4d0L, "keyType"),
         HUtil.copyIfNecessary(quotedNode_4));
   }
   quotedNode_5 = (SNode) parameter_2;
   if (quotedNode_5 != null) {
     quotedNode_3.addChild(
         MetaAdapterFactory.getContainmentLink(
             0x8388864671ce4f1cL,
             0x9c53c54016f6ad4fL,
             0x116dbb34f2dL,
             0x116dbb5d76dL,
             "valueType"),
         HUtil.copyIfNecessary(quotedNode_5));
   }
   return quotedNode_3;
 }
 private static SNode _quotation_createNode_78c6t8_a0a0a(
     Object parameter_1, Object parameter_2, Object parameter_3) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   SNode quotedNode_7 = null;
   quotedNode_4 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.TernaryOperatorExpression",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_5 = (SNode) parameter_1;
   if (quotedNode_5 != null) {
     quotedNode_4.addChild("condition", HUtil.copyIfNecessary(quotedNode_5));
   }
   quotedNode_6 = (SNode) parameter_2;
   if (quotedNode_6 != null) {
     quotedNode_4.addChild("ifTrue", HUtil.copyIfNecessary(quotedNode_6));
   }
   quotedNode_7 = (SNode) parameter_3;
   if (quotedNode_7 != null) {
     quotedNode_4.addChild("ifFalse", HUtil.copyIfNecessary(quotedNode_7));
   }
   return quotedNode_4;
 }
 private static SNode _quotation_createNode_9rcmzr_a0e0b(Object parameter_1, Object parameter_2) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           MetaAdapterFactory.getConcept(
               0x8388864671ce4f1cL,
               0x9c53c54016f6ad4fL,
               0x120cf0ddd15L,
               "jetbrains.mps.baseLanguage.collections.structure.MappingType"),
           null,
           null,
           false);
   quotedNode_4 = (SNode) parameter_1;
   if (quotedNode_4 != null) {
     quotedNode_3.addChild(
         MetaAdapterFactory.getContainmentLink(
             0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x120cf0ddd15L, 0x120cf0e3925L, "keyType"),
         HUtil.copyIfNecessary(quotedNode_4));
   }
   quotedNode_5 = (SNode) parameter_2;
   if (quotedNode_5 != null) {
     quotedNode_3.addChild(
         MetaAdapterFactory.getContainmentLink(
             0x8388864671ce4f1cL,
             0x9c53c54016f6ad4fL,
             0x120cf0ddd15L,
             0x120cf0e4f44L,
             "valueType"),
         HUtil.copyIfNecessary(quotedNode_5));
   }
   return quotedNode_3;
 }
 private static SNode _quotation_createNode_baxqxe_a0a0c0b(
     Object parameter_1, Object parameter_2, Object parameter_3, Object parameter_4) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   SNode quotedNode_7 = null;
   SNode quotedNode_8 = null;
   quotedNode_5 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.FieldDeclaration",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   SNodeAccessUtil.setProperty(quotedNode_5, "name", (String) parameter_4);
   quotedNode_6 = (SNode) parameter_1;
   if (quotedNode_6 != null) {
     quotedNode_5.addChild("visibility", HUtil.copyIfNecessary(quotedNode_6));
   }
   quotedNode_7 = (SNode) parameter_2;
   if (quotedNode_7 != null) {
     quotedNode_5.addChild("type", HUtil.copyIfNecessary(quotedNode_7));
   }
   quotedNode_8 = (SNode) parameter_3;
   if (quotedNode_8 != null) {
     quotedNode_5.addChild("initializer", HUtil.copyIfNecessary(quotedNode_8));
   }
   return quotedNode_5;
 }
 public SNode createNode(Object parameter_5, final TypeCheckingContext typeCheckingContext) {
   SNode result = null;
   Set<SNode> _parameterValues_129834374 = new HashSet<SNode>();
   SNode quotedNode_1 = null;
   SNode quotedNode_2 = null;
   {
     quotedNode_1 =
         SModelUtil_new.instantiateConceptDeclaration(
             "jetbrains.mps.baseLanguage.collections.structure.SequenceType",
             null,
             GlobalScope.getInstance(),
             false);
     SNode quotedNode1_3 = quotedNode_1;
     {
       quotedNode_2 = (SNode) parameter_5;
       SNode quotedNode1_4;
       if (_parameterValues_129834374.contains(quotedNode_2)) {
         quotedNode1_4 = HUtil.copyIfNecessary(quotedNode_2, typeCheckingContext);
       } else {
         _parameterValues_129834374.add(quotedNode_2);
         quotedNode1_4 = quotedNode_2;
       }
       if (quotedNode1_4 != null) {
         quotedNode_1.addChild(
             "elementType", HUtil.copyIfNecessary(quotedNode1_4, typeCheckingContext));
       }
     }
     result = quotedNode1_3;
   }
   return result;
 }
 private static SNode _quotation_createNode_yti4yq_a0a61a1a0a(
     Object parameter_1, Object parameter_2, Object parameter_3, Object parameter_4) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   SNode quotedNode_7 = null;
   SNode quotedNode_8 = null;
   SNode quotedNode_9 = null;
   SNode quotedNode_10 = null;
   SNode quotedNode_11 = null;
   SNode quotedNode_12 = null;
   quotedNode_5 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration", null, null, false);
   SNodeAccessUtil.setProperty(quotedNode_5, "isAbstract", "true");
   SNodeAccessUtil.setProperty(quotedNode_5, "name", "assign");
   quotedNode_6 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ParameterDeclaration", null, null, false);
   SNodeAccessUtil.setProperty(quotedNode_6, "name", "from");
   quotedNode_10 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType", null, null, false);
   SNodeAccessUtil.setReferenceTarget(quotedNode_10, "classifier", (SNode) parameter_2);
   {
     List<SNode> nodes = (List<SNode>) parameter_1;
     for (SNode child : nodes) {
       quotedNode_10.addChild("parameter", HUtil.copyIfNecessary(child));
     }
   }
   quotedNode_6.addChild("type", quotedNode_10);
   quotedNode_5.addChild("parameter", quotedNode_6);
   quotedNode_7 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.PublicVisibility", null, null, false);
   quotedNode_5.addChild("visibility", quotedNode_7);
   quotedNode_8 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.StatementList", null, null, false);
   quotedNode_5.addChild("body", quotedNode_8);
   quotedNode_9 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType", null, null, false);
   SNodeAccessUtil.setReferenceTarget(quotedNode_9, "classifier", (SNode) parameter_4);
   {
     List<SNode> nodes = (List<SNode>) parameter_3;
     for (SNode child : nodes) {
       quotedNode_9.addChild("parameter", HUtil.copyIfNecessary(child));
     }
   }
   quotedNode_5.addChild("returnType", quotedNode_9);
   return quotedNode_5;
 }
 private static SNode _quotation_createNode_5trf1k_a0a4a41a0(
     Object parameter_1, Object parameter_2, Object parameter_3) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   SNode quotedNode_7 = null;
   SNode quotedNode_8 = null;
   SNode quotedNode_9 = null;
   quotedNode_4 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   SNodeAccessUtil.setProperty(quotedNode_4, "name", (String) parameter_3);
   quotedNode_5 = (SNode) parameter_1;
   if (quotedNode_5 != null) {
     quotedNode_4.addChild("returnType", HUtil.copyIfNecessary(quotedNode_5));
   }
   quotedNode_6 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.PublicVisibility",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_4.addChild("visibility", quotedNode_6);
   quotedNode_7 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.StatementList",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_8 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ExpressionStatement",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_9 = (SNode) parameter_2;
   if (quotedNode_9 != null) {
     quotedNode_8.addChild("expression", HUtil.copyIfNecessary(quotedNode_9));
   }
   quotedNode_7.addChild("statement", quotedNode_8);
   quotedNode_4.addChild("body", quotedNode_7);
   return quotedNode_4;
 }
Exemple #8
0
 public static SNode getOutputNodeType_fromSourceQuery(SNode query) {
   if (query == null) {
     return _quotation_createNode_w9106s_a0a0a5();
   }
   SNode OutputType = TypeChecker.getInstance().getTypeOf(query);
   if (SNodeOperations.isInstanceOf(
       OutputType, "jetbrains.mps.lang.smodel.structure.SNodeListType")) {
     return _quotation_createNode_w9106s_a0a2a5(
         SLinkOperations.getTarget(
             SNodeOperations.cast(OutputType, "jetbrains.mps.lang.smodel.structure.SNodeListType"),
             "elementConcept",
             false));
   } else {
     SNode outputSNodeType =
         TypeChecker.getInstance()
             .getRuntimeSupport()
             .coerce_(
                 OutputType,
                 HUtil.createMatchingPatternByConceptFQName(
                     "jetbrains.mps.lang.smodel.structure.SNodeType"),
                 true);
     if (outputSNodeType != null) {
       return outputSNodeType;
     } else {
       SNode outputSequenceType =
           TypeChecker.getInstance()
               .getRuntimeSupport()
               .coerce_(
                   OutputType,
                   HUtil.createMatchingPatternByConceptFQName(
                       "jetbrains.mps.baseLanguage.collections.structure.SequenceType"),
                   true);
       if (outputSequenceType != null) {
         SNode elementType = SLinkOperations.getTarget(outputSequenceType, "elementType", true);
         SNode outputSNodeType2 =
             TypeChecker.getInstance()
                 .getRuntimeSupport()
                 .coerce_(
                     elementType,
                     HUtil.createMatchingPatternByConceptFQName(
                         "jetbrains.mps.lang.smodel.structure.SNodeType"),
                     true);
         if (outputSNodeType2 != null) {
           return outputSNodeType2;
         }
       }
     }
   }
   return _quotation_createNode_w9106s_a3a5();
 }
 private static SNode _quotation_createNode_w26thq_a0a3a1(Object parameter_1) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_2.setReference(
       "classifier",
       SReference.create(
           "classifier",
           quotedNode_2,
           facade.createModelReference(
               "f:java_stub#6354ebe7-c22a-4a0f-ac54-50b52ab9b065#java.util(JDK/java.util@java_stub)"),
           facade.createNodeId("~List")));
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild("parameter", HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }
 private static SNode _quotation_createNode_rsqk7y_a0a0(Object parameter_1) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           MetaAdapterFactory.getConcept(
               0x8388864671ce4f1cL,
               0x9c53c54016f6ad4fL,
               0x2e9a0b9a890137e9L,
               "jetbrains.mps.baseLanguage.collections.structure.LinkedListType"),
           null,
           null,
           false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild(
         MetaAdapterFactory.getContainmentLink(
             0x8388864671ce4f1cL,
             0x9c53c54016f6ad4fL,
             0x10c25fb076aL,
             0x10c25fe95c5L,
             "elementType"),
         HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }
 private static SNode _quotation_createNode_qzfpnd_a0a0c0a(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.closures.structure.FunctionType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.SequenceType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_4 = (SNode) parameter_1;
   if (quotedNode_4 != null) {
     quotedNode_3.addChild("elementType", HUtil.copyIfNecessary(quotedNode_4));
   }
   quotedNode_2.addChild("resultType", quotedNode_3);
   return quotedNode_2;
 }
 public List<SNode> getSubOrSuperTypes(
     SNode listType, TypeCheckingContext typeCheckingContext, IsApplicableStatus status) {
   List<SNode> result = new ArrayList<SNode>();
   SNode classifierType =
       TypeChecker.getInstance()
           .getRuntimeSupport()
           .coerce_(
               SLinkOperations.getTarget(listType, "elementType", true),
               HUtil.createMatchingPatternByConceptFQName(
                   "jetbrains.mps.baseLanguage.structure.ClassifierType"),
               true,
               typeCheckingContext);
   if (SLinkOperations.getTarget(classifierType, "classifier", false)
       == SLinkOperations.getTarget(
           new supertypesOf_ListType_ListType_elementSNode_SubtypingRule
                   .QuotationClass_84rynv_a0a0c0a()
               .createNode(typeCheckingContext),
           "classifier",
           false)) {
     ListSequence.fromList(result)
         .addElement(
             new supertypesOf_ListType_ListType_elementSNode_SubtypingRule
                     .QuotationClass_84rynv_a0a0a0c0a()
                 .createNode(typeCheckingContext));
   }
   return result;
 }
 private static SNode _quotation_createNode_5c1jtb_a0b0a0d0a(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.closures.structure.FunctionType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild("parameterType", HUtil.copyIfNecessary(quotedNode_3));
   }
   quotedNode_4 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.VoidType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_2.addChild("resultType", quotedNode_4);
   return quotedNode_2;
 }
 private static SNode _quotation_createNode_9rcmzr_a0f0b(Object parameter_1) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           MetaAdapterFactory.getConcept(
               0x8388864671ce4f1cL,
               0x9c53c54016f6ad4fL,
               0x11d91cbbcd0L,
               "jetbrains.mps.baseLanguage.collections.structure.SetType"),
           null,
           null,
           false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild(
         MetaAdapterFactory.getContainmentLink(
             0x8388864671ce4f1cL,
             0x9c53c54016f6ad4fL,
             0x11d91cbbcd0L,
             0x11d91cc51e3L,
             "elementType"),
         HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }
 private static SNode _quotation_createNode_yti4yq_a0a0a8a1a0a(
     Object parameter_1, Object parameter_2) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration", null, null, false);
   SNodeAccessUtil.setProperty(quotedNode_3, "isAbstract", "true");
   SNodeAccessUtil.setProperty(quotedNode_3, "name", (String) parameter_1);
   quotedNode_4 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.PublicVisibility", null, null, false);
   quotedNode_3.addChild("visibility", quotedNode_4);
   quotedNode_5 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.StatementList", null, null, false);
   quotedNode_3.addChild("body", quotedNode_5);
   quotedNode_6 = (SNode) parameter_2;
   if (quotedNode_6 != null) {
     quotedNode_3.addChild("returnType", HUtil.copyIfNecessary(quotedNode_6));
   }
   return quotedNode_3;
 }
 private static SNode _quotation_createNode_fj2vg7_a0m0b(Object parameter_1, Object parameter_2) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x101de48bf9eL,
               "jetbrains.mps.baseLanguage.structure.ClassifierType"),
           null,
           null,
           false);
   SNodeAccessUtil.setReferenceTarget(
       quotedNode_3,
       MetaAdapterFactory.getReferenceLink(
           0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101de48bf9eL, 0x101de490babL, "classifier"),
       (SNode) parameter_1);
   {
     List<SNode> nodes = (List<SNode>) parameter_2;
     for (SNode child : nodes) {
       quotedNode_3.addChild(
           MetaAdapterFactory.getContainmentLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x101de48bf9eL,
               0x102419671abL,
               "parameter"),
           HUtil.copyIfNecessary(child));
     }
   }
   return quotedNode_3;
 }
Exemple #17
0
 public static SNode getBinaryOperationType(SNode leftType, SNode rightType, boolean mayBeString) {
   List<SNode> leastCommonSupertypes =
       SubtypingUtil.leastCommonSuperTypes(Arrays.asList(leftType, rightType), null);
   if (mayBeString) {
     SModel javaLangJavaStubModelDescriptor =
         SModelRepository.getInstance()
             .getModelDescriptor(SModelReference.fromString("java.lang@java_stub"));
     assert javaLangJavaStubModelDescriptor != null;
     SModel javaLang = javaLangJavaStubModelDescriptor.getSModel();
     SNode stringClass = SModelOperations.getRootByName(javaLang, "String");
     if (SNodeOperations.isInstanceOf(
                 leftType, "jetbrains.mps.baseLanguage.structure.ClassifierType")
             && SLinkOperations.getTarget(
                     (SNodeOperations.cast(
                         leftType, "jetbrains.mps.baseLanguage.structure.ClassifierType")),
                     "classifier",
                     false)
                 == stringClass
         || SNodeOperations.isInstanceOf(
                 rightType, "jetbrains.mps.baseLanguage.structure.ClassifierType")
             && SLinkOperations.getTarget(
                     (SNodeOperations.cast(
                         rightType, "jetbrains.mps.baseLanguage.structure.ClassifierType")),
                     "classifier",
                     false)
                 == stringClass) {
       SNode classifierType =
           SConceptOperations.createNewNode(
               "jetbrains.mps.baseLanguage.structure.ClassifierType", null);
       SLinkOperations.setTarget(
           classifierType,
           "classifier",
           SNodeOperations.cast(stringClass, "jetbrains.mps.baseLanguage.structure.Classifier"),
           false);
       return classifierType;
     }
   }
   if (leastCommonSupertypes.isEmpty()) {
     SNode runtimeErrorType =
         SConceptOperations.createNewNode(
             "jetbrains.mps.lang.typesystem.structure.RuntimeErrorType", null);
     SPropertyOperations.set(runtimeErrorType, "errorText", "incompatible types");
     return runtimeErrorType;
   }
   SNode type = leastCommonSupertypes.iterator().next();
   {
     IMatchingPattern pattern_j6k1pf_e0c =
         HUtil.createMatchingPatternByConceptFQName(
             "jetbrains.mps.baseLanguage.structure.PrimitiveType");
     SNode coercedNode_j6k1pf_e0c =
         TypeChecker.getInstance().getRuntimeSupport().coerce_(type, pattern_j6k1pf_e0c);
     if (coercedNode_j6k1pf_e0c != null) {
       return coercedNode_j6k1pf_e0c;
     } else {
       return type;
     }
   }
 }
 public SNode createNode(Object parameter_7, Object parameter_8) {
   SNode result = null;
   Set<SNode> _parameterValues_129834374 = new HashSet<SNode>();
   SNode quotedNode_1 = null;
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   {
     quotedNode_1 =
         SModelUtil_new.instantiateConceptDeclaration(
             "jetbrains.mps.baseLanguage.collections.structure.MapType",
             null,
             GlobalScope.getInstance(),
             false);
     SNode quotedNode1_4 = quotedNode_1;
     {
       quotedNode_2 = (SNode) parameter_7;
       SNode quotedNode1_5;
       if (_parameterValues_129834374.contains(quotedNode_2)) {
         quotedNode1_5 = HUtil.copyIfNecessary(quotedNode_2);
       } else {
         _parameterValues_129834374.add(quotedNode_2);
         quotedNode1_5 = quotedNode_2;
       }
       if (quotedNode1_5 != null) {
         quotedNode_1.addChild("keyType", HUtil.copyIfNecessary(quotedNode1_5));
       }
     }
     {
       quotedNode_3 = (SNode) parameter_8;
       SNode quotedNode1_6;
       if (_parameterValues_129834374.contains(quotedNode_3)) {
         quotedNode1_6 = HUtil.copyIfNecessary(quotedNode_3);
       } else {
         _parameterValues_129834374.add(quotedNode_3);
         quotedNode1_6 = quotedNode_3;
       }
       if (quotedNode1_6 != null) {
         quotedNode_1.addChild("valueType", HUtil.copyIfNecessary(quotedNode1_6));
       }
     }
     result = quotedNode1_4;
   }
   return result;
 }
 private static SNode _quotation_createNode_baxqxe_a0g0b(Object parameter_1, Object parameter_2) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   SNode quotedNode_7 = null;
   SNode quotedNode_8 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ExpressionStatement",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_4 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.AssignmentExpression",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_5 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.DotExpression",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_7 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ThisExpression",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_5.addChild("operand", quotedNode_7);
   quotedNode_8 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.FieldReferenceOperation",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   SNodeAccessUtil.setReferenceTarget(quotedNode_8, "fieldDeclaration", (SNode) parameter_1);
   quotedNode_5.addChild("operation", quotedNode_8);
   quotedNode_4.addChild("lValue", quotedNode_5);
   quotedNode_6 = (SNode) parameter_2;
   if (quotedNode_6 != null) {
     quotedNode_4.addChild("rValue", HUtil.copyIfNecessary(quotedNode_6));
   }
   quotedNode_3.addChild("expression", quotedNode_4);
   return quotedNode_3;
 }
 private static SNode _quotation_createNode_cekk5b_a0a0b(Object parameter_1, Object parameter_2) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.MappingType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_4 = (SNode) parameter_1;
   if (quotedNode_4 != null) {
     quotedNode_3.addChild("keyType", HUtil.copyIfNecessary(quotedNode_4));
   }
   quotedNode_5 = (SNode) parameter_2;
   if (quotedNode_5 != null) {
     quotedNode_3.addChild("valueType", HUtil.copyIfNecessary(quotedNode_5));
   }
   return quotedNode_3;
 }
 private static SNode _quotation_createNode_pin8c2_a0d0b(Object parameter_1) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.SequenceType", null, null, false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild("elementType", HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }
Exemple #22
0
 public static SNode virtual_getJavaType_1213877337345(SNode thisNode) {
   return TypeChecker.getInstance()
       .getRuntimeSupport()
       .coerce_(
           thisNode,
           HUtil.createMatchingPatternByConcept(
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x101de48bf9eL,
                   "jetbrains.mps.baseLanguage.structure.ClassifierType")),
           true);
 }
 private static SNode _quotation_createNode_yti4yq_a0a0a0a0p0b0a0(Object parameter_1) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.UpperBoundType", null, null, false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild("bound", HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }
 private static SNode _quotation_createNode_jxb36x_a0e0b(Object parameter_1, Object parameter_2) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   SNode quotedNode_5 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           MetaAdapterFactory.getConcept(
               0xfd3920347849419dL,
               0x907112563d152375L,
               0x1174a4d19ffL,
               "jetbrains.mps.baseLanguage.closures.structure.FunctionType"),
           null,
           null,
           false);
   quotedNode_4 = (SNode) parameter_1;
   if (quotedNode_4 != null) {
     quotedNode_3.addChild(
         MetaAdapterFactory.getContainmentLink(
             0xfd3920347849419dL,
             0x907112563d152375L,
             0x1174a4d19ffL,
             0x1174a4e013cL,
             "parameterType"),
         HUtil.copyIfNecessary(quotedNode_4));
   }
   quotedNode_5 = (SNode) parameter_2;
   if (quotedNode_5 != null) {
     quotedNode_3.addChild(
         MetaAdapterFactory.getContainmentLink(
             0xfd3920347849419dL,
             0x907112563d152375L,
             0x1174a4d19ffL,
             0x1174a4d5371L,
             "resultType"),
         HUtil.copyIfNecessary(quotedNode_5));
   }
   return quotedNode_3;
 }
 private static SNode _quotation_createNode_yti4yq_a0n0b0a0(
     Object parameter_1, Object parameter_2, Object parameter_3, Object parameter_4) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_5 = null;
   SNode quotedNode_6 = null;
   SNode quotedNode_7 = null;
   SNode quotedNode_8 = null;
   SNode quotedNode_9 = null;
   SNode quotedNode_10 = null;
   SNode quotedNode_11 = null;
   SNode quotedNode_12 = null;
   quotedNode_5 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.Interface", null, null, false);
   SNodeAccessUtil.setProperty(quotedNode_5, "nonStatic", "true");
   SNodeAccessUtil.setProperty(quotedNode_5, "name", (String) parameter_3);
   quotedNode_6 = (SNode) parameter_1;
   if (quotedNode_6 != null) {
     quotedNode_5.addChild("extendedInterface", HUtil.copyIfNecessary(quotedNode_6));
   }
   quotedNode_7 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.PublicVisibility", null, null, false);
   quotedNode_5.addChild("visibility", quotedNode_7);
   {
     List<SNode> nodes = (List<SNode>) parameter_2;
     for (SNode child : nodes) {
       quotedNode_5.addChild("typeVariableDeclaration", HUtil.copyIfNecessary(child));
     }
   }
   {
     List<SNode> nodes = (List<SNode>) parameter_4;
     for (SNode child : nodes) {
       quotedNode_5.addChild("member", HUtil.copyIfNecessary(child));
     }
   }
   return quotedNode_5;
 }
 private static SNode _quotation_createNode_9sowee_a0e0b(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.collections.structure.SortedSetType",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild("elementType", HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }
 private static SNode _quotation_createNode_teq92u_a3a0(Object parameter_1, Object parameter_2) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_3 = null;
   SNode quotedNode_4 = null;
   quotedNode_3 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassifierType", null, null, false);
   SNodeAccessUtil.setReferenceTarget(quotedNode_3, "classifier", (SNode) parameter_2);
   {
     List<SNode> nodes = (List<SNode>) parameter_1;
     for (SNode child : nodes) {
       quotedNode_3.addChild("parameter", HUtil.copyIfNecessary(child));
     }
   }
   return quotedNode_3;
 }
Exemple #28
0
 public static boolean hasVariablesInside(SNode node) {
   if (isRuntimeTypeVariable(node)) {
     return true;
   }
   for (SNode child : node.getChildren()) {
     if (hasVariablesInside(child)) {
       return true;
     }
   }
   for (SNode referent : TypesUtil.getNodeReferents(node)) {
     if (referent != null && HUtil.isRuntimeTypeVariable(referent)) {
       return true;
     }
   }
   return false;
 }
 private static SNode _quotation_createNode_tfz3o4_a0a0c0j(Object parameter_1) {
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ExpressionStatement",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild("expression", HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }
Exemple #30
0
 private static SNode _quotation_createNode_st4ewd_a0b0c0a0b0b0b(Object parameter_1) {
   PersistenceFacade facade = PersistenceFacade.getInstance();
   SNode quotedNode_2 = null;
   SNode quotedNode_3 = null;
   quotedNode_2 =
       SModelUtil_new.instantiateConceptDeclaration(
           "jetbrains.mps.lang.resources.structure.IconResourceExpression",
           null,
           null,
           GlobalScope.getInstance(),
           false);
   quotedNode_3 = (SNode) parameter_1;
   if (quotedNode_3 != null) {
     quotedNode_2.addChild("icon", HUtil.copyIfNecessary(quotedNode_3));
   }
   return quotedNode_2;
 }