private Iterable<String> getEditorHints_fxz4pq_a9c0(SNode node, EditorContext editorContext) {
   if (SPropertyOperations.hasValue(
       node,
       MetaAdapterFactory.getProperty(
           0x7a80051c66e94bfcL,
           0x9698b12adfed3d9fL,
           0x51568a5db0cc3a79L,
           0x1b06bb955221551cL,
           "projectionType"),
       "rich",
       null)) {
     return Collections.singletonList(
         "jetbrains.mps.lang.editor.multiple.testLanguage.editor.MultipleEditorTestHints.rich");
   } else if (SPropertyOperations.hasValue(
       node,
       MetaAdapterFactory.getProperty(
           0x7a80051c66e94bfcL,
           0x9698b12adfed3d9fL,
           0x51568a5db0cc3a79L,
           0x1b06bb955221551cL,
           "projectionType"),
       "compact",
       null)) {
     return Collections.singletonList(
         "jetbrains.mps.lang.editor.multiple.testLanguage.editor.MultipleEditorTestHints.compact");
   }
   return Collections.emptyList();
 }
 public List<String> getPostfixes(
     SNode node, IOperationContext operationContext, EditorContext editorContext) {
   List<String> result;
   SNode nodeType = ActionParameter__BehaviorDescriptor.getType_id112RIkggjzD.invoke(node);
   if (nodeType != null) {
     result = Type__BehaviorDescriptor.getVariableSuffixes_idhEwIzNo.invoke(nodeType);
   } else {
     result = ListSequence.fromList(new ArrayList<String>());
   }
   // we need this because of smart input
   // DO NOT REMOVE IT
   if (SPropertyOperations.getString(
           node,
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"))
       != null) {
     ListSequence.fromList(result)
         .addElement(
             SPropertyOperations.getString(
                 node,
                 MetaAdapterFactory.getProperty(
                     0xceab519525ea4f22L,
                     0x9b92103b95ca8c0cL,
                     0x110396eaaa4L,
                     0x110396ec041L,
                     "name")));
   }
   return result;
 }
 /*package*/ static SNode toBaseLanguageType_idhEwI9ym(@NotNull SNode __thisNode__) {
   if (Primitives.INTEGER_TYPE.equals(
       SPropertyOperations.getString(
           __thisNode__,
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L,
               0x9b92103b95ca8c0cL,
               0x110396eaaa4L,
               0x110396ec041L,
               "name")))) {
     return _quotation_createNode_qjn9ch_a0a0a0();
   }
   if (Primitives.BOOLEAN_TYPE.equals(
       SPropertyOperations.getString(
           __thisNode__,
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L,
               0x9b92103b95ca8c0cL,
               0x110396eaaa4L,
               0x110396ec041L,
               "name")))) {
     return _quotation_createNode_qjn9ch_a0a1a0();
   }
   return _quotation_createNode_qjn9ch_a2a0();
 }
예제 #4
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")));
 }
 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")));
 }
예제 #6
0
 public static Object propertyMacro_GetPropertyValue_1216862267927(
     final PropertyMacroContext _context) {
   if (SPropertyOperations.getString(
           _context.getNode(),
           MetaAdapterFactory.getProperty(
               0xd7706f639be2479cL,
               0xa3daae92af1e64d5L,
               0x11b5282d0d6L,
               0x11b6b106ad8L,
               "labelName_intern"))
       != null) {
     // operation has been preprocessed by mapping script in TLBase
     return SPropertyOperations.getString(
         _context.getNode(),
         MetaAdapterFactory.getProperty(
             0xd7706f639be2479cL,
             0xa3daae92af1e64d5L,
             0x11b5282d0d6L,
             0x11b6b106ad8L,
             "labelName_intern"));
   }
   return SPropertyOperations.getString(
       SLinkOperations.getTarget(
           _context.getNode(),
           MetaAdapterFactory.getReferenceLink(
               0xd7706f639be2479cL, 0xa3daae92af1e64d5L, 0x11b5282d0d6L, 0x11b5282d0d7L, "label")),
       MetaAdapterFactory.getProperty(
           0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
 }
 /*package*/ static void setupCaretAndSelection_id7TYU6fNl1yz(
     @NotNull SNode __thisNode__, EditorCell cellWithId) {
   if (cellWithId instanceof EditorCell_Label) {
     EditorCell_Label label = (EditorCell_Label) cellWithId;
     label.setCaretPosition(
         ((int)
             AnonymousCellAnnotation__BehaviorDescriptor.getCaretPosition_id5rZKa_fUlry.invoke(
                 __thisNode__, label)));
     label.setSelectionStart(
         SPropertyOperations.getInteger(
             __thisNode__,
             MetaAdapterFactory.getProperty(
                 0x8585453e6bfb4d80L,
                 0x98deb16074f1d86cL,
                 0x11e31babe12L,
                 0x56ffc0a94fe5fc33L,
                 "selectionStart")));
     label.setSelectionEnd(
         SPropertyOperations.getInteger(
             __thisNode__,
             MetaAdapterFactory.getProperty(
                 0x8585453e6bfb4d80L,
                 0x98deb16074f1d86cL,
                 0x11e31babe12L,
                 0x56ffc0a94fe5fc35L,
                 "selectionEnd")));
   }
 }
예제 #8
0
 public static String virtual_getPresentation_1213877396640(SNode thisNode) {
   if (SNodeOperations.isInstanceOf(
       thisNode,
       MetaAdapterFactory.getInterfaceConcept(
           0xceab519525ea4f22L,
           0x9b92103b95ca8c0cL,
           0x110396eaaa4L,
           "jetbrains.mps.lang.core.structure.INamedConcept"))) {
     String name =
         SPropertyOperations.getString(
             SNodeOperations.cast(
                 thisNode,
                 MetaAdapterFactory.getInterfaceConcept(
                     0xceab519525ea4f22L,
                     0x9b92103b95ca8c0cL,
                     0x110396eaaa4L,
                     "jetbrains.mps.lang.core.structure.INamedConcept")),
             MetaAdapterFactory.getProperty(
                 0xceab519525ea4f22L,
                 0x9b92103b95ca8c0cL,
                 0x110396eaaa4L,
                 0x110396ec041L,
                 "name"));
     if (name != null) {
       return name;
     }
     return "<no name>["
         + SPropertyOperations.getString(
             SNodeOperations.getConceptDeclaration(thisNode),
             MetaAdapterFactory.getProperty(
                 0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"))
         + "]";
   }
   // --
   String smartRefPresentation = ReferenceConceptUtil.getPresentation(thisNode);
   if (smartRefPresentation != null) {
     return smartRefPresentation;
   }
   // --
   String conceptAlias =
       SPropertyOperations.getString(
           SNodeOperations.getConceptDeclaration(thisNode),
           MetaAdapterFactory.getProperty(
               0xc72da2b97cce4447L,
               0x8389f407dc1158b7L,
               0x1103553c5ffL,
               0x46ab0ad5826c74caL,
               "conceptAlias"));
   if (conceptAlias != null) {
     return conceptAlias;
   }
   // --
   return SPropertyOperations.getString(
       SNodeOperations.getConceptDeclaration(thisNode),
       MetaAdapterFactory.getProperty(
           0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
 }
 public static Object virtual_eval_1213877519769(SNode thisNode, SModule module) {
   SNode enumClass =
       SLinkOperations.getTarget(
           thisNode,
           MetaAdapterFactory.getReferenceLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xfc37588bc8L,
               0x10a758428feL,
               "enumClass"));
   SNode e =
       SLinkOperations.getTarget(
           thisNode,
           MetaAdapterFactory.getReferenceLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xfc37588bc8L,
               0xfc37588bcaL,
               "enumConstantDeclaration"));
   SModule m = check_p8mh91_a0c0a(SNodeOperations.getModel(e));
   if (m != null) {
     Enum eClass = null;
     try {
       eClass =
           ReflectionUtil.getEnum(
               m,
               enumClass,
               SPropertyOperations.getString(
                   e,
                   MetaAdapterFactory.getProperty(
                       0xceab519525ea4f22L,
                       0x9b92103b95ca8c0cL,
                       0x110396eaaa4L,
                       0x110396ec041L,
                       "name")));
     } catch (Throwable t) {
       // do nothing
     }
     if (eClass != null) {
       return eClass;
     }
   }
   return ReflectionUtil.getEnum(
       module,
       enumClass,
       SPropertyOperations.getString(
           e,
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")));
 }
 private static boolean renderingCondition_cv1jro_a2a0(SNode node, EditorContext editorContext) {
   return SPropertyOperations.getString(
           node,
           MetaAdapterFactory.getProperty(
               0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x11d0a70ae54L, 0x11d3ec75203L, "build"))
       != null;
 }
예제 #11
0
 public static Object propertyMacro_GetPropertyValue_2990235398086399637(
     final PropertyMacroContext _context) {
   return SPropertyOperations.getString(
       _context.getNode(),
       MetaAdapterFactory.getProperty(
           0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
 }
 /*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"));
 }
 /*package*/ static boolean isBoolean_idhKtG1tp(@NotNull SNode __thisNode__) {
   return Primitives.BOOLEAN_TYPE.equals(
       SPropertyOperations.getString(
           __thisNode__,
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")));
 }
 /*package*/ static String getTestName_idhGBohAB(@NotNull SNode __thisNode__) {
   return "test_"
       + SPropertyOperations.getString(
           __thisNode__,
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
 }
 private static String getPathId_id5KZfyKsWnkn(@NotNull SNode __thisNode__) {
   return "path."
       + SPropertyOperations.getString(
           __thisNode__,
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
 }
 public void applyRule(
     final SNode expr, final TypeCheckingContext typeCheckingContext, IsApplicableStatus status) {
   // todo: do right stuff! =(
   if (!(SPropertyOperations.getString(
           SNodeOperations.getNodeAncestor(
               expr,
               MetaAdapterFactory.getConcept(
                   0xaf65afd8f0dd4942L,
                   0x87d963a55f2a9db1L,
                   0x11d4348057eL,
                   "jetbrains.mps.lang.behavior.structure.ConceptMethodDeclaration"),
               false,
               false),
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"))
       .equals("getScope"))) {
     {
       MessageTarget errorTarget = new NodeMessageTarget();
       IErrorReporter _reporter_2309309498 =
           typeCheckingContext.reportTypeError(
               expr,
               "Should be in getScope method",
               "r:c2d05fc3-fe25-4093-95ce-8e3356e61084(jetbrains.mps.lang.scopes.typesystem)",
               "8077936094962911290",
               null,
               errorTarget);
     }
   }
 }
예제 #17
0
 public static Object propertyMacro_GetPropertyValue_3618324829955525209(
     final PropertyMacroContext _context) {
   return SPropertyOperations.getString(
       ListSequence.fromList(
               SLinkOperations.getChildren(
                   _context.getNode(),
                   MetaAdapterFactory.getContainmentLink(
                       0x772f6dcd8c0d48f7L,
                       0x869c908e036f7c8eL,
                       0x11d45f8a8b9L,
                       0x11d45f8a8baL,
                       "attribute")))
           .findFirst(
               new IWhereFilter<SNode>() {
                 public boolean accept(SNode it) {
                   return SPropertyOperations.getString(
                           it,
                           MetaAdapterFactory.getProperty(
                               0xceab519525ea4f22L,
                               0x9b92103b95ca8c0cL,
                               0x110396eaaa4L,
                               0x110396ec041L,
                               "name"))
                       .equals("text");
                 }
               }),
       MetaAdapterFactory.getProperty(
           0x772f6dcd8c0d48f7L, 0x869c908e036f7c8eL, 0x11d45f8a8a1L, 0x11d45f8a8a3L, "value"));
 }
예제 #18
0
 @Override
 public void execute(final SNode node, final EditorContext editorContext) {
   SNode newLine =
       SNodeFactoryOperations.createNewNode(
           SNodeFactoryOperations.asInstanceConcept(
               MetaAdapterFactory.getConcept(
                   0x18bc659203a64e29L,
                   0xa83a7ff23bde13baL,
                   0x120154df6f3L,
                   "jetbrains.mps.lang.editor.structure.IndentLayoutNewLineStyleClassItem")),
           null);
   SPropertyOperations.set(
       newLine,
       MetaAdapterFactory.getProperty(
           0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x1143bd1283bL, 0x1143bd161dbL, "flag"),
       "" + (true));
   ListSequence.fromList(
           SLinkOperations.getChildren(
               node,
               MetaAdapterFactory.getContainmentLink(
                   0x18bc659203a64e29L,
                   0xa83a7ff23bde13baL,
                   0x11beb039542L,
                   0x11beb040d06L,
                   "styleItem")))
       .addElement(newLine);
 }
예제 #19
0
 private static boolean renderingCondition_j22tlf_a0a(SNode node, EditorContext editorContext) {
   return !(SPropertyOperations.hasValue(
       node,
       MetaAdapterFactory.getProperty(
           0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10cb1ac5adeL, 0x11745b5371dL, "label"),
       null));
 }
 public static String call_getAnonymousClassPresentation_3421461530438560331(
     SNode thisNode, SNode containingClassifier) {
   String result = "Anonymous in ";
   SNode containingMethod =
       SNodeOperations.getNodeAncestor(
           thisNode,
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xf8cc56b1fcL,
               "jetbrains.mps.baseLanguage.structure.BaseMethodDeclaration"),
           false,
           false);
   if (containingMethod != null
       && SNodeOperations.getParent(containingMethod) == containingClassifier) {
     result +=
         SPropertyOperations.getString(
                 containingMethod,
                 MetaAdapterFactory.getProperty(
                     0xceab519525ea4f22L,
                     0x9b92103b95ca8c0cL,
                     0x110396eaaa4L,
                     0x110396ec041L,
                     "name"))
             + "() in ";
   }
   return result;
 }
 /*package*/ static String getExpandedIconPath_id5FstybB4d94(@NotNull SNode __thisNode__) {
   SModule module =
       jetbrains
           .mps
           .lang
           .smodel
           .generator
           .smodelAdapter
           .SNodeOperations
           .getModel(__thisNode__)
           .getModule();
   if (!(module instanceof AbstractModule)) {
     return null;
   }
   return MacrosFactory.forModule((AbstractModule) module)
       .expandPath(
           SPropertyOperations.getString(
               __thisNode__,
               MetaAdapterFactory.getProperty(
                   0x28f9e4973b424291L,
                   0xaeba0a1039153ab1L,
                   0x5adc7622e710bddcL,
                   0x5adc7622e710cf6eL,
                   "icon")));
 }
예제 #22
0
 public void execute(SNode node) {
   SNode expr =
       SNodeOperations.cast(
           node,
           MetaAdapterFactory.getConcept(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xf8c37f506fL,
               "jetbrains.mps.baseLanguage.structure.Expression"));
   Object value =
       Expression__BehaviorDescriptor.getCompileTimeConstantValue_idi1LP2xI.invoke(
           expr, SNodeOperations.getModel(expr).getModule());
   if (value instanceof Boolean) {
     SNode v =
         SNodeFactoryOperations.replaceWithNewChild(
             expr,
             SNodeFactoryOperations.asInstanceConcept(
                 MetaAdapterFactory.getConcept(
                     0xf3061a5392264cc5L,
                     0xa443f952ceaf5816L,
                     0xf8cc56b201L,
                     "jetbrains.mps.baseLanguage.structure.BooleanConstant")));
     SPropertyOperations.set(
         v,
         MetaAdapterFactory.getProperty(
             0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b201L, 0xf8cc56b202L, "value"),
         "" + (((Boolean) value).booleanValue()));
   }
 }
 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")));
 }
  @Override
  protected Map<SProperty, PropertyConstraintsDescriptor> getSpecifiedProperties() {
    Map<SProperty, PropertyConstraintsDescriptor> properties =
        new HashMap<SProperty, PropertyConstraintsDescriptor>();
    properties.put(
        MetaAdapterFactory.getProperty(
            0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"),
        new BasePropertyConstraintsDescriptor(
            MetaIdFactory.propId(
                0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L),
            this) {
          @Override
          public boolean hasOwnGetter() {
            return true;
          }

          @Override
          public Object getValue(SNode node) {
            String propertyName = "name";
            return (String)
                RunConfigurationProducer__BehaviorDescriptor.getDisplayedName_id3MnZbusxbtz.invoke(
                    node);
          }
        });
    return properties;
  }
 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")));
 }
 private static String getGroupPrefix_idhEwJa7y(@NotNull SNode __thisNode__) {
   String prefix = "";
   SNode parentGroup =
       SNodeOperations.getNodeAncestor(
           __thisNode__,
           MetaAdapterFactory.getConcept(
               0x28f9e4973b424291L,
               0xaeba0a1039153ab1L,
               0x1181da058d2L,
               "jetbrains.mps.lang.plugin.structure.ActionGroupDeclaration"),
           false,
           false);
   if (parentGroup != null) {
     prefix =
         ActionGroupDeclaration_BehaviorDescriptor.getGroupPrefix_idhEwJa7y.invoke(parentGroup)
             + SPropertyOperations.getString(
                 parentGroup,
                 MetaAdapterFactory.getProperty(
                     0xceab519525ea4f22L,
                     0x9b92103b95ca8c0cL,
                     0x110396eaaa4L,
                     0x110396ec041L,
                     "name"));
   }
   return prefix;
 }
 /*package*/ static Money getCurrentPrice_id3u6SZi0yq4L(@NotNull SNode __thisNode__) {
   if ((SLinkOperations.getTarget(
           __thisNode__,
           MetaAdapterFactory.getContainmentLink(
               0x662a9f2b58024d16L,
               0x955872c65c7a681eL,
               0x3786e3f4808999c3L,
               0x3786e3f480b0926aL,
               "symbol"))
       == null)) {
     return new Money(BigDecimal.ZERO, "USD");
   }
   Money currentPrice =
       StockPriceDownloader.getInstance()
           .getCurrentPrice(
               SPropertyOperations.getString(
                   SLinkOperations.getTarget(
                       __thisNode__,
                       MetaAdapterFactory.getContainmentLink(
                           0x662a9f2b58024d16L,
                           0x955872c65c7a681eL,
                           0x3786e3f4808999c3L,
                           0x3786e3f480b0926aL,
                           "symbol")),
                   MetaAdapterFactory.getProperty(
                       0x662a9f2b58024d16L,
                       0x955872c65c7a681eL,
                       0x3786e3f480a9b18aL,
                       0x3786e3f480afac5bL,
                       "symbol")));
   if (currentPrice == null) {
     return new Money(BigDecimal.ZERO, "USD");
   }
   return currentPrice;
 }
예제 #28
0
 public void property(String id, String name, String index) {
   assert myActualConcept != null;
   SPropertyId propertyId = myIdEncoder.parsePropertyId(myActualConcept.getConceptId(), id);
   myActualConcept.addProperty(propertyId, name);
   myProperties.put(index, MetaAdapterFactory.getProperty(propertyId, name));
   myMetaInfoProvider.setPropertyName(propertyId, name);
 }
 public void applyRule(
     final SNode variableReference,
     final TypeCheckingContext typeCheckingContext,
     IsApplicableStatus status) {
   if (SPropertyOperations.getBoolean(
       SLinkOperations.getTarget(
           variableReference,
           MetaAdapterFactory.getReferenceLink(
               0xf3061a5392264cc5L,
               0xa443f952ceaf5816L,
               0xf8c77f1e98L,
               0xf8cc6bf960L,
               "variableDeclaration")),
       MetaAdapterFactory.getProperty(
           0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37a7f6eL, 0x111f9e9f00cL, "isFinal"))) {
     if (!(VariableReferenceUtil.isUninitializedOrBad(variableReference))) {
       {
         MessageTarget errorTarget = new NodeMessageTarget();
         IErrorReporter _reporter_2309309498 =
             typeCheckingContext.reportTypeError(
                 variableReference,
                 "Cannot assign a value to final variable '"
                     + SPropertyOperations.getString(
                         SLinkOperations.getTarget(
                             variableReference,
                             MetaAdapterFactory.getReferenceLink(
                                 0xf3061a5392264cc5L,
                                 0xa443f952ceaf5816L,
                                 0xf8c77f1e98L,
                                 0xf8cc6bf960L,
                                 "variableDeclaration")),
                         MetaAdapterFactory.getProperty(
                             0xceab519525ea4f22L,
                             0x9b92103b95ca8c0cL,
                             0x110396eaaa4L,
                             0x110396ec041L,
                             "name"))
                     + "'",
                 "r:00000000-0000-4000-0000-011c895902c5(jetbrains.mps.baseLanguage.typesystem)",
                 "4705425356437995912",
                 null,
                 errorTarget);
       }
     }
   }
 }
예제 #30
0
 private static String getMethodName(SNode method) {
   return SPropertyOperations.getString(
           method,
           MetaAdapterFactory.getProperty(
               0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"))
       + "_"
       + method.getNodeId().toString();
 }