Esempio n. 1
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);
 }
 public static boolean static_canBeAChild(
     SNode node,
     SNode parentNode,
     SNode link,
     SNode childConcept,
     final IOperationContext operationContext) {
   return (SNodeOperations.getNodeAncestor(
               parentNode,
               MetaAdapterFactory.getConcept(
                   0x756e911c3f1f4a48L,
                   0xbdf5a2ceb91b723cL,
                   0xd244b712f91012dL,
                   "jetbrains.mps.execution.settings.structure.EditorOperationDeclaration"),
               true,
               false)
           == null)
       && (TypeChecker.getInstance()
               .getRuntimeSupport()
               .coerce_(
                   TypeChecker.getInstance()
                       .getTypeOf(
                           SLinkOperations.getTarget(
                               SNodeOperations.as(
                                   parentNode,
                                   MetaAdapterFactory.getConcept(
                                       0xf3061a5392264cc5L,
                                       0xa443f952ceaf5816L,
                                       0x116b46a08c4L,
                                       "jetbrains.mps.baseLanguage.structure.DotExpression")),
                               MetaAdapterFactory.getContainmentLink(
                                   0xf3061a5392264cc5L,
                                   0xa443f952ceaf5816L,
                                   0x116b46a08c4L,
                                   0x116b46a4416L,
                                   "operand"))),
                   HUtil.createMatchingPatternByConcept(
                       MetaAdapterFactory.getConcept(
                           0x756e911c3f1f4a48L,
                           0xbdf5a2ceb91b723cL,
                           0xd244b712f91001cL,
                           "jetbrains.mps.execution.settings.structure.PersistentConfigurationType")),
                   true)
           != null);
 }
Esempio n. 3
0
 @Deprecated
 private static boolean staticCanBeAChild_Old(
     SNode node,
     SNode parentNode,
     SNode link,
     SNode childConcept,
     final IOperationContext operationContext) {
   return SNodeOperations.isInstanceOf(
           parentNode,
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x116b46a08c4L,
               "jetbrains.mps.baseLanguage.structure.DotExpression"))
       && TypeChecker.getInstance()
               .getRuntimeSupport()
               .coerce_(
                   TypeChecker.getInstance()
                       .getTypeOf(
                           SLinkOperations.getTarget(
                               SNodeOperations.cast(
                                   parentNode,
                                   MetaAdapterFactory.getConcept(
                                       0xf3061a5392264cc5L,
                                       0xa443f952ceaf5816L,
                                       0x116b46a08c4L,
                                       "jetbrains.mps.baseLanguage.structure.DotExpression")),
                               MetaAdapterFactory.getContainmentLink(
                                   0xf3061a5392264cc5L,
                                   0xa443f952ceaf5816L,
                                   0x116b46a08c4L,
                                   0x116b46a4416L,
                                   "operand"))),
                   HUtil.createMatchingPatternByConcept(
                       MetaAdapterFactory.getConcept(
                           0x662a9f2b58024d16L,
                           0x955872c65c7a681eL,
                           0x4b9a2fe55913516aL,
                           "org.jetbrains.mps.samples.Money.structure.MoneyType")),
                   true)
           != null;
 }
Esempio n. 4
0
 public static Class call_getClass_1213877337327(SNode thisNode, SModule module) {
   return ReflectionUtil.forName(
       module,
       SLinkOperations.getTarget(
           TypeChecker.getInstance()
               .getRuntimeSupport()
               .coerce_(
                   thisNode,
                   HUtil.createMatchingPatternByConcept(
                       MetaAdapterFactory.getConcept(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0x101de48bf9eL,
                           "jetbrains.mps.baseLanguage.structure.ClassifierType")),
                   true),
           MetaAdapterFactory.getReferenceLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x101de48bf9eL,
               0x101de490babL,
               "classifier")));
 }
 private SNode getExpressionType(SNode node) {
   SNode expressionType =
       TypeChecker.getInstance()
           .getRuntimeSupport()
           .coerce_(
               TypeChecker.getInstance().getTypeOf(node),
               HUtil.createMatchingPatternByConcept(
                   MetaAdapterFactory.getConcept(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0xf8c37f506dL,
                       "jetbrains.mps.baseLanguage.structure.Type")),
               true);
   if (SNodeOperations.isInstanceOf(
       expressionType,
       MetaAdapterFactory.getInterfaceConcept(
           0xf3061a5392264cc5L,
           0xa443f952ceaf5816L,
           0x118cd59904dL,
           "jetbrains.mps.baseLanguage.structure.IInternalType"))) {
     expressionType =
         BehaviorReflection.invokeVirtual(
             (Class<SNode>) ((Class) Object.class),
             SNodeOperations.cast(
                 expressionType,
                 MetaAdapterFactory.getInterfaceConcept(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0x118cd59904dL,
                     "jetbrains.mps.baseLanguage.structure.IInternalType")),
             "virtual_getPublicType_1213877443338",
             new Object[] {});
   }
   if (SNodeOperations.isInstanceOf(
       expressionType,
       MetaAdapterFactory.getConcept(
           0xf3061a5392264cc5L,
           0xa443f952ceaf5816L,
           0x101de48bf9eL,
           "jetbrains.mps.baseLanguage.structure.ClassifierType"))) {
     SNode exprClassifier =
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 expressionType,
                 MetaAdapterFactory.getConcept(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0x101de48bf9eL,
                     "jetbrains.mps.baseLanguage.structure.ClassifierType")),
             MetaAdapterFactory.getReferenceLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0x101de48bf9eL,
                 0x101de490babL,
                 "classifier"));
     if (SNodeOperations.isInstanceOf(
         exprClassifier,
         MetaAdapterFactory.getConcept(
             0xf3061a5392264cc5L,
             0xa443f952ceaf5816L,
             0x1107e0cb103L,
             "jetbrains.mps.baseLanguage.structure.AnonymousClass"))) {
       List<SNode> params =
           SLinkOperations.getChildren(
               SNodeOperations.cast(
                   expressionType,
                   MetaAdapterFactory.getConcept(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0x101de48bf9eL,
                       "jetbrains.mps.baseLanguage.structure.ClassifierType")),
               MetaAdapterFactory.getContainmentLink(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x101de48bf9eL,
                   0x102419671abL,
                   "parameter"));
       expressionType =
           _quotation_createNode_x65dk2_a0b0b0c0l(
               SLinkOperations.getTarget(
                   SNodeOperations.cast(
                       exprClassifier,
                       MetaAdapterFactory.getConcept(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0x1107e0cb103L,
                           "jetbrains.mps.baseLanguage.structure.AnonymousClass")),
                   MetaAdapterFactory.getReferenceLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0x1107e0cb103L,
                       0x1107e0fd2a0L,
                       "classifier")));
       ListSequence.fromList(
               SLinkOperations.getChildren(
                   SNodeOperations.cast(
                       expressionType,
                       MetaAdapterFactory.getConcept(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0x101de48bf9eL,
                           "jetbrains.mps.baseLanguage.structure.ClassifierType")),
                   MetaAdapterFactory.getContainmentLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0x101de48bf9eL,
                       0x102419671abL,
                       "parameter")))
           .addSequence(ListSequence.fromList(params));
     }
   }
   if (SNodeOperations.isInstanceOf(
       expressionType,
       MetaAdapterFactory.getConcept(
           0xf3061a5392264cc5L,
           0xa443f952ceaf5816L,
           0x110dae5f4a3L,
           "jetbrains.mps.baseLanguage.structure.WildCardType"))) {
     expressionType = _quotation_createNode_x65dk2_a0a0d0l();
   }
   if (SNodeOperations.isInstanceOf(
       expressionType,
       MetaAdapterFactory.getConcept(
           0xf3061a5392264cc5L,
           0xa443f952ceaf5816L,
           0x110daeaa84aL,
           "jetbrains.mps.baseLanguage.structure.UpperBoundType"))) {
     expressionType =
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 expressionType,
                 MetaAdapterFactory.getConcept(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0x110daeaa84aL,
                     "jetbrains.mps.baseLanguage.structure.UpperBoundType")),
             MetaAdapterFactory.getContainmentLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0x110daeaa84aL,
                 0x110daeaa84bL,
                 "bound"));
   }
   if (SNodeOperations.isInstanceOf(
       expressionType,
       MetaAdapterFactory.getConcept(
           0xf3061a5392264cc5L,
           0xa443f952ceaf5816L,
           0x110dae9d53dL,
           "jetbrains.mps.baseLanguage.structure.LowerBoundType"))) {
     expressionType =
         SLinkOperations.getTarget(
             SNodeOperations.cast(
                 expressionType,
                 MetaAdapterFactory.getConcept(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0x110dae9d53dL,
                     "jetbrains.mps.baseLanguage.structure.LowerBoundType")),
             MetaAdapterFactory.getContainmentLink(
                 0xf3061a5392264cc5L,
                 0xa443f952ceaf5816L,
                 0x110dae9d53dL,
                 0x110dae9f25bL,
                 "bound"));
   }
   return expressionType;
 }