Ejemplo n.º 1
0
 public static boolean baseMappingRule_Condition_1566704013439143567(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   if (!(SNodeOperations.getConceptDeclaration(SNodeOperations.getParent(_context.getNode()))
       == SConceptOperations.findConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.StatementList"))) {
     return false;
   }
   SNode methodLike =
       SNodeOperations.getAncestor(
           SNodeOperations.getParent(_context.getNode()),
           "jetbrains.mps.baseLanguage.structure.IMethodLike",
           false,
           false);
   if (!(BehaviorReflection.invokeVirtual(
           (Class<SNode>) ((Class) Object.class),
           methodLike,
           "virtual_getLastStatement_1239354409446",
           new Object[] {})
       == _context.getNode())) {
     return false;
   }
   if (!(LastStatementUtil.canMakeReturnStatement(_context.getNode()))) {
     return false;
   }
   return true;
 }
Ejemplo n.º 2
0
  public static boolean baseMappingRule_Condition_2379134940425784781(
      final IOperationContext operationContext, final BaseMappingRuleContext _context) {
    boolean methodHasDispatchModifier =
        SNodeOperations.isInstanceOf(
                SNodeOperations.getParent(_context.getNode()),
                "jetbrains.mps.baseLanguage.structure.MethodDeclaration")
            && ListSequence.fromList(
                    SLinkOperations.getTargets(
                        SNodeOperations.cast(
                            SNodeOperations.getParent(_context.getNode()),
                            "jetbrains.mps.baseLanguage.structure.MethodDeclaration"),
                        "modifiers",
                        true))
                .any(
                    new IWhereFilter<SNode>() {
                      public boolean accept(SNode it) {
                        return SNodeOperations.isInstanceOf(
                            it,
                            "jetbrains.mps.baseLanguage.doubleDispatch.structure.DispatchModifier");
                      }
                    });

    return methodHasDispatchModifier
        && Sequence.fromIterable(
                DispatchGenUtil.getMatchingMethods(
                    SNodeOperations.cast(
                        SNodeOperations.getParent(_context.getNode()),
                        "jetbrains.mps.baseLanguage.structure.MethodDeclaration")))
            .isNotEmpty();
  }
Ejemplo n.º 3
0
 public static boolean baseMappingRule_Condition_1220369573364358067(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return _context.getSessionObject(
           "jetbrains.mps.gwt.client.generator.runtime-weaving.done"
               + _context.getNode().getSNodeId().toString())
       == null;
 }
Ejemplo n.º 4
0
 public static boolean baseMappingRule_Condition_1196428788645(
     final BaseMappingRuleContext _context) {
   return SNodeOperations.isInstanceOf(
           TypeChecker.getInstance()
               .getTypeOf(
                   SLinkOperations.getTarget(
                       _context.getNode(),
                       MetaAdapterFactory.getContainmentLink(
                           0xf3061a5392264cc5L,
                           0xa443f952ceaf5816L,
                           0xfbdeb6fecfL,
                           0xfbdeb7a11cL,
                           "leftExpression"))),
           MetaAdapterFactory.getConcept(
               0xff24ab03965e4d15L,
               0x9aed52dc276658f4L,
               0x11686a0422aL,
               "jetbrains.mps.samples.complex.structure.ComplexType"))
       && TypeChecker.getInstance()
           .getSubtypingManager()
           .isSubtype(
               TypeChecker.getInstance()
                   .getTypeOf(
                       SLinkOperations.getTarget(
                           _context.getNode(),
                           MetaAdapterFactory.getContainmentLink(
                               0xf3061a5392264cc5L,
                               0xa443f952ceaf5816L,
                               0xfbdeb6fecfL,
                               0xfbdeb7a11bL,
                               "rightExpression"))),
               _quotation_createNode_x583g4_b0a0a0c());
 }
Ejemplo n.º 5
0
 public static boolean baseMappingRule_Condition_1202780894871(
     final BaseMappingRuleContext _context) {
   if (!(SPropertyOperations.hasValue(
       SNodeOperations.cast(
           SNodeOperations.getAncestor(_context.getNode(), null, false, true),
           "jetbrains.mps.transformation.test.inputLang.structure.InputRoot"),
       "useInTest",
       "test1",
       "none"))) {
     return false;
   }
   return SPropertyOperations.hasValue(_context.getNode(), "option", "drop_it", "option_default");
 }
Ejemplo n.º 6
0
 public static boolean baseMappingRule_Condition_12077399789563657(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return SNodeOperations.isInstanceOf(
           SNodeOperations.getParent(_context.getNode()),
           "jetbrains.mps.baseLanguage.structure.AssignmentExpression")
       && SLinkOperations.getTarget(
               SNodeOperations.cast(
                   SNodeOperations.getParent(_context.getNode()),
                   "jetbrains.mps.baseLanguage.structure.AssignmentExpression"),
               "rValue",
               true)
           == _context.getNode();
 }
Ejemplo n.º 7
0
 public static boolean baseMappingRule_Condition_1201386765715(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return SConceptOperations.isExactly(
       SNodeOperations.getConceptDeclaration(
           SLinkOperations.getTarget(_context.getNode(), "operation", true)),
       "jetbrains.mps.baseLanguage.structure.PropertyReference");
 }
Ejemplo n.º 8
0
 public static boolean baseMappingRule_Condition_1217891542034(
     final BaseMappingRuleContext _context) {
   return SNodeOperations.isInstanceOf(
       SLinkOperations.getTarget(
           SNodeOperations.as(
               SLinkOperations.getTarget(
                   _context.getNode(),
                   MetaAdapterFactory.getContainmentLink(
                       0xf3061a5392264cc5L,
                       0xa443f952ceaf5816L,
                       0x11b0d00332cL,
                       0xf8c77f1e97L,
                       "lValue")),
               MetaAdapterFactory.getConcept(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x116b46a08c4L,
                   "jetbrains.mps.baseLanguage.structure.DotExpression")),
           MetaAdapterFactory.getContainmentLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x116b46a08c4L,
               0x116b46b36c4L,
               "operation")),
       MetaAdapterFactory.getConcept(
           0xd7706f639be2479cL,
           0xa3daae92af1e64d5L,
           0x11b8fe60348L,
           "jetbrains.mps.lang.generator.generationContext.structure.GenerationContextOp_UserObjectAccessBase"));
 }
Ejemplo n.º 9
0
 public static boolean baseMappingRule_Condition_3771754276239013003(
     final BaseMappingRuleContext _context) {
   return SPropertyOperations.getString(
           _context.getNode(),
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"))
       .equals("label");
 }
Ejemplo n.º 10
0
 public static boolean baseMappingRule_Condition_1217891542034(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return SNodeOperations.isInstanceOf(
       SLinkOperations.getTarget(
           SNodeOperations.as(
               SLinkOperations.getTarget(_context.getNode(), "lValue", true),
               "jetbrains.mps.baseLanguage.structure.DotExpression"),
           "operation",
           true),
       "jetbrains.mps.lang.generator.generationContext.structure.GenerationContextOp_UserObjectAccessBase");
 }
Ejemplo n.º 11
0
 public static boolean baseMappingRule_Condition_4540508509659909015(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   SNode lValue = SLinkOperations.getTarget(_context.getNode(), "lValue", true);
   return SNodeOperations.isInstanceOf(
           lValue, "jetbrains.mps.baseLanguage.structure.DotExpression")
       && SNodeOperations.isInstanceOf(
           SLinkOperations.getTarget(
               SNodeOperations.cast(lValue, "jetbrains.mps.baseLanguage.structure.DotExpression"),
               "operation",
               true),
           "jetbrains.mps.baseLanguage.structure.PropertyReference");
 }
Ejemplo n.º 12
0
 public static boolean baseMappingRule_Condition_3100399657864717070(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   Iterable<SNode> operators =
       ListSequence.fromList(
               SModelOperations.getRootsIncludingImported(
                   _context.getOriginalInputModel(),
                   _context.getScope(),
                   "jetbrains.mps.baseLanguage.overloadedOperators.structure.OverloadedOperatorContainer"))
           .translate(
               new ITranslator2<SNode, SNode>() {
                 public Iterable<SNode> translate(SNode it) {
                   return SLinkOperations.getTargets(it, "operators", true);
                 }
               });
   return BinaryOperationUtil.hasOverloadedOperators(
       _context.getNode(),
       TypeChecker.getInstance()
           .getTypeOf(SLinkOperations.getTarget(_context.getNode(), "leftExpression", true)),
       TypeChecker.getInstance()
           .getTypeOf(SLinkOperations.getTarget(_context.getNode(), "rightExpression", true)),
       Sequence.fromIterable(operators).toListSequence());
 }
Ejemplo n.º 13
0
 public static boolean baseMappingRule_Condition_8829647120617326153(
     final BaseMappingRuleContext _context) {
   return SNodeOperations.isInstanceOf(
       SLinkOperations.getTarget(
           _context.getNode(),
           MetaAdapterFactory.getContainmentLink(
               0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x11b0d00332cL, 0xf8c77f1e97L, "lValue")),
       MetaAdapterFactory.getConcept(
           0x995a73947f764b8bL,
           0xa929c53448708106L,
           0x7a89354654722219L,
           "jetbrains.mps.console.internalCommands.structure.InternalMode"));
 }
Ejemplo n.º 14
0
 public static boolean baseMappingRule_Condition_6896005762093594481(
     final BaseMappingRuleContext _context) {
   return ListSequence.fromList(SLinkOperations.getTargets(_context.getNode(), "parts", true))
       .any(
           new IWhereFilter<SNode>() {
             public boolean accept(SNode it) {
               return SNodeOperations.isInstanceOf(
                       it, "jetbrains.mps.build.workflow.structure.BwfMacro")
                   && SPropertyOperations.getBoolean(
                       SNodeOperations.cast(it, "jetbrains.mps.build.workflow.structure.BwfMacro"),
                       "exportToProperiesFile");
             }
           });
 }
Ejemplo n.º 15
0
 public static boolean baseMappingRule_Condition_1216862267898(
     final BaseMappingRuleContext _context) {
   return SNodeOperations.isInstanceOf(
       SLinkOperations.getTarget(
           _context.getNode(),
           MetaAdapterFactory.getContainmentLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x116b46a08c4L,
               0x116b46b36c4L,
               "operation")),
       MetaAdapterFactory.getConcept(
           0xd7706f639be2479cL,
           0xa3daae92af1e64d5L,
           0x11b5282d0d3L,
           "jetbrains.mps.lang.generator.generationContext.structure.GenerationContextOp_Base"));
 }
Ejemplo n.º 16
0
 public static boolean baseMappingRule_Condition_6896005762093594466(
     final BaseMappingRuleContext _context) {
   return !(SPropertyOperations.getBoolean(_context.getNode(), "exportToProperiesFile"));
 }
Ejemplo n.º 17
0
 public static boolean baseMappingRule_Condition_1195172400866(
     final BaseMappingRuleContext _context) {
   return SPropertyOperations.hasValue(_context.getNode(), "option", "option_1", "option_default");
 }
Ejemplo n.º 18
0
 public static boolean baseMappingRule_Condition_7287346816896135373(
     final BaseMappingRuleContext _context) {
   return SPropertyOperations.getInteger(_context.getNode(), "intval") == 42;
 }
Ejemplo n.º 19
0
 public static boolean baseMappingRule_Condition_1167338342843(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return !(ContentList_Behavior.call_isHorizontal_1221256530294(_context.getNode()));
 }
Ejemplo n.º 20
0
 public static boolean baseMappingRule_Condition_1167337362467(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   _context.showErrorMessage(_context.getNode(), "trying to generate abstract Content");
   return true;
 }
Ejemplo n.º 21
0
 public static boolean baseMappingRule_Condition_8654221991637436417(
     final BaseMappingRuleContext _context) {
   return ListSequence.fromList(SLinkOperations.getTargets(_context.getNode(), "content", true))
           .isEmpty()
       && !(SPropertyOperations.getBoolean(_context.getNode(), "shortEmptyNotation"));
 }
Ejemplo n.º 22
0
 public static boolean baseMappingRule_Condition_1217894200267(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return GenerationContextOp_UserObjectAccessBase_Behavior
       .call_isLValueInAssignment_1217892546644(_context.getNode());
 }
Ejemplo n.º 23
0
 public static boolean baseMappingRule_Condition_1216862267898(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return SNodeOperations.isInstanceOf(
       SLinkOperations.getTarget(_context.getNode(), "operation", true),
       "jetbrains.mps.lang.generator.generationContext.structure.GenerationContextOp_Base");
 }
Ejemplo n.º 24
0
 public static boolean baseMappingRule_Condition_4747365393927488517(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   _context.showErrorMessage(
       _context.getNode(), "Incomplete member declaration in the code, ignoring");
   return true;
 }
Ejemplo n.º 25
0
 public static boolean baseMappingRule_Condition_4540508509690462287(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   SNode lValue = SLinkOperations.getTarget(_context.getNode(), "lValue", true);
   return SNodeOperations.isInstanceOf(
       lValue, "jetbrains.mps.baseLanguage.structure.LocalPropertyReference");
 }
Ejemplo n.º 26
0
 public static boolean baseMappingRule_Condition_6896005762093594382(
     final BaseMappingRuleContext _context) {
   return SPropertyOperations.getBoolean(_context.getNode(), "isLocation");
 }
Ejemplo n.º 27
0
 public static boolean baseMappingRule_Condition_1202243113773(
     final BaseMappingRuleContext _context) {
   return SPropertyOperations.hasValue(_context.getNode(), "useInTest", "test1", "none");
 }
Ejemplo n.º 28
0
 public static boolean baseMappingRule_Condition_3771754276239013003(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return SPropertyOperations.getString(_context.getNode(), "name").equals("label");
 }
Ejemplo n.º 29
0
 public static boolean baseMappingRule_Condition_1144956008583716329(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return SNodeOperations.isInstanceOf(
       SLinkOperations.getTarget(_context.getNode(), "concept", false),
       "jetbrains.mps.lang.structure.structure.InterfaceConceptDeclaration");
 }
Ejemplo n.º 30
0
 public static boolean baseMappingRule_Condition_5862977038373333953(
     final IOperationContext operationContext, final BaseMappingRuleContext _context) {
   return !(SNodeOperations.isInstanceOf(
       SNodeOperations.getParent(_context.getNode()),
       "jetbrains.mps.baseLanguage.structure.AssignmentExpression"));
 }