コード例 #1
0
ファイル: Generator.java プロジェクト: strategist922/MPS
 @Override
 public void updateDeclaration(SNode decl, ClassInfo ci) {
   if (ImportOptions.getInstance().isNeedUpdateDeclarations()) {
     String name = this.myNamesMap.getNameForClass(ci.getDeclarationClass());
     if ((isEmpty_ixz87t_a0a0b0a0n9(SPropertyOperations.getString(decl, "name")))
         || neq_ixz87t_a0a1a0a31j(SPropertyOperations.getString(decl, "name"), name)) {
       SPropertyOperations.set(decl, "name", name);
       System.out.format(
           "Declaration %s name has been set to %s.\n",
           ci.getDeclarationClass().getName(), name);
     }
     if (isEmpty_ixz87t_a0c0a0n9(SPropertyOperations.getString(decl, "classname"))) {
       SPropertyOperations.set(decl, "classname", ci.getDeclarationClass().getName());
     }
     if (SPropertyOperations.getBoolean(decl, "abstract") != ci.isAbstract()) {
       System.out.format(
           "Declaration %s abstract proprety has been set to %b.\n",
           ci.getDeclarationClass().getName(), ci.isAbstract());
       SPropertyOperations.set(decl, "abstract", "" + (ci.isAbstract()));
     }
     if (SPropertyOperations.getBoolean(decl, "canHaveInternalText")
         != ci.canHaveInternalText()) {
       System.out.format(
           "Declaration %s can have internal name proprety has been set to %b.\n",
           ci.getDeclarationClass().getName(), ci.canHaveInternalText());
       SPropertyOperations.set(decl, "canHaveInternalText", "" + (ci.canHaveInternalText()));
     }
     if (!(SPropertyOperations.getBoolean(decl, "depracated")) && ci.isDeprecated()) {
       SPropertyOperations.set(decl, "depracated", "" + (ci.isDeprecated()));
       System.out.format(
           "Declaration %s has been set deprecated.\n", ci.getDeclarationClass().getName());
     }
   }
 }
コード例 #2
0
ファイル: Generator.java プロジェクト: strategist922/MPS
    private void addNestedName(SNode declaration, SNode nref, String name) {
      for (SNode ref : SLinkOperations.getTargets(nref, "role", true)) {
        if (eq_ixz87t_a0a0a0m9(
            SPropertyOperations.getString(
                SLinkOperations.getTarget(ref, "declaration", false), "name"),
            name)) {
          return;
        }
      }

      if (eq_ixz87t_a0c0m9(
          SPropertyOperations.getString(
              SLinkOperations.getTarget(nref, "declaration", false), "name"),
          name)) {
        ListSequence.fromList(SLinkOperations.getTargets(nref, "role", true))
            .addElement(
                Generator.GENERATOR.createDeclarationReference(
                    SNodeOperations.cast(
                        SLinkOperations.getTarget(nref, "declaration", false),
                        "jetbrains.mps.build.generictasks.structure.BuiltInTaskDeclaration")));
        return;
      }

      SNode parentDeclaration =
          SNodeOperations.cast(
              SLinkOperations.getTarget(nref, "declaration", false),
              "jetbrains.mps.build.generictasks.structure.BuiltInTaskDeclaration");
      SNode parentRef = Generator.GENERATOR.createDeclarationReference(parentDeclaration);
      SNode fake;
      if (SNodeOperations.isInstanceOf(
          parentDeclaration,
          "jetbrains.mps.build.generictasks.structure.TaskInterfaceDeclaration")) {
        fake =
            Generator.GENERATOR.createInterfaceDeclaration(
                name,
                SPropertyOperations.getString(parentDeclaration, "classname"),
                SPropertyOperations.getBoolean(parentDeclaration, "depracated"));
        ListSequence.fromList(SLinkOperations.getTargets(fake, "interfaces", true))
            .addElement(parentRef);
      } else {
        fake =
            Generator.GENERATOR.createDeclaration(
                name,
                SPropertyOperations.getString(parentDeclaration, "classname"),
                SPropertyOperations.getBoolean(parentDeclaration, "abstract"),
                SPropertyOperations.getBoolean(parentDeclaration, "canHaveInternalText"),
                SPropertyOperations.getBoolean(parentDeclaration, "depracated"));
        SLinkOperations.setTarget(fake, "parentRef", parentRef, true);
      }
      SPropertyOperations.set(fake, "fake", "" + (true));
      ListSequence.fromList(SLinkOperations.getTargets(nref, "role", true))
          .addElement(Generator.GENERATOR.createDeclarationReference(fake));
      ListSequence.fromList(SLinkOperations.getTargets(declaration, "fakeDeclaration", true))
          .addElement(fake);
    }
コード例 #3
0
ファイル: QueriesGenerated.java プロジェクト: java66liu/MPS
 public static Iterable sourceNodesQuery_1225195370480(
     final IOperationContext operationContext, final SourceSubstituteMacroNodesContext _context) {
   List<SNode> methods = ListSequence.fromList(new ArrayList<SNode>());
   for (SNode md : SLinkOperations.getTargets(_context.getNode(), "method", true)) {
     if (SPropertyOperations.getBoolean(md, "isVirtual")
         && !(SPropertyOperations.getBoolean(md, "isStatic"))) {
       ListSequence.fromList(methods).addElement(md);
     }
   }
   return methods;
 }
コード例 #4
0
 public static List<SNode> virtual_getMethodsToOverride_5418393554803767537(SNode thisNode) {
   List<SNode> methods = new ArrayList<SNode>();
   for (SNode method :
       Sequence.fromIterable(
               IClassifierType_Behavior.call_getMembers_7405920559687277275(
                   BehaviorReflection.invokeVirtual(
                       (Class<SNode>) ((Class) Object.class),
                       thisNode,
                       "virtual_getThisType_7405920559687254782",
                       new Object[] {})))
           .where(
               new IWhereFilter<SNode>() {
                 public boolean accept(SNode it) {
                   return SNodeOperations.isInstanceOf(
                       it, "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration");
                 }
               })
           .select(
               new ISelector<SNode, SNode>() {
                 public SNode select(SNode it) {
                   return SNodeOperations.cast(
                       it, "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration");
                 }
               })) {
     SNode cls =
         SNodeOperations.getAncestor(
             method, "jetbrains.mps.baseLanguage.structure.Classifier", false, false);
     if (cls == thisNode) {
       continue;
     }
     if (!(SNodeOperations.isInstanceOf(
         cls, "jetbrains.mps.baseLanguage.structure.ClassConcept"))) {
       continue;
     }
     if (SPropertyOperations.getBoolean(method, "isFinal")) {
       continue;
     }
     if (SPropertyOperations.getBoolean(method, "isAbstract")) {
       continue;
     }
     if (SNodeOperations.isInstanceOf(
         SLinkOperations.getTarget(method, "visibility", true),
         "jetbrains.mps.baseLanguage.structure.PrivateVisibility")) {
       continue;
     }
     ListSequence.fromList(methods).addElement(method);
   }
   return methods;
 }
コード例 #5
0
 private static boolean renderingCondition_gmtuod_a3a(SNode node, EditorContext editorContext) {
   if (SLinkOperations.getTarget(
           node,
           MetaAdapterFactory.getReferenceLink(
               0xaf65afd8f0dd4942L,
               0x87d963a55f2a9db1L,
               0x11d4348057eL,
               0x11d4348057fL,
               "overriddenMethod"))
       == null) {
     return false;
   }
   return !(SPropertyOperations.getBoolean(
           node,
           MetaAdapterFactory.getProperty(
               0xaf65afd8f0dd4942L,
               0x87d963a55f2a9db1L,
               0x11d4348057eL,
               0x11d43480580L,
               "isVirtual")))
       && !(SNodeOperations.isInstanceOf(
           SLinkOperations.getTarget(
               node,
               MetaAdapterFactory.getContainmentLink(
                   0xf3061a5392264cc5L,
                   0xa443f952ceaf5816L,
                   0x112670d273fL,
                   0x112670d886aL,
                   "visibility")),
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0x10af9586f0cL,
               "jetbrains.mps.baseLanguage.structure.PrivateVisibility")));
 }
コード例 #6
0
 private static boolean renderingCondition_wbyfib_a0a_0(SNode node, EditorContext editorContext) {
   return (SLinkOperations.getTarget(
               node,
               MetaAdapterFactory.getReferenceLink(
                   0xdcb5a83a19a844ffL,
                   0xa4cbfc7d324ecc63L,
                   0x1f6c736337b5e2d8L,
                   0x1f6c736337b5e2dcL,
                   "rule"))
           != null)
       && (isEmptyString(
               SPropertyOperations.getString(
                   SLinkOperations.getTarget(
                       node,
                       MetaAdapterFactory.getReferenceLink(
                           0xdcb5a83a19a844ffL,
                           0xa4cbfc7d324ecc63L,
                           0x1f6c736337b5e2d8L,
                           0x1f6c736337b5e2dcL,
                           "rule")),
                   MetaAdapterFactory.getProperty(
                       0xdcb5a83a19a844ffL,
                       0xa4cbfc7d324ecc63L,
                       0x1f6c736337b5e2f2L,
                       0x1f6c736337b5e2f9L,
                       "tagName")))
           || SPropertyOperations.getBoolean(
               node,
               MetaAdapterFactory.getProperty(
                   0xdcb5a83a19a844ffL,
                   0xa4cbfc7d324ecc63L,
                   0x1f6c736337b5e2d8L,
                   0x1f6c736337b5e2dbL,
                   "overrideTag")));
 }
コード例 #7
0
 private Map<SNode, Boolean> getOverloadedOperators(SNode node, SNode leftType, SNode rightType) {
   Map<SNode, Boolean> result = MapSequence.fromMap(new HashMap<SNode, Boolean>());
   if (!(SNodeOperations.isInstanceOf(
       node, "jetbrains.mps.baseLanguage.structure.BinaryOperation"))) {
     return result;
   }
   for (SNode operator : getOperatorContainers()) {
     if (isOverloading(
         SNodeOperations.cast(node, "jetbrains.mps.baseLanguage.structure.BinaryOperation"),
         leftType,
         rightType,
         operator)) {
       MapSequence.fromMap(result).put(operator, false);
     }
     if (SPropertyOperations.getBoolean(operator, "commutative")
         && isOverloading(
             SNodeOperations.cast(node, "jetbrains.mps.baseLanguage.structure.BinaryOperation"),
             rightType,
             leftType,
             operator)) {
       MapSequence.fromMap(result).put(operator, true);
     }
   }
   return result;
 }
コード例 #8
0
 public static boolean call_isRoot_8969040284892403078(SNode __thisNode__) {
   return SPropertyOperations.getBoolean(
           __thisNode__,
           MetaAdapterFactory.getProperty(
               0x132aa4d8a3f7441cL,
               0xa7eb3fce23492c6aL,
               0x6524536b2e1a1e38L,
               0x6524536b2e1bddd7L,
               "root"))
       || (SLinkOperations.getTarget(
                   __thisNode__,
                   MetaAdapterFactory.getReferenceLink(
                       0x132aa4d8a3f7441cL,
                       0xa7eb3fce23492c6aL,
                       0x6524536b2e1a1e38L,
                       0x34f5c07463da7435L,
                       "extends"))
               != null)
           && SimpleBuilderDeclaration_BehaviorDescriptor.isRoot_id7LSrDTXbxm6.invoke(
               SLinkOperations.getTarget(
                   __thisNode__,
                   MetaAdapterFactory.getReferenceLink(
                       0x132aa4d8a3f7441cL,
                       0xa7eb3fce23492c6aL,
                       0x6524536b2e1a1e38L,
                       0x34f5c07463da7435L,
                       "extends")));
 }
 public void applyRule(
     final SNode variableReference,
     final TypeCheckingContext typeCheckingContext,
     IsApplicableStatus status) {
   if (SNodeOperations.isInstanceOf(
       SLinkOperations.getTarget(variableReference, "variableDeclaration", false),
       "jetbrains.mps.baseLanguage.structure.ParameterDeclaration")) {
     SNode declaration =
         SNodeOperations.cast(
             SLinkOperations.getTarget(variableReference, "variableDeclaration", false),
             "jetbrains.mps.baseLanguage.structure.ParameterDeclaration");
     if ((declaration != null) && !(SPropertyOperations.getBoolean(declaration, "isFinal"))) {
       if (!(VariableReference_Behavior.call_isParameterOfThisMethod_1240394425603(
           variableReference))) {
         {
           MessageTarget errorTarget = new NodeMessageTarget();
           IErrorReporter _reporter_2309309498 =
               typeCheckingContext.reportTypeError(
                   variableReference,
                   "Parameter must be final",
                   "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                   "1240395578471",
                   null,
                   errorTarget);
         }
       }
     }
   }
 }
コード例 #10
0
ファイル: QueriesGenerated.java プロジェクト: utkarshx/MPS
 public static Object propertyMacro_GetPropertyValue_6896005762093594421(
     final PropertyMacroContext _context) {
   if (SPropertyOperations.getBoolean(_context.getNode(), "exportToProperiesFile")) {
     return "${" + SPropertyOperations.getString(_context.getNode(), "name") + ".relative}";
   }
   return SPropertyOperations.getString(_context.getNode(), "defaultValue");
 }
コード例 #11
0
 /*package*/ static boolean isRerunnable_id1JWcQ2Vfe4u(@NotNull SNode __thisNode__) {
   SNode prop =
       Sequence.fromIterable(
               DSLClassMember__BehaviorDescriptor.find_id2gzehMfi1$l.invoke(
                   SNodeOperations.getNode(
                       "90746344-04fd-4286-97d5-b46ae6a81709/r:52a3d974-bd4f-4651-ba6e-a2de5e336d95(jetbrains.mps.lang.migration/jetbrains.mps.lang.migration.methods)",
                       "2016543223706274716"),
                   __thisNode__))
           .first();
   return prop != null
       && SPropertyOperations.getBoolean(
           SNodeOperations.cast(
               prop,
               MetaAdapterFactory.getConcept(
                   0xc7d5b9dda05f4be2L,
                   0xbc73f2e16994cc67L,
                   0x59e9926e84100ec3L,
                   "jetbrains.mps.baseLanguage.lightweightdsl.structure.BooleanPropertyInstance")),
           MetaAdapterFactory.getProperty(
               0xc7d5b9dda05f4be2L,
               0xbc73f2e16994cc67L,
               0x59e9926e84100ec3L,
               0x59e9926e84100ec4L,
               "value"));
 }
コード例 #12
0
 public static List<SNode> virtual_getTestMethods_2148145109766218395(SNode thisNode) {
   List<SNode> result = new ArrayList<SNode>();
   if (!(SPropertyOperations.getBoolean(thisNode, "abstractClass"))) {
     ListSequence.fromList(result)
         .addSequence(
             ListSequence.fromList(
                 SLinkOperations.getTargets(
                     SLinkOperations.getTarget(thisNode, "testMethodList", true),
                     "testMethod",
                     true)));
     if (SNodeOperations.isInstanceOf(
         SLinkOperations.getTarget(
             SLinkOperations.getTarget(thisNode, "superclass", true), "classifier", false),
         "jetbrains.mps.baseLanguage.unitTest.structure.ITestCase")) {
       ListSequence.fromList(result)
           .addSequence(
               ListSequence.fromList(
                   BehaviorReflection.invokeVirtual(
                       (Class<List<SNode>>) ((Class) Object.class),
                       SNodeOperations.cast(
                           SLinkOperations.getTarget(
                               SLinkOperations.getTarget(thisNode, "superclass", true),
                               "classifier",
                               false),
                           "jetbrains.mps.baseLanguage.unitTest.structure.ITestCase"),
                       "virtual_getTestMethods_2148145109766218395",
                       new Object[] {})));
     }
   }
   return result;
 }
コード例 #13
0
 public String getDescription(final SNode node, final EditorContext editorContext) {
   return (SPropertyOperations.getBoolean(
           node,
           MetaAdapterFactory.getProperty(
               0xcf935df46994e9cL,
               0xa132fa109541cba3L,
               0x4780308f5d333ebL,
               0x742675d05378e98dL,
               "compact"))
       ? "Unfold "
           + SPropertyOperations.getString(
               node,
               MetaAdapterFactory.getProperty(
                   0xceab519525ea4f22L,
                   0x9b92103b95ca8c0cL,
                   0x110396eaaa4L,
                   0x110396ec041L,
                   "name"))
       : "Fold "
           + SPropertyOperations.getString(
               node,
               MetaAdapterFactory.getProperty(
                   0xceab519525ea4f22L,
                   0x9b92103b95ca8c0cL,
                   0x110396eaaa4L,
                   0x110396ec041L,
                   "name")));
 }
コード例 #14
0
 public boolean canWrap(@NotNull SNode node) {
   if (eq_kl7j79_a0a0b2(
       SNodeOperations.getConceptDeclaration(node),
       SConceptOperations.findConceptDeclaration(
           "jetbrains.mps.baseLanguage.structure.ClassConcept"))) {
     if (SPropertyOperations.getBoolean(
         SNodeOperations.cast(node, "jetbrains.mps.baseLanguage.structure.ClassConcept"),
         "abstractClass")) {
       return false;
     }
     SNode ancestor =
         SNodeOperations.cast(node, "jetbrains.mps.baseLanguage.structure.Classifier");
     if (!(BehaviorReflection.invokeVirtual(
         Boolean.TYPE, ancestor, "virtual_checkLoops_3980490811621705344", new Object[] {}))) {
       return false;
     }
     while (ancestor != null
         && SNodeOperations.isInstanceOf(
             ancestor, "jetbrains.mps.baseLanguage.structure.ClassConcept")
         && !(BehaviorReflection.invokeVirtual(
                 String.class, ancestor, "virtual_getFqName_1213877404258", new Object[] {})
             .equals(TestCase.class.getCanonicalName()))) {
       ancestor =
           check_kl7j79_a0a0d0a0b2(
               SLinkOperations.getTarget(
                   SNodeOperations.cast(
                       ancestor, "jetbrains.mps.baseLanguage.structure.ClassConcept"),
                   "superclass",
                   true));
     }
     return ancestor != null;
   }
   return false;
 }
コード例 #15
0
ファイル: QueriesGenerated.java プロジェクト: java66liu/MPS
 public static Object propertyMacro_GetPropertyValue_1144956008583624648(
     final IOperationContext operationContext, final PropertyMacroContext _context) {
   return SPropertyOperations.getBoolean(
       SNodeOperations.cast(
           SLinkOperations.getTarget(_context.getNode(), "concept", false),
           "jetbrains.mps.lang.structure.structure.ConceptDeclaration"),
       "abstract");
 }
コード例 #16
0
 public static int call_getCaretPosition_6268941039745717986(
     SNode thisNode, EditorCell_Label label) {
   if (SPropertyOperations.getBoolean(thisNode, "isLastPosition")) {
     return label.getText().length();
   } else {
     return SPropertyOperations.getInteger(thisNode, "caretPosition");
   }
 }
コード例 #17
0
 private static boolean renderingCondition_6n3yp7_a0a(SNode node, EditorContext editorContext) {
   return SPropertyOperations.getBoolean(
       node,
       MetaAdapterFactory.getProperty(
           0xd5033ceef63244b6L,
           0xb30889d4fbde34ffL,
           0x35ebd6e5b343774cL,
           0x5115dda8df7dfca2L,
           "commented"));
 }
コード例 #18
0
 private static boolean renderingCondition_ldr481_a8a(SNode node, EditorContext editorContext) {
   return SPropertyOperations.getBoolean(
       node,
       MetaAdapterFactory.getProperty(
           0xdaafa647f1f74b0bL,
           0xb09669cd7c8408c0L,
           0x34ae970c1923d18aL,
           0x34ae970c1924ee68L,
           "caseInsensitive"));
 }
コード例 #19
0
 private boolean nodeCondition_c4v0tm_a1a() {
   return SPropertyOperations.getBoolean(
       myNode,
       MetaAdapterFactory.getProperty(
           0x86ef829012bb4ca7L,
           0x947f093788f263a9L,
           0x5869770da61dfe28L,
           0x5869770da61dfe29L,
           "reexport"));
 }
コード例 #20
0
 private static boolean renderingCondition_gmtuod_a01c0(SNode node, EditorContext editorContext) {
   return SPropertyOperations.getBoolean(
       node,
       MetaAdapterFactory.getProperty(
           0xaf65afd8f0dd4942L,
           0x87d963a55f2a9db1L,
           0x11d4348057eL,
           0x11d43480582L,
           "isAbstract"));
 }
コード例 #21
0
 private static boolean renderingCondition_y27sly_a9a(SNode node, EditorContext editorContext) {
   return SPropertyOperations.getBoolean(
       node,
       MetaAdapterFactory.getProperty(
           0x698a8d22a10447a0L,
           0xba8d10e3ec237f13L,
           0x41fde5e4adce38bbL,
           0x3d4a6c597112f405L,
           "fork"));
 }
コード例 #22
0
ファイル: ComplexCanRunAndDebug.java プロジェクト: Guchoo/MPS
 private static boolean renderingCondition_2konf7_a2b0(SNode node, EditorContext editorContext) {
   return !(SPropertyOperations.getBoolean(
       node,
       MetaAdapterFactory.getProperty(
           0x22e72e4c0f6946ceL,
           0x84036750153aa615L,
           0x2153d8f1c1f52479L,
           0x523a1a6c9706408bL,
           "canRun")));
 }
コード例 #23
0
ファイル: MethodParameter.java プロジェクト: rr-develop/MPS
 public boolean isFinal() {
   if (SNodeOperations.isInstanceOf(
       this.myDeclaration, "jetbrains.mps.baseLanguage.structure.VariableDeclaration")) {
     return SPropertyOperations.getBoolean(
         SNodeOperations.cast(
             this.myDeclaration, "jetbrains.mps.baseLanguage.structure.VariableDeclaration"),
         "isFinal");
   }
   return false;
 }
コード例 #24
0
ファイル: TestCaseRef_Editor.java プロジェクト: yan96in/MPS
 private static boolean _StyleParameter_QueryFunction_aryab1_a0a0(
     EditorContext editorContext, SNode node) {
   return SPropertyOperations.getBoolean(
       node,
       MetaAdapterFactory.getProperty(
           0xd3c5a46fb8c247dbL,
           0xad0a30b8f19c2055L,
           0x3e81ed1e2be77cbaL,
           0x776b1eb017f5bc5eL,
           "muted"));
 }
コード例 #25
0
 @Nullable
 public ITestNodeWrapper<SNode> wrap(@NotNull SNode node) {
   if (SNodeOperations.isInstanceOf(
           node, "jetbrains.mps.baseLanguage.unitTest.structure.BTestCase")
       && SPropertyOperations.getBoolean(
           SNodeOperations.cast(node, "jetbrains.mps.baseLanguage.unitTest.structure.BTestCase"),
           "abstractClass")) {
     return null;
   }
   return new LanguageTestWrapper(node);
 }
コード例 #26
0
ファイル: QueriesGenerated.java プロジェクト: java66liu/MPS
 public static boolean ifMacro_Condition_572350672214579331(
     final IOperationContext operationContext, final IfMacroContext _context) {
   SNode enclosingMethod =
       SNodeOperations.getAncestor(
           _context.getNode(),
           "jetbrains.mps.lang.behavior.structure.ConceptMethodDeclaration",
           false,
           false);
   return ((enclosingMethod != null)
       && SPropertyOperations.getBoolean(enclosingMethod, "isStatic"));
 }
コード例 #27
0
 /*package*/ static boolean isCompileTimeConstant_idi1LOPRp(@NotNull SNode __thisNode__) {
   return SPropertyOperations.getBoolean(
       SLinkOperations.getTarget(
           __thisNode__,
           MetaAdapterFactory.getReferenceLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xf8c77f1e98L,
               0xf8cc6bf960L,
               "variableDeclaration")),
       MetaAdapterFactory.getProperty(
           0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37a7f6eL, 0x111f9e9f00cL, "isFinal"));
 }
コード例 #28
0
 protected DemoApplication_Configuration doCreateConfiguration(final SNode source) {
   setSourceElement(new MPSPsiElement(source));
   if (!(SPropertyOperations.getBoolean(source, "valid"))) {
     return null;
   }
   DemoApplication_Configuration configuration =
       new DemoApplication_Configuration(
           getContext().getProject(),
           (DemoApplication_Configuration_Factory) getConfigurationFactory(),
           "SomeNode " + SPropertyOperations.getString(source, "name"));
   configuration.getNode().setNode(source);
   return configuration;
 }
コード例 #29
0
 private Iterable<String> getEditorHints_fxz4pq_a3m2a_0(SNode node, EditorContext editorContext) {
   return (SPropertyOperations.getBoolean(
           node,
           MetaAdapterFactory.getProperty(
               0x7a80051c66e94bfcL,
               0x9698b12adfed3d9fL,
               0x51568a5db0cc3a79L,
               0x1b06bb955221551dL,
               "projectAsCompact"))
       ? Collections.singletonList(
           "jetbrains.mps.lang.editor.multiple.testLanguage.editor.MultipleEditorTestHints.rich")
       : Collections.<String>emptyList());
 }
コード例 #30
0
  public static List<SNode> virtual_getMethodsToImplement_5418393554803775106(SNode thisNode) {
    List<SNode> methods = new ArrayList<SNode>();
    ClassifierAndSuperClassifiersScope scope =
        new ClassifierAndSuperClassifiersScope(thisNode, IClassifiersSearchScope.INSTANCE_METHOD);
    // todo do not show already implemented methods
    for (SNode method : ((List<SNode>) scope.getNodes())) {
      boolean isOverridden = false;
      List<SNode> overridenMethods = scope.getOverriddenMethods(method);
      for (SNode overridingMethod : overridenMethods) {
        isOverridden =
            isOverridden
                || (SNodeOperations.isInstanceOf(
                        overridingMethod,
                        "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration")
                    && SPropertyOperations.getBoolean(
                        SNodeOperations.getConceptDeclaration(
                            SNodeOperations.cast(
                                overridingMethod,
                                "jetbrains.mps.baseLanguage.structure.InstanceMethodDeclaration")),
                        "abstract"));
      }
      if (isOverridden) {
        continue;
      }

      SNode container =
          SNodeOperations.getAncestor(
              method, "jetbrains.mps.baseLanguage.structure.Classifier", false, false);
      if (container == thisNode || container == null) {
        continue;
      }
      if (SNodeOperations.isInstanceOf(container, "jetbrains.mps.baseLanguage.structure.Interface")
          || SPropertyOperations.getBoolean(method, "isAbstract")) {
        ListSequence.fromList(methods).addElement(method);
      }
    }
    return methods;
  }