/*package*/ static Scope getScope_id3fifI_xCJOQ(
     @NotNull SNode __thisNode__, SNode kind, SNode child) {
   if (SConceptOperations.isSubConceptOf(
       SNodeOperations.asSConcept(kind),
       MetaAdapterFactory.getConcept(
           0x18bc659203a64e29L,
           0xa83a7ff23bde13baL,
           0x11266742db0L,
           "jetbrains.mps.lang.editor.structure.TransformationMenuVariableDeclaration"))) {
     // For simplicity this does not take into account the position of the child, so variables
     // declared earlier may
     // (incorrectly) reference variables declared later.
     return new HidingByNameScope(
         MetaAdapterFactory.getConcept(
             0x18bc659203a64e29L,
             0xa83a7ff23bde13baL,
             0x11266742db0L,
             "jetbrains.mps.lang.editor.structure.TransformationMenuVariableDeclaration"),
         SNodeOperations.asSConcept(kind),
         new NamedElementsScope(
             SLinkOperations.getChildren(
                 __thisNode__,
                 MetaAdapterFactory.getContainmentLink(
                     0x18bc659203a64e29L,
                     0xa83a7ff23bde13baL,
                     0x671b36136d224047L,
                     0x6a3d2fa8211d204dL,
                     "variables"))),
         ScopeUtils.lazyParentScope(__thisNode__, kind));
   }
   return ScopeProvider__BehaviorDescriptor.getScope_id3fifI_xCJOQ.invokeSpecial(
       __thisNode__, kind, child);
 }
 public void test_IntroduceFinalField() throws Exception {
   addNodeById("4038232163187008744");
   addNodeById("4038232163187008759");
   IntroduceFieldRefactoring refactoring = new IntroduceFieldRefactoring();
   refactoring.init(
       SNodeOperations.cast(
           getNodeById("4038232163187008754"),
           SNodeOperations.asSConcept(
               MetaAdapterFactory.getConcept(
                   MetaAdapterFactory.getLanguage(
                       0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"),
                   0xf8cc67c7fbL,
                   "PlusExpression"))),
       null);
   refactoring.setName("i");
   refactoring.setIsFinal(true);
   refactoring.setFieldInitializationPlace(FieldInitializationPlace.FIELD);
   refactoring.setVisibilityLevel(VisibilityLevel.PRIVATE);
   refactoring.doRefactoring();
   {
     List<SNode> nodesBefore =
         ListSequence.fromListAndArray(
             new ArrayList<SNode>(),
             SNodeOperations.cast(
                 getNodeById("4038232163187008745"),
                 SNodeOperations.asSConcept(
                     MetaAdapterFactory.getConcept(
                         MetaAdapterFactory.getLanguage(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             "jetbrains.mps.baseLanguage"),
                         0xf8c108ca66L,
                         "ClassConcept"))));
     List<SNode> nodesAfter =
         ListSequence.fromListAndArray(
             new ArrayList<SNode>(),
             SNodeOperations.cast(
                 getNodeById("4038232163187008770"),
                 SNodeOperations.asSConcept(
                     MetaAdapterFactory.getConcept(
                         MetaAdapterFactory.getLanguage(
                             0xf3061a5392264cc5L,
                             0xa443f952ceaf5816L,
                             "jetbrains.mps.baseLanguage"),
                         0xf8c108ca66L,
                         "ClassConcept"))));
     Assert.assertNull(
         "The nodes '" + nodesBefore + "' and '" + nodesAfter + "' do not match!",
         new NodesMatcher().match(nodesBefore, nodesAfter));
   }
 }
 private static Scope getScope_id3fifI_xCJOQ(
     @NotNull SNode __thisNode__, SNode kind, SNode child) {
   if (child != null && child.getRoleInParent().equals("actualArgument")) {
     Scope argumentsScope =
         XMLSAXChildRule_BehaviorDescriptor.getArgumentsScope_id460OzqriLdX.invoke(
             __thisNode__, kind);
     if (argumentsScope != null) {
       return argumentsScope;
     }
   }
   if (child
       == SLinkOperations.getTarget(
           __thisNode__,
           MetaAdapterFactory.getContainmentLink(
               0xdcb5a83a19a844ffL,
               0xa4cbfc7d324ecc63L,
               0x1f6c736337b5e2d8L,
               0x4180d2369beda765L,
               "condition"))) {
     {
       SAbstractConcept cncpt = SNodeOperations.asSConcept((kind));
       if (SConceptOperations.isSubConceptOf(
           SNodeOperations.asSConcept(cncpt),
           MetaAdapterFactory.getConcept(
               0xdcb5a83a19a844ffL,
               0xa4cbfc7d324ecc63L,
               0x1f6c736337b5e2cbL,
               "jetbrains.mps.core.xml.sax.structure.XMLSAXAttributeRule"))) {
         return SimpleRoleScope.forNamedElements(
             SLinkOperations.getTarget(
                 __thisNode__,
                 MetaAdapterFactory.getReferenceLink(
                     0xdcb5a83a19a844ffL,
                     0xa4cbfc7d324ecc63L,
                     0x1f6c736337b5e2d8L,
                     0x1f6c736337b5e2dcL,
                     "rule")),
             MetaAdapterFactory.getContainmentLink(
                 0xdcb5a83a19a844ffL,
                 0xa4cbfc7d324ecc63L,
                 0x1f6c736337b5e2f2L,
                 0x1f6c736337b5e2f4L,
                 "attrs"));
       }
     }
   }
   return ScopeProvider_BehaviorDescriptor.getScope_id3fifI_xCJOQ.invokeSpecial(
       __thisNode__, kind, child);
 }
 public void execute(SNode node) {
   if ((boolean)
       Expression__BehaviorDescriptor.singleValue_id1o8Ht9sES3u.invoke(
           SNodeOperations.asSConcept(
               SNodeOperations.getConceptDeclaration(
                   SLinkOperations.getTarget(
                       ((SNode)
                           RemoveUnnecessaryParentheses_QuickFix.this
                               .getField("bottomLineParens")[0]),
                       MetaAdapterFactory.getContainmentLink(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0xfb4ed32b7fL,
                           0xfb4ed32b80L,
                           "expression")))))) {
     SNodeOperations.replaceWithAnother(
         node,
         SLinkOperations.getTarget(
             ((SNode) RemoveUnnecessaryParentheses_QuickFix.this.getField("bottomLineParens")[0]),
             MetaAdapterFactory.getContainmentLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0xfb4ed32b7fL,
                 0xfb4ed32b80L,
                 "expression")));
   }
   SNodeOperations.replaceWithAnother(
       node, ((SNode) RemoveUnnecessaryParentheses_QuickFix.this.getField("bottomLineParens")[0]));
 }
 public static List<SNode> virtual_getApplicableConceptFunctionParameter_3044950653914717136(
     SAbstractConcept thisConcept) {
   List<SNode> result =
       BehaviorReflection.invokeSuperStatic(
           (Class<List<SNode>>) ((Class) Object.class),
           SNodeOperations.asSConcept(thisConcept),
           "jetbrains.mps.baseLanguage.structure.ConceptFunction",
           "virtual_getApplicableConceptFunctionParameter_3044950653914717136",
           new Object[] {});
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c895902a8(jetbrains.mps.lang.actions.structure)",
               "5584396657084912703"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c895902a8(jetbrains.mps.lang.actions.structure)",
               "5584396657084920413"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c895902a8(jetbrains.mps.lang.actions.structure)",
               "5584396657084920670"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c895902bc(jetbrains.mps.lang.sharedConcepts.structure)",
               "1161622665029"));
   return result;
 }
Example #6
0
 public List<String> getPropertyValues(
     SNode node, IOperationContext operationContext, EditorContext editorContext) {
   return BwfJavaModule_Behavior.call_getCompilerNames_4416461515996720469(
       SNodeOperations.asSConcept(
           MetaAdapterFactory.getConcept(
               0x698a8d22a10447a0L,
               0xba8d10e3ec237f13L,
               0x41fde5e4adce38bbL,
               "jetbrains.mps.build.workflow.structure.BwfJavaModule")));
 }
 public Collection<ConceptEditor> getDeclaredEditors(SAbstractConcept concept) {
   {
     SAbstractConcept cncpt = ((SAbstractConcept) concept);
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0x58f98fef90ad4b72L,
             0xa390fad66ec7005aL,
             0x36fb0dc9fd3a3ad9L,
             "jetbrains.mps.core.properties.structure.PropertiesComment"))) {
       return Collections.<ConceptEditor>singletonList(new PropertiesComment_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0x58f98fef90ad4b72L,
             0xa390fad66ec7005aL,
             0x36fb0dc9fd3a3ac1L,
             "jetbrains.mps.core.properties.structure.PropertiesDeclaration"))) {
       return Collections.<ConceptEditor>singletonList(new PropertiesDeclaration_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0x58f98fef90ad4b72L,
             0xa390fad66ec7005aL,
             0x36fb0dc9fd3a2754L,
             "jetbrains.mps.core.properties.structure.PropertiesFile"))) {
       return Collections.<ConceptEditor>singletonList(new PropertiesFile_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0x58f98fef90ad4b72L,
             0xa390fad66ec7005aL,
             0x36fb0dc9fd3a3ac2L,
             "jetbrains.mps.core.properties.structure.PropertiesLine"))) {
       return Collections.<ConceptEditor>singletonList(new PropertiesLine_Editor());
     }
   }
   return Collections.<ConceptEditor>emptyList();
 }
 private static String getSuffix_id3gpm$NHlLhJ(@NotNull SNode __thisNode__) {
   return "_"
       + IGeneratedToClass_BehaviorDescriptor.getValidClassName_id3gpm$NHlLi1.invoke(
           SNodeOperations.asSConcept(
               MetaAdapterFactory.getInterfaceConcept(
                       0x73c1a49099fa4d0dL,
                       0x8292b8985697c74bL,
                       0xd244b712f9dcdabL,
                       "jetbrains.mps.execution.common.structure.IGeneratedToClass")
                   .getDeclarationNode()),
           __thisNode__.getNodeId().toString());
 }
 private static Scope getArgumentsScope_id460OzqriLdX(@NotNull SNode __thisNode__, SNode kind) {
   {
     SAbstractConcept cncpt = SNodeOperations.asSConcept((kind));
     if (SConceptOperations.isSubConceptOf(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xf3061a5392264cc5L,
             0xa443f952ceaf5816L,
             0xf8c37a7f6eL,
             "jetbrains.mps.baseLanguage.structure.VariableDeclaration"))) {
       return new EmptyScope();
     }
     if (SConceptOperations.isSubConceptOf(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xdcb5a83a19a844ffL,
             0xa4cbfc7d324ecc63L,
             0x1f6c736337b5e2cbL,
             "jetbrains.mps.core.xml.sax.structure.XMLSAXAttributeRule"))) {
       return SimpleRoleScope.forNamedElements(
           SNodeOperations.getNodeAncestor(
               __thisNode__,
               MetaAdapterFactory.getConcept(
                   0xdcb5a83a19a844ffL,
                   0xa4cbfc7d324ecc63L,
                   0x1f6c736337b5e2f2L,
                   "jetbrains.mps.core.xml.sax.structure.XMLSAXNodeRule"),
               false,
               false),
           MetaAdapterFactory.getContainmentLink(
               0xdcb5a83a19a844ffL,
               0xa4cbfc7d324ecc63L,
               0x1f6c736337b5e2f2L,
               0x1f6c736337b5e2f4L,
               "attrs"));
     }
   }
   return null;
 }
Example #10
0
 public static boolean static_canBeAParent(
     SNode node,
     SNode childNode,
     SNode childConcept,
     SNode link,
     final IOperationContext operationContext) {
   if (SConceptOperations.isSubConceptOf(
       SNodeOperations.asSConcept(childConcept),
       MetaAdapterFactory.getInterfaceConcept(
           0xf3061a5392264cc5L,
           0xa443f952ceaf5816L,
           0x112574373bdL,
           "jetbrains.mps.baseLanguage.structure.ClassifierMember"))) {
     SNode memberConcept = (SNode) childConcept;
     return BehaviorReflection.invokeVirtualStatic(
         Boolean.TYPE,
         SNodeOperations.asSConcept(memberConcept),
         "virtual_canBeInterfaceMember_2949815620938109095",
         new Object[] {});
   }
   return true;
 }
 /*package*/ static String getPresentation_idhEwIMiw(@NotNull SNode __thisNode__) {
   StringBuilder sb = new StringBuilder();
   BuildLayout_Node__BehaviorDescriptor.appendName_internal_id1bWeed$oEMe.invoke(
       SNodeOperations.asSConcept(
           MetaAdapterFactory.getConcept(
                   0x798100da4f0a421aL,
                   0xb99171f8c50ce5d2L,
                   0x668c6cfbafac4c85L,
                   "jetbrains.mps.build.structure.BuildLayout_Node")
               .getDeclarationNode()),
       __thisNode__,
       sb);
   return sb.toString();
 }
 public Collection<ConceptEditor> getDeclaredEditors(SAbstractConcept concept) {
   {
     SAbstractConcept cncpt = ((SAbstractConcept) concept);
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0x37e03aa1728949bcL,
             0x826930de5eceec76L,
             0x657f08af7deb331aL,
             "jetbrains.mps.vcs.mergehints.structure.MergeHint"))) {
       return Collections.<ConceptEditor>singletonList(new MergeHint_Editor());
     }
   }
   return Collections.<ConceptEditor>emptyList();
 }
 public Collection<ConceptEditor> getDeclaredEditors(SAbstractConcept concept) {
   {
     SAbstractConcept cncpt = ((SAbstractConcept) concept);
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0x1839bec5cea641dfL,
             0xb9e0c405ff35c41eL,
             0x20c051df23a9488cL,
             "jetbrains.mps.lang.editor.imageGen.structure.ImageGenerator"))) {
       return Collections.<ConceptEditor>singletonList(new ImageGenerator_Editor());
     }
   }
   return Collections.<ConceptEditor>emptyList();
 }
 public static List<SNode> virtual_getAvailableFor_3044950653914717035(
     SAbstractConcept thisConcept) {
   List<SNode> result =
       BehaviorReflection.invokeSuperStatic(
           (Class<List<SNode>>) ((Class) Object.class),
           SNodeOperations.asSConcept(thisConcept),
           "jetbrains.mps.baseLanguage.collections.structure.AbstractContainerCreator",
           "virtual_getAvailableFor_3044950653914717035",
           new Object[] {});
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c8959032e(jetbrains.mps.baseLanguage.collections.structure)",
               "1151688443754"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c8959032e(jetbrains.mps.baseLanguage.collections.structure)",
               "3357971920378033937"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c8959032e(jetbrains.mps.baseLanguage.collections.structure)",
               "5686963296372475025"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c8959032e(jetbrains.mps.baseLanguage.collections.structure)",
               "1151689724996"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c8959032e(jetbrains.mps.baseLanguage.collections.structure)",
               "3358009230509553641"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c8959032e(jetbrains.mps.baseLanguage.collections.structure)",
               "7125221305512719026"));
   ListSequence.fromList(result)
       .addElement(
           SNodeOperations.getNode(
               "r:00000000-0000-4000-0000-011c8959032e(jetbrains.mps.baseLanguage.collections.structure)",
               "6801639034384703212"));
   return result;
 }
 /*package*/ static void appendName_internal_id1bWeed$oEMe(
     @NotNull SAbstractConcept __thisConcept__, SNode node, StringBuilder sb) {
   SNode parent =
       SNodeOperations.as(
           SNodeOperations.getParent(node),
           MetaAdapterFactory.getInterfaceConcept(
               0x798100da4f0a421aL,
               0xb99171f8c50ce5d2L,
               0x62ec2ed0f87da183L,
               "jetbrains.mps.build.structure.BuildLayout_PathElement"));
   if (parent != null) {
     BuildLayout_Node__BehaviorDescriptor.appendName_internal_id1bWeed$oEMe.invoke(
         SNodeOperations.asSConcept(
             MetaAdapterFactory.getConcept(
                     0x798100da4f0a421aL,
                     0xb99171f8c50ce5d2L,
                     0x668c6cfbafac4c85L,
                     "jetbrains.mps.build.structure.BuildLayout_Node")
                 .getDeclarationNode()),
         parent,
         sb);
   }
   BuildLayout_PathElement__BehaviorDescriptor.appendName_id1bWeed$ownT.invoke(node, parent, sb);
 }
 public void applyRule(
     final SNode func, final TypeCheckingContext typeCheckingContext, IsApplicableStatus status) {
   // function is expected to return value of any type
   final SNode expectedRetType =
       (SConceptOperations.isExactly(
               SNodeOperations.asSConcept(
                   SNodeOperations.getConcept(
                       ConceptFunction__BehaviorDescriptor.getExpectedReturnType_idhEwIGRD.invoke(
                           func))),
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x110dae5f4a3L,
                   "jetbrains.mps.baseLanguage.structure.WildCardType"))
           ? null
           : ConceptFunction__BehaviorDescriptor.getExpectedReturnType_idhEwIGRD.invoke(func));
   boolean noReturnExpected =
       ((expectedRetType == null)
           || TypeChecker.getInstance()
               .getSubtypingManager()
               .isSubtype(expectedRetType, _quotation_createNode_bbraw4_b0a0a0c0b()));
   if (!(noReturnExpected)) {
     final SNode LCS_typevar_1186052624152 = typeCheckingContext.createNewRuntimeTypesVariable();
     Iterable<SNode> returnStatements =
         RulesFunctions_BaseLanguage.collectReturnStatements(
             SLinkOperations.getTarget(
                 func,
                 MetaAdapterFactory.getContainmentLink(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0x108bbca0f48L,
                     0x108bbd29b4aL,
                     "body")));
     // should return subtypes of the 'expected type'
     // if 'expected type' is null - should still return some value (of any type)
     for (SNode returnStatement : Sequence.fromIterable(returnStatements)) {
       if ((SLinkOperations.getTarget(
               returnStatement,
               MetaAdapterFactory.getContainmentLink(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0xf8cc67c7feL,
                   0xf8cc6bf96cL,
                   "expression"))
           == null)) {
         {
           MessageTarget errorTarget = new NodeMessageTarget();
           IErrorReporter _reporter_2309309498 =
               typeCheckingContext.reportTypeError(
                   returnStatement,
                   "should return value",
                   "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                   "1186053304501",
                   null,
                   errorTarget);
         }
       } else {
         {
           SNode _nodeToCheck_1029348928467 =
               SLinkOperations.getTarget(
                   returnStatement,
                   MetaAdapterFactory.getContainmentLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0xf8cc67c7feL,
                       0xf8cc6bf96cL,
                       "expression"));
           EquationInfo _info_12389875345 =
               new EquationInfo(
                   _nodeToCheck_1029348928467,
                   null,
                   "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                   "1186053304511",
                   0,
                   null);
           typeCheckingContext.createGreaterThanInequality(
               (SNode) typeCheckingContext.getRepresentative(LCS_typevar_1186052624152),
               (SNode)
                   typeCheckingContext.typeOf(
                       _nodeToCheck_1029348928467,
                       "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                       "1186053304515",
                       true),
               false,
               true,
               _info_12389875345);
         }
         if ((expectedRetType != null)) {
           if (!(typeCheckingContext.isSingleTypeComputation())) {
             {
               SNode _nodeToCheck_1029348928467 =
                   SLinkOperations.getTarget(
                       returnStatement,
                       MetaAdapterFactory.getContainmentLink(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0xf8cc67c7feL,
                           0xf8cc6bf96cL,
                           "expression"));
               EquationInfo _info_12389875345 =
                   new EquationInfo(
                       _nodeToCheck_1029348928467,
                       null,
                       "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                       "7630810368327770735",
                       0,
                       null);
               typeCheckingContext.createLessThanInequality(
                   (SNode)
                       typeCheckingContext.typeOf(
                           _nodeToCheck_1029348928467,
                           "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                           "7410236346363166597",
                           true),
                   (SNode) expectedRetType,
                   true,
                   true,
                   _info_12389875345);
             }
           }
         }
       }
     }
     // last expression statement can serve as return statement
     SNode lastStatement = IMethodLike__BehaviorDescriptor.getLastStatement_idi2fhS7A.invoke(func);
     if (SNodeOperations.isInstanceOf(
         lastStatement,
         MetaAdapterFactory.getConcept(
             0xf3061a5392264cc5L,
             0xa443f952ceaf5816L,
             0xf8cc56b213L,
             "jetbrains.mps.baseLanguage.structure.ExpressionStatement"))) {
       final SNode expression =
           SLinkOperations.getTarget(
               SNodeOperations.cast(
                   lastStatement,
                   MetaAdapterFactory.getConcept(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0xf8cc56b213L,
                       "jetbrains.mps.baseLanguage.structure.ExpressionStatement")),
               MetaAdapterFactory.getContainmentLink(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0xf8cc56b213L,
                   0xf8cc56b214L,
                   "expression"));
       {
         SNode _nodeToCheck_1029348928467 = expression;
         EquationInfo _info_12389875345 =
             new EquationInfo(
                 _nodeToCheck_1029348928467,
                 null,
                 "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                 "1186053063874",
                 0,
                 null);
         typeCheckingContext.createGreaterThanInequality(
             (SNode) typeCheckingContext.getRepresentative(LCS_typevar_1186052624152),
             (SNode)
                 typeCheckingContext.typeOf(
                     _nodeToCheck_1029348928467,
                     "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                     "1186053084979",
                     true),
             false,
             true,
             _info_12389875345);
       }
       if ((expectedRetType != null)) {
         if (!(typeCheckingContext.isSingleTypeComputation())) {
           {
             SNode _nodeToCheck_1029348928467 = expression;
             EquationInfo _info_12389875345 =
                 new EquationInfo(
                     _nodeToCheck_1029348928467,
                     null,
                     "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                     "7630810368327770756",
                     0,
                     null);
             typeCheckingContext.createLessThanInequality(
                 (SNode)
                     typeCheckingContext.typeOf(
                         _nodeToCheck_1029348928467,
                         "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                         "7410236346363168757",
                         true),
                 (SNode) expectedRetType,
                 true,
                 true,
                 _info_12389875345);
           }
         }
       }
     }
     {
       SNode _nodeToCheck_1029348928467 = func;
       EquationInfo _info_12389875345 =
           new EquationInfo(
               _nodeToCheck_1029348928467,
               null,
               "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
               "1186053174208",
               0,
               null);
       typeCheckingContext.createEquation(
           (SNode)
               typeCheckingContext.typeOf(
                   _nodeToCheck_1029348928467,
                   "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                   "1186053169643",
                   true),
           (SNode) typeCheckingContext.getRepresentative(LCS_typevar_1186052624152),
           _info_12389875345);
     }
     if ((expectedRetType != null)) {
       if (!(typeCheckingContext.isSingleTypeComputation())) {
         {
           SNode _nodeToCheck_1029348928467 = func;
           EquationInfo _info_12389875345 =
               new EquationInfo(
                   _nodeToCheck_1029348928467,
                   null,
                   "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                   "1186053540847",
                   0,
                   null);
           typeCheckingContext.createLessThanInequality(
               (SNode)
                   typeCheckingContext.typeOf(
                       _nodeToCheck_1029348928467,
                       "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                       "7410236346363168929",
                       true),
               (SNode) expectedRetType,
               true,
               true,
               _info_12389875345);
         }
       }
     }
   }
 }
 private static void ___init___(@NotNull SNode __thisNode__) {
   for (int i = 0;
       i
           < (int)
               Table__BehaviorDescriptor.getInitialRowCount_id1653mnvAgrI.invoke(
                   SNodeOperations.asSConcept(
                       SNodeOperations.getConceptDeclaration(__thisNode__)));
       i++) {
     SNode row =
         SConceptOperations.createNewNode(
             SNodeOperations.asInstanceConcept(
                 MetaAdapterFactory.getConcept(
                     0xdf8799e7254a406fL,
                     0xbd67f4cc27337152L,
                     0x28004d411fa3bea6L,
                     "jetbrains.mps.lang.editor.tableTests.structure.Row")));
     for (int j = 0;
         j
             < (int)
                 Table__BehaviorDescriptor.getInitialColumnCount_id1653mnvAgqE.invoke(
                     SNodeOperations.asSConcept(
                         SNodeOperations.getConceptDeclaration(__thisNode__)));
         j++) {
       SNode dataCell =
           SConceptOperations.createNewNode(
               SNodeOperations.asInstanceConcept(
                   MetaAdapterFactory.getConcept(
                       0xdf8799e7254a406fL,
                       0xbd67f4cc27337152L,
                       0x28004d411fa3bea4L,
                       "jetbrains.mps.lang.editor.tableTests.structure.DataCell")));
       SPropertyOperations.set(
           dataCell,
           MetaAdapterFactory.getProperty(
               0xdf8799e7254a406fL,
               0xbd67f4cc27337152L,
               0x28004d411fa3bea4L,
               0x28004d411fa3bea5L,
               "value"),
           "$" + i + " " + j + "$");
       ListSequence.fromList(
               SLinkOperations.getChildren(
                   row,
                   MetaAdapterFactory.getContainmentLink(
                       0xdf8799e7254a406fL,
                       0xbd67f4cc27337152L,
                       0x28004d411fa3bea6L,
                       0x28004d411fa3bea7L,
                       "cells")))
           .addElement(dataCell);
     }
     ListSequence.fromList(
             SLinkOperations.getChildren(
                 __thisNode__,
                 MetaAdapterFactory.getContainmentLink(
                     0xdf8799e7254a406fL,
                     0xbd67f4cc27337152L,
                     0x28004d411fa3bea0L,
                     0x28004d411fa3bea2L,
                     "rows")))
         .addElement(row);
   }
 }
  public static String getExpressionPresentation(@Nullable SNode expression) {
    if (expression == null) {
      return "????";
    }

    if (SNodeOperations.isInstanceOf(
        expression,
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0xfb4ed32b7fL,
            "jetbrains.mps.baseLanguage.structure.ParenthesizedExpression"))) {
      return "("
          + getExpressionPresentation(
              SLinkOperations.getTarget(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0xfb4ed32b7fL,
                          "jetbrains.mps.baseLanguage.structure.ParenthesizedExpression")),
                  MetaAdapterFactory.getContainmentLink(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0xfb4ed32b7fL,
                      0xfb4ed32b80L,
                      "expression")))
          + ")";
    }
    if (SNodeOperations.isInstanceOf(
        expression,
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0x6fea7de6103549b1L,
            "jetbrains.mps.baseLanguage.structure.UnaryMinus"))) {
      return "-"
          + getExpressionPresentation(
              SLinkOperations.getTarget(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0x6fea7de6103549b1L,
                          "jetbrains.mps.baseLanguage.structure.UnaryMinus")),
                  MetaAdapterFactory.getContainmentLink(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0x120a4c1f269L,
                      0x120a4c433a6L,
                      "expression")));
    }
    if (SNodeOperations.isInstanceOf(
        expression,
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0xfbcf6bd10dL,
            "jetbrains.mps.baseLanguage.structure.NotExpression"))) {
      return "!("
          + getExpressionPresentation(
              SLinkOperations.getTarget(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0xfbcf6bd10dL,
                          "jetbrains.mps.baseLanguage.structure.NotExpression")),
                  MetaAdapterFactory.getContainmentLink(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0xfbcf6bd10dL,
                      0xfbcf6c30a4L,
                      "expression")))
          + ")";
    }

    if (SNodeOperations.isInstanceOf(
        expression,
        MetaAdapterFactory.getInterfaceConcept(
            0xceab519525ea4f22L,
            0x9b92103b95ca8c0cL,
            0x110396eaaa4L,
            "jetbrains.mps.lang.core.structure.INamedConcept"))) {
      return SPropertyOperations.getString(
          SNodeOperations.cast(
              expression,
              MetaAdapterFactory.getInterfaceConcept(
                  0xceab519525ea4f22L,
                  0x9b92103b95ca8c0cL,
                  0x110396eaaa4L,
                  "jetbrains.mps.lang.core.structure.INamedConcept")),
          MetaAdapterFactory.getProperty(
              0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
    }

    if (SNodeOperations.isInstanceOf(
        expression,
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0x116b46a08c4L,
            "jetbrains.mps.baseLanguage.structure.DotExpression"))) {
      return getExpressionPresentation(
              SLinkOperations.getTarget(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0x116b46a08c4L,
                          "jetbrains.mps.baseLanguage.structure.DotExpression")),
                  MetaAdapterFactory.getContainmentLink(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0x116b46a08c4L,
                      0x116b46a4416L,
                      "operand")))
          + "."
          + getOperationPresentation(
              SLinkOperations.getTarget(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0x116b46a08c4L,
                          "jetbrains.mps.baseLanguage.structure.DotExpression")),
                  MetaAdapterFactory.getContainmentLink(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0x116b46a08c4L,
                      0x116b46b36c4L,
                      "operation")));
    }

    if (SNodeOperations.isInstanceOf(
        expression,
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0xfbdeb6fecfL,
            "jetbrains.mps.baseLanguage.structure.BinaryOperation"))) {
      return getExpressionPresentation(
              SLinkOperations.getTarget(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0xfbdeb6fecfL,
                          "jetbrains.mps.baseLanguage.structure.BinaryOperation")),
                  MetaAdapterFactory.getContainmentLink(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0xfbdeb6fecfL,
                      0xfbdeb7a11cL,
                      "leftExpression")))
          + SPropertyOperations.getString(
              SNodeOperations.getConceptDeclaration(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0xfbdeb6fecfL,
                          "jetbrains.mps.baseLanguage.structure.BinaryOperation"))),
              MetaAdapterFactory.getProperty(
                  0xc72da2b97cce4447L,
                  0x8389f407dc1158b7L,
                  0x1103553c5ffL,
                  0x46ab0ad5826c74caL,
                  "conceptAlias"))
          + getExpressionPresentation(
              SLinkOperations.getTarget(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0xfbdeb6fecfL,
                          "jetbrains.mps.baseLanguage.structure.BinaryOperation")),
                  MetaAdapterFactory.getContainmentLink(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0xfbdeb6fecfL,
                      0xfbdeb7a11bL,
                      "rightExpression")));
    }

    if (SNodeOperations.isInstanceOf(
        expression,
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0xf93d565d10L,
            "jetbrains.mps.baseLanguage.structure.StringLiteral"))) {
      return "\""
          + SPropertyOperations.getString(
              SNodeOperations.cast(
                  expression,
                  MetaAdapterFactory.getConcept(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0xf93d565d10L,
                      "jetbrains.mps.baseLanguage.structure.StringLiteral")),
              MetaAdapterFactory.getProperty(
                  0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d565d10L, 0xf93d565d11L, "value"))
          + "\"";
    }

    if (SNodeOperations.isInstanceOf(
        expression,
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0x10ab8473cc5L,
            "jetbrains.mps.baseLanguage.structure.GenericNewExpression"))) {
      return "new "
          + BaseConcept_BehaviorDescriptor.getPresentation_idhEwIMiw.invoke(
              SLinkOperations.getTarget(
                  SNodeOperations.cast(
                      expression,
                      MetaAdapterFactory.getConcept(
                          0xf3061a5392264cc5L,
                          0xa443f952ceaf5816L,
                          0x10ab8473cc5L,
                          "jetbrains.mps.baseLanguage.structure.GenericNewExpression")),
                  MetaAdapterFactory.getContainmentLink(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0x10ab8473cc5L,
                      0x10ab847b486L,
                      "creator")));
    }

    if (Expression_BehaviorDescriptor.constant_id1653mnvAgr2.invoke(
        SNodeOperations.asSConcept(SNodeOperations.getConcept(expression)))) {
      return Expression_BehaviorDescriptor.getCompileTimeConstantValue_idi1LP2xI.invoke(
              expression, SNodeOperations.getModel(expression).getModule())
          + "";
    }

    return BaseConcept_BehaviorDescriptor.getPresentation_idhEwIMiw.invoke(expression);
  }
Example #19
0
  private static PrecedenceUtil.Precedence getPriority(SNode expression) {
    if (SConceptOperations.isSubConceptOf(
        SNodeOperations.asSConcept(expression),
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0xfbdeb6fecfL,
            "jetbrains.mps.baseLanguage.structure.BinaryOperation"))) {
      switch (BehaviorReflection.invokeVirtualStatic(
          Integer.TYPE,
          SNodeOperations.asSConcept(
              SNodeOperations.castConcept(
                  expression,
                  MetaAdapterFactory.getConcept(
                      0xf3061a5392264cc5L,
                      0xa443f952ceaf5816L,
                      0xfbdeb6fecfL,
                      "jetbrains.mps.baseLanguage.structure.BinaryOperation"))),
          "virtual_getPriority_1262430001741497858",
          new Object[] {})) {
        case 2:
          // ||
          return PrecedenceUtil.Precedence.J_13;
        case 3:
          // &&
          return PrecedenceUtil.Precedence.J_12;
        case 4:
          // |
          return PrecedenceUtil.Precedence.J_11;
        case 5:
          // ^
          return PrecedenceUtil.Precedence.J_10;
        case 6:
          // &
          return PrecedenceUtil.Precedence.J_9;
        case 7:
          // ==, !=
          return PrecedenceUtil.Precedence.J_8;
        case 8:
          // <, <=, >, >=
          return PrecedenceUtil.Precedence.J_7;
        case 9:
          // >>, <<
          return PrecedenceUtil.Precedence.J_6;
        case 10:
          // +, -
          return PrecedenceUtil.Precedence.J_5;
        case 11:
          // *, /, %
          return PrecedenceUtil.Precedence.J_4;
        default:
      }
    }

    // TODO: not sure concerning ParenthesizedExpression priorities..
    if (SConceptOperations.isSubConceptOf(
        SNodeOperations.asSConcept(expression),
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0xfb4ed32b7fL,
            "jetbrains.mps.baseLanguage.structure.ParenthesizedExpression"))) {
      return PrecedenceUtil.Precedence.PARENTHESES;
    }
    // TODO: m.b. we should make "Default" precenence higher then all the user extensions
    // TODO: will be recognized as high-priority expressions
    if (SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x11126b40c25L,
                "jetbrains.mps.baseLanguage.structure.ArrayAccessExpression"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getInterfaceConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x11857355952L,
                "jetbrains.mps.baseLanguage.structure.IMethodCall"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0xf8c77f1e98L,
                "jetbrains.mps.baseLanguage.structure.VariableReference"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x515d7a8d927e9fb3L,
                "jetbrains.mps.baseLanguage.structure.LocalPropertyReference"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0x8388864671ce4f1cL,
                0x9c53c54016f6ad4fL,
                0x116ea555a25L,
                "jetbrains.mps.baseLanguage.collections.structure.MapElement"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0x8388864671ce4f1cL,
                0x9c53c54016f6ad4fL,
                0x11d6213c318L,
                "jetbrains.mps.baseLanguage.collections.structure.ListElementAccessExpression"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0x7866978ea0f04cc7L,
                0x81bc4d213d9375e1L,
                0x10975850da7L,
                "jetbrains.mps.lang.smodel.structure.SNodeTypeCastExpression"))) {
      return PrecedenceUtil.Precedence.ARRAY_OPARATIONS_AND_METHOD_CALLS;
    }
    if (SConceptOperations.isSubConceptOf(
        SNodeOperations.asSConcept(expression),
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0x116b46a08c4L,
            "jetbrains.mps.baseLanguage.structure.DotExpression"))) {
      return PrecedenceUtil.Precedence.DOT_EXPRESSION;
    }
    if (SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x11adecdb4f0L,
                "jetbrains.mps.baseLanguage.structure.PostfixIncrementExpression"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x11aded05fe6L,
                "jetbrains.mps.baseLanguage.structure.PostfixDecrementExpression"))) {
      return PrecedenceUtil.Precedence.POSTFIX_EXPRESSIONS;
    }
    if (SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x120a46df580L,
                "jetbrains.mps.baseLanguage.structure.PrefixIncrementExpression"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x120a472f0e8L,
                "jetbrains.mps.baseLanguage.structure.PrefixDecrementExpression"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x6fea7de6103549b1L,
                "jetbrains.mps.baseLanguage.structure.UnaryMinus"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0xfbcf6bd10dL,
                "jetbrains.mps.baseLanguage.structure.NotExpression"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x11d6d026f5fL,
                "jetbrains.mps.baseLanguage.structure.BitwiseNotExpression"))) {
      return PrecedenceUtil.Precedence.J_2;
    }
    if (SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0xf940dabe4aL,
                "jetbrains.mps.baseLanguage.structure.CastExpression"))
        || SConceptOperations.isSubConceptOf(
            SNodeOperations.asSConcept(expression),
            MetaAdapterFactory.getConcept(
                0xf3061a5392264cc5L,
                0xa443f952ceaf5816L,
                0x10ab8473cc5L,
                "jetbrains.mps.baseLanguage.structure.GenericNewExpression"))) {
      return PrecedenceUtil.Precedence.J_3;
    }
    if (SConceptOperations.isSubConceptOf(
        SNodeOperations.asSConcept(expression),
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0xfbbff03700L,
            "jetbrains.mps.baseLanguage.structure.InstanceOfExpression"))) {
      return PrecedenceUtil.Precedence.J_7;
    }
    if (SConceptOperations.isSubConceptOf(
        SNodeOperations.asSConcept(expression),
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0x10ef01239c9L,
            "jetbrains.mps.baseLanguage.structure.TernaryOperatorExpression"))) {
      return PrecedenceUtil.Precedence.J_14;
    }
    if (SConceptOperations.isSubConceptOf(
        SNodeOperations.asSConcept(expression),
        MetaAdapterFactory.getConcept(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0x11b0d00332cL,
            "jetbrains.mps.baseLanguage.structure.BaseAssignmentExpression"))) {
      return PrecedenceUtil.Precedence.J_15;
    }
    return PrecedenceUtil.Precedence.DEFAULT;
  }
Example #20
0
 @Deprecated
 @ToRemove(version = 3.3)
 public static Iterable<SNode> getAvailableConcepts(SNode contextNode, SNode metaConcept) {
   return getAvailableConcepts(contextNode, SNodeOperations.asSConcept(metaConcept));
 }
 public void applyRule(
     final SNode conceptDeclaration,
     final TypeCheckingContext typeCheckingContext,
     IsApplicableStatus status) {
   OldCommentMigraionCreator creator = new OldCommentMigraionCreator();
   if (SConceptOperations.isExactly(
           SNodeOperations.asSConcept(SNodeOperations.asSConcept(conceptDeclaration)),
           MetaAdapterFactory.getInterfaceConcept(
               0xceab519525ea4f22L,
               0x9b92103b95ca8c0cL,
               0x39384475a5756fb0L,
               "jetbrains.mps.lang.core.structure.IOldCommentContainer"))
       || SConceptOperations.isExactly(
           SNodeOperations.asSConcept(SNodeOperations.asSConcept(conceptDeclaration)),
           MetaAdapterFactory.getInterfaceConcept(
               0xceab519525ea4f22L,
               0x9b92103b95ca8c0cL,
               0x9b3ed4f3a4d01ecL,
               "jetbrains.mps.lang.core.structure.IOldCommentAnnotation"))) {
     return;
   }
   if (ListSequence.fromList(
               AbstractConceptDeclaration__BehaviorDescriptor.getImmediateSuperconcepts_idhMuxyK2
                   .invoke(conceptDeclaration))
           .contains(
               SNodeOperations.asNode(
                   MetaAdapterFactory.getInterfaceConcept(
                       0xceab519525ea4f22L,
                       0x9b92103b95ca8c0cL,
                       0x39384475a5756fb0L,
                       "jetbrains.mps.lang.core.structure.IOldCommentContainer")))
       && creator.canCreateMigration(conceptDeclaration)) {
     {
       MessageTarget errorTarget = new NodeMessageTarget();
       errorTarget = new PropertyMessageTarget("name");
       IErrorReporter _reporter_2309309498 =
           typeCheckingContext.reportWarning(
               conceptDeclaration,
               "Old comment container should be migrated",
               "r:cec599e3-51d2-48a7-af31-989e3cbd593c(jetbrains.mps.lang.core.typesystem)",
               "699163291709407479",
               null,
               errorTarget);
       {
         BaseQuickFixProvider intentionProvider =
             new BaseQuickFixProvider(
                 "jetbrains.mps.lang.core.typesystem.CreateIntentionForOldCommentContainer_QuickFix",
                 false);
         _reporter_2309309498.addIntentionProvider(intentionProvider);
       }
     }
   }
   if (ListSequence.fromList(
               AbstractConceptDeclaration__BehaviorDescriptor.getImmediateSuperconcepts_idhMuxyK2
                   .invoke(conceptDeclaration))
           .contains(
               SNodeOperations.asNode(
                   MetaAdapterFactory.getInterfaceConcept(
                       0xceab519525ea4f22L,
                       0x9b92103b95ca8c0cL,
                       0x9b3ed4f3a4d01ecL,
                       "jetbrains.mps.lang.core.structure.IOldCommentAnnotation")))
       && creator.canCreateMigration(conceptDeclaration)) {
     {
       MessageTarget errorTarget = new NodeMessageTarget();
       errorTarget = new PropertyMessageTarget("name");
       IErrorReporter _reporter_2309309498 =
           typeCheckingContext.reportWarning(
               conceptDeclaration,
               "Old comment annotation should be migrated",
               "r:cec599e3-51d2-48a7-af31-989e3cbd593c(jetbrains.mps.lang.core.typesystem)",
               "699163291709408708",
               null,
               errorTarget);
       {
         BaseQuickFixProvider intentionProvider =
             new BaseQuickFixProvider(
                 "jetbrains.mps.lang.core.typesystem.CreateIntentionForOldCommentAnnotation_QuickFix",
                 false);
         _reporter_2309309498.addIntentionProvider(intentionProvider);
       }
     }
   }
 }
 public Collection<ConceptEditor> getDeclaredEditors(SAbstractConcept concept) {
   {
     SAbstractConcept cncpt = ((SAbstractConcept) concept);
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x108050a5816L,
             "jetbrains.mps.samples.formulaLanguage.structure.AndOperation"))) {
       return Collections.<ConceptEditor>singletonList(new AndOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db857767L,
             "jetbrains.mps.samples.formulaLanguage.structure.Constant"))) {
       return Collections.<ConceptEditor>singletonList(new Constant_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x10809c54870L,
             "jetbrains.mps.samples.formulaLanguage.structure.EqualsOperation"))) {
       return Collections.<ConceptEditor>singletonList(new EqualsOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db824fa1L,
             "jetbrains.mps.samples.formulaLanguage.structure.Expression"))) {
       return Collections.<ConceptEditor>singletonList(new Expression_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db8bab3cL,
             "jetbrains.mps.samples.formulaLanguage.structure.FloatingPointConstant"))) {
       return Collections.<ConceptEditor>singletonList(new FloatingPointConstant_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db80c054L,
             "jetbrains.mps.samples.formulaLanguage.structure.Formula"))) {
       return Collections.<ConceptEditor>singletonList(new Formula_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db8296fcL,
             "jetbrains.mps.samples.formulaLanguage.structure.Function"))) {
       return Collections.<ConceptEditor>singletonList(new Function_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x103009e5ee0L,
             "jetbrains.mps.samples.formulaLanguage.structure.GreaterThanOperation"))) {
       return Collections.<ConceptEditor>singletonList(new GreaterThanOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db8d4298L,
             "jetbrains.mps.samples.formulaLanguage.structure.IfFunction"))) {
       return Collections.<ConceptEditor>singletonList(new IfFunction_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db8aa3f9L,
             "jetbrains.mps.samples.formulaLanguage.structure.IntegerConstant"))) {
       return Collections.<ConceptEditor>singletonList(new IntegerConstant_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x10a037c6c0bL,
             "jetbrains.mps.samples.formulaLanguage.structure.IsNullOperation"))) {
       return Collections.<ConceptEditor>singletonList(new IsNullOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102ea976b99L,
             "jetbrains.mps.samples.formulaLanguage.structure.LessThanOperation"))) {
       return Collections.<ConceptEditor>singletonList(new LessThanOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102dba2244aL,
             "jetbrains.mps.samples.formulaLanguage.structure.MinusOperation"))) {
       return Collections.<ConceptEditor>singletonList(new MinusOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102ff4441ddL,
             "jetbrains.mps.samples.formulaLanguage.structure.MultOperation"))) {
       return Collections.<ConceptEditor>singletonList(new MultOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x10a04135987L,
             "jetbrains.mps.samples.formulaLanguage.structure.NotOperation"))) {
       return Collections.<ConceptEditor>singletonList(new NotOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x10a036c79c0L,
             "jetbrains.mps.samples.formulaLanguage.structure.NullConstant"))) {
       return Collections.<ConceptEditor>singletonList(new NullConstant_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db8620dbL,
             "jetbrains.mps.samples.formulaLanguage.structure.Operation"))) {
       return Collections.<ConceptEditor>singletonList(new Operation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x108050ab746L,
             "jetbrains.mps.samples.formulaLanguage.structure.OrOperation"))) {
       return Collections.<ConceptEditor>singletonList(new OrOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x10809d032baL,
             "jetbrains.mps.samples.formulaLanguage.structure.ParenthisizedExpression"))) {
       return Collections.<ConceptEditor>singletonList(new ParenthisizedExpression_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102dba0a69dL,
             "jetbrains.mps.samples.formulaLanguage.structure.PlusOperation"))) {
       return Collections.<ConceptEditor>singletonList(new PlusOperation_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x102db83846eL,
             "jetbrains.mps.samples.formulaLanguage.structure.Reference"))) {
       return Collections.<ConceptEditor>singletonList(new Reference_Editor());
     }
     if (SConceptOperations.isExactly(
         SNodeOperations.asSConcept(cncpt),
         MetaAdapterFactory.getConcept(
             0xb1a9bc478a264792L,
             0x8b684660c531090aL,
             0x10804f6f702L,
             "jetbrains.mps.samples.formulaLanguage.structure.StringConstant"))) {
       return Collections.<ConceptEditor>singletonList(new StringConstant_Editor());
     }
   }
   return Collections.<ConceptEditor>emptyList();
 }