Exemple #1
0
 protected SNode getLastReponse() {
   SNode last =
       SNodeOperations.as(
           ListSequence.fromList(
                   SLinkOperations.getChildren(
                       SLinkOperations.getTarget(
                           myRoot,
                           MetaAdapterFactory.getContainmentLink(
                               0xde1ad86d6e504a02L,
                               0xb306d4d17f64c375L,
                               0x15fb34051f725a2cL,
                               0x15fb34051f725bafL,
                               "history")),
                       MetaAdapterFactory.getContainmentLink(
                           0xde1ad86d6e504a02L,
                           0xb306d4d17f64c375L,
                           0xa835f28c1aa02beL,
                           0x63da33792b5df49aL,
                           "item")))
               .last(),
           MetaAdapterFactory.getConcept(
               0xde1ad86d6e504a02L,
               0xb306d4d17f64c375L,
               0x4e3b035171a5ba02L,
               "jetbrains.mps.console.base.structure.Response"));
   if (last != null) {
     return last;
   }
   return SLinkOperations.addNewChild(
       SLinkOperations.getTarget(
           myRoot,
           MetaAdapterFactory.getContainmentLink(
               0xde1ad86d6e504a02L,
               0xb306d4d17f64c375L,
               0x15fb34051f725a2cL,
               0x15fb34051f725bafL,
               "history")),
       MetaAdapterFactory.getContainmentLink(
           0xde1ad86d6e504a02L,
           0xb306d4d17f64c375L,
           0xa835f28c1aa02beL,
           0x63da33792b5df49aL,
           "item"),
       SNodeOperations.asInstanceConcept(
           MetaAdapterFactory.getConcept(
               0xde1ad86d6e504a02L,
               0xb306d4d17f64c375L,
               0x4e3b035171a5ba02L,
               "jetbrains.mps.console.base.structure.Response")));
 }
Exemple #2
0
 public static void updateIconResourceBundle(SNode cb) {
   SModule module = SNodeOperations.getModel(cb).getModule();
   if (module instanceof Language) {
     SNode irb = getIconResourceBundle((Language) module);
     for (SNode ire :
         ListSequence.fromList(
                 SNodeOperations.getDescendants(
                     cb,
                     "jetbrains.mps.lang.resources.structure.IconResourceExpression",
                     false,
                     new String[] {}))
             .toListSequence()) {
       {
         Pattern _pattern_0 = REGEXP_st4ewd_a0a0a0b0b0b;
         Matcher _matcher_0 =
             _pattern_0.matcher(
                 IconResource_Behavior.call_getFilename_8974276187400030131(
                     SLinkOperations.getTarget(ire, "icon", true)));
         if (_matcher_0.find()) {
           final String iconName = _matcher_0.group(1).toUpperCase();
           SNode decl =
               ListSequence.fromList(SLinkOperations.getTargets(irb, "icons", true))
                   .findFirst(
                       new IWhereFilter<SNode>() {
                         public boolean accept(SNode it) {
                           return iconName.equals(SPropertyOperations.getString(it, "name"));
                         }
                       });
           if ((decl == null)) {
             decl =
                 SLinkOperations.addNewChild(
                     irb,
                     "icons",
                     "jetbrains.mps.lang.resources.structure.IconResourceDeclaration");
             SLinkOperations.setTarget(
                 decl,
                 "iconExpression",
                 _quotation_createNode_st4ewd_a0b0c0a0b0b0b(
                     SNodeOperations.copyNode(SLinkOperations.getTarget(ire, "icon", true))),
                 true);
             SPropertyOperations.set(decl, "name", iconName);
           }
           SNodeOperations.replaceWithAnother(
               ire, _quotation_createNode_st4ewd_a0a3a0a1a1a1(decl));
         }
       }
     }
   }
 }
 public void setup(SNode newNode, SNode sampleNode, SNode enclosingNode, SModel model) {
   SLinkOperations.addNewChild(
       newNode,
       MetaAdapterFactory.getContainmentLink(
           0x28f9e4973b424291L,
           0xaeba0a1039153ab1L,
           0x11b737a6b7cL,
           0x4cdc1c9014f46cb2L,
           "condition"),
       MetaAdapterFactory.getConcept(
           0x28f9e4973b424291L,
           0xaeba0a1039153ab1L,
           0x4cdc1c9014f52faeL,
           "jetbrains.mps.lang.plugin.structure.RequiredCondition"));
 }
 private static void ___init___(@NotNull SNode __thisNode__) {
   SLinkOperations.addNewChild(
       __thisNode__,
       MetaAdapterFactory.getContainmentLink(
           0xf280165065d5424eL,
           0xbb1b463a8781b786L,
           0x5bc4aa08e154b399L,
           0x5bc4aa08e154b39bL,
           "line"),
       SNodeOperations.asInstanceConcept(
           MetaAdapterFactory.getConcept(
               0xf280165065d5424eL,
               0xbb1b463a8781b786L,
               0x757ba20a4c87f96cL,
               "jetbrains.mps.baseLanguage.javadoc.structure.CommentLine")));
 }