Ejemplo n.º 1
0
 public static boolean ifMacro_Condition_2059109515400476889(final IfMacroContext _context) {
   boolean result =
       ListSequence.fromList(SNodeOperations.getAllSiblings(_context.getNode(), false))
           .any(
               new IWhereFilter<SNode>() {
                 public boolean accept(SNode it) {
                   return SNodeOperations.isInstanceOf(
                           it, "jetbrains.mps.build.workflow.structure.BwfJavaModule")
                       && "IntelliJ"
                           .equals(
                               SPropertyOperations.getString(
                                   SNodeOperations.cast(
                                       it, "jetbrains.mps.build.workflow.structure.BwfJavaModule"),
                                   "compiler"));
                 }
               });
   if (result) {
     if (!(ListSequence.fromList(SNodeOperations.getAllSiblings(_context.getNode(), false))
         .any(
             new IWhereFilter<SNode>() {
               public boolean accept(SNode it) {
                 return SNodeOperations.isInstanceOf(
                         it, "jetbrains.mps.build.workflow.structure.BwfMacro")
                     && "idea_home"
                         .equals(
                             SPropertyOperations.getString(
                                 SNodeOperations.cast(
                                     it, "jetbrains.mps.build.workflow.structure.BwfMacro"),
                                 "name"));
               }
             }))) {
       _context.showErrorMessage(
           ListSequence.fromList(SNodeOperations.getAllSiblings(_context.getNode(), false))
               .where(
                   new IWhereFilter<SNode>() {
                     public boolean accept(SNode it) {
                       return SNodeOperations.isInstanceOf(
                               it, "jetbrains.mps.build.workflow.structure.BwfJavaModule")
                           && "IntelliJ"
                               .equals(
                                   SPropertyOperations.getString(
                                       SNodeOperations.cast(
                                           it,
                                           "jetbrains.mps.build.workflow.structure.BwfJavaModule"),
                                       "compiler"));
                     }
                   })
               .first(),
           "${idea_home} macro is required to use IntelliJ compiler");
     }
   }
   return result;
 }
Ejemplo n.º 2
0
 public static boolean ifMacro_Condition_2059109515400527266(final IfMacroContext _context) {
   return ListSequence.fromList(SNodeOperations.getAllSiblings(_context.getNode(), false))
       .any(
           new IWhereFilter<SNode>() {
             public boolean accept(SNode it) {
               return SNodeOperations.isInstanceOf(
                       it, "jetbrains.mps.build.workflow.structure.BwfJavaModule")
                   && "IntelliJ"
                       .equals(
                           SPropertyOperations.getString(
                               SNodeOperations.cast(
                                   it, "jetbrains.mps.build.workflow.structure.BwfJavaModule"),
                               "compiler"));
             }
           });
 }
Ejemplo n.º 3
0
 public static Object insertMacro_varValue_3961775458390373890(
     final TemplateQueryContext _context) {
   List<SNode> parts = new ArrayList<SNode>();
   for (SNode sibl : SNodeOperations.getAllSiblings(_context.getNode(), false)) {
     if (SNodeOperations.isInstanceOf(sibl, "jetbrains.mps.build.workflow.structure.BwfTaskPart")
         && _context.getNode()
             == SLinkOperations.getTarget(
                 SNodeOperations.cast(sibl, "jetbrains.mps.build.workflow.structure.BwfTaskPart"),
                 "task",
                 false)) {
       ListSequence.fromList(parts)
           .addElement(
               SNodeOperations.cast(sibl, "jetbrains.mps.build.workflow.structure.BwfTaskPart"));
     }
   }
   return parts;
 }
Ejemplo n.º 4
0
 public static Iterable<SNode> sourceNodesQuery_6647099934207244997(
     final SourceSubstituteMacroNodesContext _context) {
   return ListSequence.fromList(SNodeOperations.getAllSiblings(_context.getNode(), false))
       .where(
           new IWhereFilter<SNode>() {
             public boolean accept(SNode it) {
               return SNodeOperations.isInstanceOf(
                   it, "jetbrains.mps.build.workflow.structure.BwfJavaModule");
             }
           })
       .select(
           new ISelector<SNode, SNode>() {
             public SNode select(SNode it) {
               return SNodeOperations.cast(
                   it, "jetbrains.mps.build.workflow.structure.BwfJavaModule");
             }
           });
 }