示例#1
0
 public static Object propertyMacro_GetPropertyValue_3524394717035465437(
     final IOperationContext operationContext, final PropertyMacroContext _context) {
   SNode op =
       BinaryOperationUtil.getNearestOverloaded(
           _context.getNode(),
           TypeChecker.getInstance()
               .getTypeOf(SLinkOperations.getTarget(_context.getNode(), "leftExpression", true)),
           TypeChecker.getInstance()
               .getTypeOf(SLinkOperations.getTarget(_context.getNode(), "rightExpression", true)),
           ListSequence.fromList(
                   SModelOperations.getRootsIncludingImported(
                       SNodeOperations.getModel(_context.getNode()),
                       _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);
                     }
                   })
               .toListSequence());
   return BehaviorReflection.invokeVirtual(
       String.class,
       SNodeOperations.cast(
           SNodeOperations.getParent(op),
           "jetbrains.mps.baseLanguage.overloadedOperators.structure.OverloadedOperatorContainer"),
       "virtual_getFqName_1213877404258",
       new Object[] {});
 }
示例#2
0
 public static SNode sourceNodeQuery_3524394717035465536(
     final IOperationContext operationContext, final SourceSubstituteMacroNodeContext _context) {
   BinaryOperationUtil.getNearestOverloaded(
       _context.getNode(),
       TypeChecker.getInstance()
           .getTypeOf(SLinkOperations.getTarget(_context.getNode(), "leftExpression", true)),
       TypeChecker.getInstance()
           .getTypeOf(SLinkOperations.getTarget(_context.getNode(), "rightExpression", true)),
       ListSequence.fromList(
               SModelOperations.getRootsIncludingImported(
                   SNodeOperations.getModel(_context.getNode()),
                   _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);
                 }
               })
           .toListSequence());
   if ((Boolean) (_context.getNode().getUserObject("reversed"))) {
     return SLinkOperations.getTarget(_context.getNode(), "leftExpression", true);
   }
   return SLinkOperations.getTarget(_context.getNode(), "rightExpression", true);
 }
示例#3
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());
 }
示例#4
0
 public static Object propertyMacro_GetPropertyValue_3524394717035465440(
     final IOperationContext operationContext, final PropertyMacroContext _context) {
   SNode op =
       BinaryOperationUtil.getNearestOverloaded(
           _context.getNode(),
           TypeChecker.getInstance()
               .getTypeOf(SLinkOperations.getTarget(_context.getNode(), "leftExpression", true)),
           TypeChecker.getInstance()
               .getTypeOf(SLinkOperations.getTarget(_context.getNode(), "rightExpression", true)),
           ListSequence.fromList(
                   SModelOperations.getRootsIncludingImported(
                       SNodeOperations.getModel(_context.getNode()),
                       _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);
                     }
                   })
               .toListSequence());
   return OverloadedBinaryOperator_Behavior.call_getFunctionName_6677452554240637506(op);
 }