Ejemplo n.º 1
0
public class ConstraintsAspectDescriptor extends BaseConstraintsAspectDescriptor {
  public ConstraintsAspectDescriptor() {}

  @Override
  public ConstraintsDescriptor getConstraints(SAbstractConcept concept) {
    SAbstractConcept cncpt = concept;
    switch (index_2qnle6_a0c.index(cncpt)) {
      case 0:
        return new TransformationMenuPart_Intention_Constraints();
      case 1:
        return new TransformationMenuPart_Refactoring_Constraints();
      default:
    }
    return new BaseConstraintsDescriptor(concept);
  }

  private static final ConceptSwitchIndex index_2qnle6_a0c =
      new ConceptSwitchIndexBuilder()
          .put(
              MetaIdFactory.conceptId(
                  0xcffe907ed3de433fL, 0x89d657d9c449c0e2L, 0x289dadfa24b57a51L),
              MetaIdFactory.conceptId(
                  0xcffe907ed3de433fL, 0x89d657d9c449c0e2L, 0x41bc200f660dc377L))
          .seal();
}
  @Override
  protected Map<SReferenceLinkId, ReferenceConstraintsDescriptor> getNotDefaultSReferenceLinks() {
    Map<SReferenceLinkId, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLinkId, ReferenceConstraintsDescriptor>();
    references.put(
        MetaIdFactory.refId(
            0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x2724644c0ac833a5L, 0x2724644c0ac833a6L),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x2724644c0ac833a5L, 0x2724644c0ac833a6L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseScopeProvider() {
              @Override
              public boolean hasPresentation() {
                return true;
              }

              @Override
              public String getPresentation(
                  final IOperationContext operationContext,
                  final ReferencePresentationContext _context) {
                return SPropertyOperations.getString(
                        _context.getParameterNode(),
                        MetaAdapterFactory.getProperty(
                            0xceab519525ea4f22L,
                            0x9b92103b95ca8c0cL,
                            0x110396eaaa4L,
                            0x110396ec041L,
                            "name"))
                    + "()";
              }

              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_puti1i_a0a2a0a0a1a0b0a1a1;
              }

              @Override
              public Scope createScope(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                return ClassifierScopes.getVisibleClassifiersWithDefaultConstructors(
                    _context.getContextNode());
              }
            };
          }
        });
    return references;
  }
  @Override
  protected Map<SReferenceLinkId, ReferenceConstraintsDescriptor> getNotDefaultSReferenceLinks() {
    Map<SReferenceLinkId, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLinkId, ReferenceConstraintsDescriptor>();
    references.put(
        MetaIdFactory.refId(
            0x132aa4d8a3f7441cL, 0xa7eb3fce23492c6aL, 0x4b4c01fdd9029ce4L, 0x4b4c01fdd9029ce5L),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0x132aa4d8a3f7441cL, 0xa7eb3fce23492c6aL, 0x4b4c01fdd9029ce4L, 0x4b4c01fdd9029ce5L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseReferenceScopeProvider() {
              @Override
              public Object createSearchScopeOrListOfNodes(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                return SLinkOperations.getChildren(
                    BaseSimpleBuilderDeclaration__BehaviorDescriptor
                        .getContextDeclaration_id5rdgdYBzN9n.invoke(
                        SNodeOperations.getNodeAncestor(
                            _context.getEnclosingNode(),
                            MetaAdapterFactory.getConcept(
                                0x132aa4d8a3f7441cL,
                                0xa7eb3fce23492c6aL,
                                0x56cd40dfa78d35b1L,
                                "jetbrains.mps.baseLanguage.builders.structure.BaseSimpleBuilderDeclaration"),
                            true,
                            false)),
                    MetaAdapterFactory.getContainmentLink(
                        0x132aa4d8a3f7441cL,
                        0xa7eb3fce23492c6aL,
                        0x6524536b2e1a1e38L,
                        0x4b4c01fdd9010b91L,
                        "parameter"));
              }

              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_seakpt_a0a1a0a0a1a0b0a1a1;
              }
            };
          }
        });
    return references;
  }
Ejemplo n.º 4
0
  @Override
  protected Map<SReferenceLinkId, ReferenceConstraintsDescriptor> getNotDefaultSReferenceLinks() {
    Map<SReferenceLinkId, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLinkId, ReferenceConstraintsDescriptor>();
    references.put(
        MetaIdFactory.refId(
            0x530533eef7894c1eL, 0xba56de1bbf3afda7L, 0xa99ffe1c8457446L, 0xa99ffe1c8457447L),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0x530533eef7894c1eL, 0xba56de1bbf3afda7L, 0xa99ffe1c8457446L, 0xa99ffe1c8457447L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseReferenceScopeProvider() {
              @Override
              public Object createSearchScopeOrListOfNodes(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                return SLinkOperations.getChildren(
                    AbstractStateMachineElement__BehaviorDescriptor.getStateMachine_id6SYFRDkTQVW
                        .invoke(
                            SNodeOperations.cast(
                                _context.getEnclosingNode(),
                                MetaAdapterFactory.getConcept(
                                    0x530533eef7894c1eL,
                                    0xba56de1bbf3afda7L,
                                    0xa99ffe1c845743dL,
                                    "jetbrains.mps.samples.multipleProjections.stateMachine.structure.Transition"))),
                    MetaAdapterFactory.getContainmentLink(
                        0x530533eef7894c1eL,
                        0xba56de1bbf3afda7L,
                        0xa99ffe1c8456ba1L,
                        0xa99ffe1c8456ba3L,
                        "events"));
              }

              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_fz49k4_a0a1a0a0a1a0b0a1a3;
              }
            };
          }
        });
    return references;
  }
  @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;
  }
  @Override
  protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() {
    Map<SReferenceLink, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>();
    references.put(
        MetaAdapterFactory.getReferenceLink(
            0x18bc659203a64e29L,
            0xa83a7ff23bde13baL,
            0x5d3b34577b3cff09L,
            0x5d3b34577b3cff0aL,
            "menu"),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0x5d3b34577b3cff09L, 0x5d3b34577b3cff0aL),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseScopeProvider() {
              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_bj2kbe_a0a0a0a0a1a0b0a1a3;
              }

              @Override
              public Scope createScope(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                {
                  Scope scope =
                      Scope.getScope(
                          _context.getContextNode(),
                          _context.getContextRole(),
                          _context.getPosition(),
                          _context.getLinkTarget());
                  if (scope == null) {
                    return MenuScopes.getNamedMenus(
                        _context.getContextNode(),
                        _context.getContextRole(),
                        _context.getPosition(),
                        MetaAdapterFactory.getConcept(
                            0x18bc659203a64e29L,
                            0xa83a7ff23bde13baL,
                            0x4e0f93d8a0ac4ee8L,
                            "jetbrains.mps.lang.editor.structure.TransformationMenu_Named"));
                  }
                  return scope;
                }
              }
            };
          }
        });
    return references;
  }
  @Override
  protected Map<SPropertyId, PropertyConstraintsDescriptor> getNotDefaultSProperties() {
    Map<SPropertyId, PropertyConstraintsDescriptor> properties =
        new HashMap<SPropertyId, PropertyConstraintsDescriptor>();
    properties.put(
        MetaIdFactory.propId(
            0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L),
        new BasePropertyConstraintsDescriptor(
            MetaIdFactory.propId(
                0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L),
            this) {
          @Override
          public boolean hasOwnGetter() {
            return true;
          }

          @Override
          public Object getValue(SNode node) {
            String propertyName = "name";
            {
              SNode extensionPoint =
                  SLinkOperations.getTarget(
                      node,
                      MetaAdapterFactory.getReferenceLink(
                          0xc0080a477e374558L,
                          0xbee99ae18e690549L,
                          0x33c018482cafa9d4L,
                          0x33c018482cafa9d5L,
                          "extensionPoint"));
              return ((extensionPoint != null
                      ? SPropertyOperations.getString(
                          extensionPoint,
                          MetaAdapterFactory.getProperty(
                              0xc0080a477e374558L,
                              0xbee99ae18e690549L,
                              0x33c018482cafa9d6L,
                              0x520ae19dd2771b96L,
                              "extensionName"))
                      : "<unknown>"))
                  + "_extension";
            }
          }
        });
    return properties;
  }
Ejemplo n.º 8
0
public final class BehaviorAspectDescriptor extends BaseBehaviorAspectDescriptor {
  private final BHDescriptor myConsoleModelExpression__BehaviorDescriptor =
      new ConsoleModelExpression__BehaviorDescriptor();
  private final BHDescriptor myReloadClassesCommand__BehaviorDescriptor =
      new ReloadClassesCommand__BehaviorDescriptor();
  private final BHDescriptor myShowRepositoryCommand__BehaviorDescriptor =
      new ShowRepositoryCommand__BehaviorDescriptor();
  private final BHDescriptor myInternalMode__BehaviorDescriptor =
      new InternalMode__BehaviorDescriptor();

  public BehaviorAspectDescriptor() {}

  @Nullable
  public BHDescriptor getDescriptor(@NotNull SAbstractConcept concept) {
    SAbstractConcept cncpt = concept;
    switch (index_846f5o_a0h.index(cncpt)) {
      case 0:
        return myConsoleModelExpression__BehaviorDescriptor;
      case 1:
        return myInternalMode__BehaviorDescriptor;
      case 2:
        return myReloadClassesCommand__BehaviorDescriptor;
      case 3:
        return myShowRepositoryCommand__BehaviorDescriptor;
      default:
    }
    return null;
  }

  private static final ConceptSwitchIndex index_846f5o_a0h =
      new ConceptSwitchIndexBuilder()
          .put(
              MetaIdFactory.conceptId(
                  0x995a73947f764b8bL, 0xa929c53448708106L, 0x4d7759afcea851bdL),
              MetaIdFactory.conceptId(
                  0x995a73947f764b8bL, 0xa929c53448708106L, 0x7a89354654722219L),
              MetaIdFactory.conceptId(
                  0x995a73947f764b8bL, 0xa929c53448708106L, 0x75bb0160f191dd31L),
              MetaIdFactory.conceptId(
                  0x995a73947f764b8bL, 0xa929c53448708106L, 0x75bb0160f191df0cL))
          .seal();
}
  @Override
  protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() {
    Map<SReferenceLink, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>();
    references.put(
        MetaAdapterFactory.getReferenceLink(
            0x698a8d22a10447a0L,
            0xba8d10e3ec237f13L,
            0x2670d5989d5b49b8L,
            0x2670d5989d5b49b9L,
            "target"),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0x698a8d22a10447a0L, 0xba8d10e3ec237f13L, 0x2670d5989d5b49b8L, 0x2670d5989d5b49b9L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseScopeProvider() {
              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_45r57v_a0a0a0a0a1a0b0a1a3;
              }

              @Override
              public Scope createScope(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                {
                  Scope scope =
                      Scope.getScope(
                          _context.getContextNode(),
                          _context.getContainmentLink(),
                          _context.getPosition(),
                          MetaAdapterFactory.getConcept(
                              0x698a8d22a10447a0L,
                              0xba8d10e3ec237f13L,
                              0x2670d5989d5a6275L,
                              "jetbrains.mps.build.workflow.structure.BwfSubTask"));
                  return (scope == null ? new EmptyScope() : scope);
                }
              }
            };
          }
        });
    return references;
  }
  @Override
  protected Map<SProperty, PropertyConstraintsDescriptor> getSpecifiedProperties() {
    Map<SProperty, PropertyConstraintsDescriptor> properties =
        new HashMap<SProperty, PropertyConstraintsDescriptor>();
    properties.put(
        MetaAdapterFactory.getProperty(
            0xb83431fe5c8f40bcL,
            0x8a3665e25f4dd253L,
            0x11f4b80e9d3L,
            0x11f5fdf3bedL,
            "operationName"),
        new BasePropertyConstraintsDescriptor(
            MetaIdFactory.propId(
                0xb83431fe5c8f40bcL, 0x8a3665e25f4dd253L, 0x11f4b80e9d3L, 0x11f5fdf3bedL),
            this) {
          @Override
          public boolean hasOwnGetter() {
            return true;
          }

          @Override
          public Object getValue(SNode node) {
            String propertyName = "operationName";
            {
              String name =
                  SPropertyOperations.getString(
                      node,
                      MetaAdapterFactory.getProperty(
                          0xceab519525ea4f22L,
                          0x9b92103b95ca8c0cL,
                          0x110396eaaa4L,
                          0x110396ec041L,
                          "name"));
              if (name == null) {
                return null;
              }
              StringBuilder result = new StringBuilder();
              for (int i = 0; i < name.length(); i++) {
                if (Character.isUpperCase(name.charAt(i))) {
                  result.append(' ');
                  result.append(name.toLowerCase().charAt(i));
                } else {
                  result.append(name.charAt(i));
                }
              }
              return result.toString();
            }
          }
        });
    return properties;
  }
Ejemplo n.º 11
0
  @Override
  protected Map<SPropertyId, PropertyConstraintsDescriptor> getNotDefaultSProperties() {
    Map<SPropertyId, PropertyConstraintsDescriptor> properties =
        new HashMap<SPropertyId, PropertyConstraintsDescriptor>();
    properties.put(
        MetaIdFactory.propId(
            0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L),
        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 SPropertyOperations.getString(
                SLinkOperations.getTarget(
                    node,
                    MetaAdapterFactory.getReferenceLink(
                        0xd7722d504b934c3aL,
                        0xae061903d05f95a7L,
                        0x1e3b9cbb9f7493c2L,
                        0x1e3b9cbb9f7493f7L,
                        "classifier")),
                MetaAdapterFactory.getProperty(
                    0xceab519525ea4f22L,
                    0x9b92103b95ca8c0cL,
                    0x110396eaaa4L,
                    0x110396ec041L,
                    "name"));
          }
        });
    return properties;
  }
Ejemplo n.º 12
0
  @Override
  protected Map<SReferenceLinkId, ReferenceConstraintsDescriptor> getNotDefaultSReferenceLinks() {
    Map<SReferenceLinkId, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLinkId, ReferenceConstraintsDescriptor>();
    references.put(
        MetaIdFactory.refId(
            0xd7722d504b934c3aL, 0xae061903d05f95a7L, 0x1e3b9cbb9f7493c2L, 0x1e3b9cbb9f7493f7L),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0xd7722d504b934c3aL, 0xae061903d05f95a7L, 0x1e3b9cbb9f7493c2L, 0x1e3b9cbb9f7493f7L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseScopeProvider() {
              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_8qo5s5_a0a0a0a0a1a0b0a1a2;
              }

              @Override
              public Scope createScope(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                return new ExternalViewClassifierScope(_context.getModel());
              }
            };
          }
        });
    return references;
  }
Ejemplo n.º 13
0
  @Override
  protected Map<SReferenceLinkId, ReferenceConstraintsDescriptor> getNotDefaultSReferenceLinks() {
    Map<SReferenceLinkId, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLinkId, ReferenceConstraintsDescriptor>();
    references.put(
        MetaIdFactory.refId(
            0xd3c5a46fb8c247dbL, 0xad0a30b8f19c2055L, 0x3e81ed1e2be77cb7L, 0x3e81ed1e2be77cc0L),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0xd3c5a46fb8c247dbL, 0xad0a30b8f19c2055L, 0x3e81ed1e2be77cb7L, 0x3e81ed1e2be77cc0L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseReferenceScopeProvider() {
              @Override
              public Object createSearchScopeOrListOfNodes(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                return new ModelAndImportedModelsScope(_context.getModel(), true);
              }

              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_d3a0zo_a0a1a0a0a1a0b0a1a1;
              }
            };
          }
        });
    return references;
  }
Ejemplo n.º 14
0
  @Override
  protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() {
    Map<SReferenceLink, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>();
    references.put(
        MetaAdapterFactory.getReferenceLink(
            0xdcb5a83a19a844ffL,
            0xa4cbfc7d324ecc63L,
            0x1f6c736337b5e2d8L,
            0x1f6c736337b5e2dcL,
            "rule"),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0xdcb5a83a19a844ffL, 0xa4cbfc7d324ecc63L, 0x1f6c736337b5e2d8L, 0x1f6c736337b5e2dcL),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseReferenceScopeProvider() {
              @Override
              public Object createSearchScopeOrListOfNodes(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                return SNodeOperations.getNodeDescendants(
                    SNodeOperations.getContainingRoot(_context.getEnclosingNode()),
                    MetaAdapterFactory.getConcept(
                        0xdcb5a83a19a844ffL,
                        0xa4cbfc7d324ecc63L,
                        0x1f6c736337b5e2f2L,
                        "jetbrains.mps.core.xml.sax.structure.XMLSAXNodeRule"),
                    false,
                    new SAbstractConcept[] {});
              }

              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_1y346m_a0a1a0a0a1a0b0a1a3;
              }
            };
          }
        });
    return references;
  }
Ejemplo n.º 15
0
public class DataFlowAspectDescriptorImpl extends DataFlowAspectDescriptorBase {

  @NotNull
  @Override
  public Collection<IDataFlowBuilder> getDataFlowBuilders(SAbstractConcept concept) {
    SAbstractConcept cncpt = ((SAbstractConcept) concept);
    switch (index_vhxjlb_a0b.index(cncpt)) {
      case 0:
        return Collections.<IDataFlowBuilder>singletonList(new AssertEquals_DataFlow());
      case 1:
        return Collections.<IDataFlowBuilder>singletonList(new AssertFalse_DataFlow());
      case 2:
        return Collections.<IDataFlowBuilder>singletonList(new AssertIsNotNull_DataFlow());
      case 3:
        return Collections.<IDataFlowBuilder>singletonList(new AssertIsNull_DataFlow());
      case 4:
        return Collections.<IDataFlowBuilder>singletonList(new AssertSame_DataFlow());
      case 5:
        return Collections.<IDataFlowBuilder>singletonList(new AssertThrows_DataFlow());
      case 6:
        return Collections.<IDataFlowBuilder>singletonList(new AssertTrue_DataFlow());
      case 7:
        return Collections.<IDataFlowBuilder>singletonList(new Message_DataFlow());
      default:
    }
    return Collections.<IDataFlowBuilder>emptyList();
  }

  private static final ConceptSwitchIndex index_vhxjlb_a0b =
      new ConceptSwitchIndexBuilder()
          .put(
              MetaIdFactory.conceptId(0xf61473f9130f42f6L, 0xb98d6c438812c2f6L, 0x110df569442L),
              MetaIdFactory.conceptId(0xf61473f9130f42f6L, 0xb98d6c438812c2f6L, 0x110dfae1d08L),
              MetaIdFactory.conceptId(
                  0xf61473f9130f42f6L, 0xb98d6c438812c2f6L, 0x624233a5cf1ae0f7L),
              MetaIdFactory.conceptId(0xf61473f9130f42f6L, 0xb98d6c438812c2f6L, 0x110e252ba91L),
              MetaIdFactory.conceptId(0xf61473f9130f42f6L, 0xb98d6c438812c2f6L, 0x110dfcb1f43L),
              MetaIdFactory.conceptId(0xf61473f9130f42f6L, 0xb98d6c438812c2f6L, 0x110e4cee82cL),
              MetaIdFactory.conceptId(0xf61473f9130f42f6L, 0xb98d6c438812c2f6L, 0x110df833483L),
              MetaIdFactory.conceptId(0xf61473f9130f42f6L, 0xb98d6c438812c2f6L, 0x110e5064e8fL))
          .seal();
}
Ejemplo n.º 16
0
public final class IntentionsDescriptor extends IntentionAspectBase {
  private static final IntentionFactory[] EMPTY_ARRAY = new IntentionFactory[0];
  private Map<SAbstractConcept, IntentionFactory[]> myCached =
      new HashMap<SAbstractConcept, IntentionFactory[]>();

  public IntentionsDescriptor() {}

  @Nullable
  public Collection<IntentionFactory> getIntentions(@NotNull SAbstractConcept concept) {
    if (myCached.containsKey(concept)) {
      return Arrays.asList(myCached.get(concept));
    }

    IntentionFactory[] intentions = EMPTY_ARRAY;
    SAbstractConcept cncpt = concept;
    switch (index_hphjzv_d0f.index(cncpt)) {
      case 0:
        if (true) {
          // Concept: IconExpression
          intentions = new IntentionFactory[1];
          intentions[0] = new Icon2Resource_Intention();
        }
        break;
      default:
    }
    myCached.put(concept, intentions);
    return Arrays.asList(intentions);
  }

  @NotNull
  @Override
  public Collection<IntentionFactory> getAllIntentions() {
    IntentionFactory[] rv = new IntentionFactory[1];
    rv[0] = new Icon2Resource_Intention();
    return Arrays.asList(rv);
  }

  private static final ConceptSwitchIndex index_hphjzv_d0f =
      new ConceptSwitchIndexBuilder()
          .put(
              MetaIdFactory.conceptId(
                  0x982eb8df2c964bd7L, 0x996311712ea622e5L, 0x7c8b08a50a39c6c3L))
          .seal();
}
Ejemplo n.º 17
0
 protected void addBuiltInImports() {
   SLanguage base =
       MetaAdapterFactory.getLanguage(
           MetaIdFactory.langId(0xde1ad86d6e504a02L, 0xb306d4d17f64c375L),
           "jetbrains.mps.console.base");
   Collection<SLanguage> baseAndExtensions =
       new SLanguageHierarchy(Collections.singleton(base)).getExtending();
   SModelInternal modelInternal = ((SModelInternal) myModel);
   for (SLanguage l : CollectionSequence.fromCollection(baseAndExtensions)) {
     modelInternal.addLanguage(l);
     Language sourceLangModule = (Language) l.getSourceModule();
     if (sourceLangModule == null) {
       continue;
     }
     modelInternal.addModelImport(
         sourceLangModule.getStructureModelDescriptor().getReference(), false);
     ((AbstractModule) myModel.getModule())
         .addDependency(sourceLangModule.getModuleReference(), false);
   }
   modelInternal.addDevKit(
       PersistenceFacade.getInstance()
           .createModuleReference(
               "fbc25dd2-5da4-483a-8b19-70928e1b62d7(jetbrains.mps.devkit.general-purpose)"));
 }
Ejemplo n.º 18
0
 public TestCaseRef_Constraints() {
   super(MetaIdFactory.conceptId(0xd3c5a46fb8c247dbL, 0xad0a30b8f19c2055L, 0x3e81ed1e2be77cb7L));
 }
  @Override
  protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() {
    Map<SReferenceLink, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>();
    references.put(
        MetaAdapterFactory.getReferenceLink(
            0xb401a68083254110L,
            0x8fd384331ff25befL,
            0x40be82ad503b3c88L,
            0x40be82ad503b3ec4L,
            "patternVarDecl"),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0xb401a68083254110L, 0x8fd384331ff25befL, 0x40be82ad503b3c88L, 0x40be82ad503b3ec4L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseReferenceScopeProvider() {
              @Override
              public Object createSearchScopeOrListOfNodes(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                List<SNode> result = new ArrayList<SNode>();
                SNode rule =
                    SNodeOperations.getNodeAncestor(
                        _context.getEnclosingNode(),
                        MetaAdapterFactory.getConcept(
                            0xb401a68083254110L,
                            0x8fd384331ff25befL,
                            0x190d31fe6a12ebb4L,
                            "jetbrains.mps.lang.generator.structure.PatternReduction_MappingRule"),
                        false,
                        false);
                if ((rule != null)
                    && (SLinkOperations.getTarget(
                            rule,
                            MetaAdapterFactory.getContainmentLink(
                                0xb401a68083254110L,
                                0x8fd384331ff25befL,
                                0x190d31fe6a12ebb4L,
                                0x190d31fe6a13891aL,
                                "pattern"))
                        != null)) {
                  ListSequence.fromList(result)
                      .addSequence(
                          ListSequence.fromList(
                              SNodeOperations.getNodeDescendants(
                                  SLinkOperations.getTarget(
                                      rule,
                                      MetaAdapterFactory.getContainmentLink(
                                          0xb401a68083254110L,
                                          0x8fd384331ff25befL,
                                          0x190d31fe6a12ebb4L,
                                          0x190d31fe6a13891aL,
                                          "pattern")),
                                  MetaAdapterFactory.getConcept(
                                      0xd4615e3bd6714ba9L,
                                      0xaf012b78369b0ba7L,
                                      0x108a9cb4793L,
                                      "jetbrains.mps.lang.pattern.structure.PatternVariableDeclaration"),
                                  false,
                                  new SAbstractConcept[] {})));
                }
                return result;
              }

              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_u4q1ju_a0a1a0a0a1a0b0a1a5;
              }
            };
          }
        });
    return references;
  }
 public DefaultClassCreator_Constraints() {
   super(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x2724644c0ac833a5L));
 }
Ejemplo n.º 21
0
 public DSLDescriptor_Constraints() {
   super(MetaIdFactory.conceptId(0xc7d5b9dda05f4be2L, 0xbc73f2e16994cc67L, 0x340eb2bd2e03d160L));
 }
  @Override
  protected Map<SPropertyId, PropertyConstraintsDescriptor> getNotDefaultSProperties() {
    Map<SPropertyId, PropertyConstraintsDescriptor> properties =
        new HashMap<SPropertyId, PropertyConstraintsDescriptor>();
    properties.put(
        MetaIdFactory.propId(
            0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L),
        new BasePropertyConstraintsDescriptor(
            MetaIdFactory.propId(
                0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L),
            this) {
          @Override
          public boolean hasOwnGetter() {
            return true;
          }

          @Override
          public Object getValue(SNode node) {
            String propertyName = "name";
            {
              String editorName =
                  SPropertyOperations.getString(
                      AbstractComponent__BehaviorDescriptor.getConceptDeclaration_id67EYkym$wx3
                          .invoke(node),
                      MetaAdapterFactory.getProperty(
                          0xceab519525ea4f22L,
                          0x9b92103b95ca8c0cL,
                          0x110396eaaa4L,
                          0x110396ec041L,
                          "name"));
              for (SNode contextHint :
                  ListSequence.fromList(
                      SLinkOperations.getChildren(
                          node,
                          MetaAdapterFactory.getContainmentLink(
                              0x18bc659203a64e29L,
                              0xa83a7ff23bde13baL,
                              0xf9845363abL,
                              0x240ba2de0c6c0b6eL,
                              "contextHints")))) {
                editorName +=
                    "_"
                        + SPropertyOperations.getString(
                            SLinkOperations.getTarget(
                                contextHint,
                                MetaAdapterFactory.getReferenceLink(
                                    0x18bc659203a64e29L,
                                    0xa83a7ff23bde13baL,
                                    0x5eadaecad41188dcL,
                                    0x527faacef66db74dL,
                                    "hint")),
                            MetaAdapterFactory.getProperty(
                                0xceab519525ea4f22L,
                                0x9b92103b95ca8c0cL,
                                0x110396eaaa4L,
                                0x110396ec041L,
                                "name"));
              }
              return editorName + "_Editor";
            }
          }
        });
    return properties;
  }
Ejemplo n.º 23
0
 public EventReference_Constraints() {
   super(MetaIdFactory.conceptId(0x530533eef7894c1eL, 0xba56de1bbf3afda7L, 0xa99ffe1c8457446L));
 }
Ejemplo n.º 24
0
public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {

  /*package*/ final ConceptDescriptor myConceptFalseFlow =
      new ConceptDescriptorBuilder(
              "org.jetbrains.mps.samples.IfAndUnless.structure.FalseFlow",
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad45dd24L))
          .super_("org.jetbrains.mps.samples.IfAndUnless.structure.Flow")
          .super_(
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad448ccfL))
          .parents("org.jetbrains.mps.samples.IfAndUnless.structure.Flow")
          .parentIds(
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad448ccfL))
          .create();
  /*package*/ final ConceptDescriptor myConceptFlow =
      new ConceptDescriptorBuilder(
              "org.jetbrains.mps.samples.IfAndUnless.structure.Flow",
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad448ccfL))
          .super_("jetbrains.mps.baseLanguage.structure.StatementList")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L))
          .parents(
              "jetbrains.mps.baseLanguage.structure.StatementList",
              "jetbrains.mps.lang.core.structure.InterfacePart")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L),
              MetaIdFactory.conceptId(
                  0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x12509ddfaa98f128L))
          .abstract_()
          .create();
  /*package*/ final ConceptDescriptor myConceptMyIfStatement =
      new ConceptDescriptorBuilder(
              "org.jetbrains.mps.samples.IfAndUnless.structure.MyIfStatement",
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad448ccaL))
          .super_("jetbrains.mps.baseLanguage.structure.Statement")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b215L))
          .parents("jetbrains.mps.baseLanguage.structure.Statement")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b215L))
          .childDescriptors(
              new ConceptDescriptorBuilder.Link(
                  954830572075912397L,
                  "condition",
                  MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL),
                  false,
                  false,
                  false),
              new ConceptDescriptorBuilder.Link(
                  954830572075912398L,
                  "body",
                  MetaIdFactory.conceptId(
                      0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad45dd1fL),
                  false,
                  false,
                  false),
              new ConceptDescriptorBuilder.Link(
                  954830572075974221L,
                  "alternative",
                  MetaIdFactory.conceptId(
                      0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad45dd24L),
                  false,
                  false,
                  false))
          .children(
              new String[] {"condition", "body", "alternative"},
              new boolean[] {false, false, false})
          .alias("my_if", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptTrueFlow =
      new ConceptDescriptorBuilder(
              "org.jetbrains.mps.samples.IfAndUnless.structure.TrueFlow",
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad45dd1fL))
          .super_("org.jetbrains.mps.samples.IfAndUnless.structure.Flow")
          .super_(
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad448ccfL))
          .parents("org.jetbrains.mps.samples.IfAndUnless.structure.Flow")
          .parentIds(
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0xd403d58ad448ccfL))
          .create();
  /*package*/ final ConceptDescriptor myConceptUnlessStatement =
      new ConceptDescriptorBuilder(
              "org.jetbrains.mps.samples.IfAndUnless.structure.UnlessStatement",
              MetaIdFactory.conceptId(0x67b828fd8fbc4496L, 0xb7f78b64ac097c62L, 0x57547b70f36dc0dL))
          .super_("jetbrains.mps.baseLanguage.structure.Statement")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b215L))
          .parents("jetbrains.mps.baseLanguage.structure.Statement")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b215L))
          .childDescriptors(
              new ConceptDescriptorBuilder.Link(
                  393299394024627214L,
                  "condition",
                  MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL),
                  false,
                  false,
                  false),
              new ConceptDescriptorBuilder.Link(
                  393299394024627228L,
                  "body",
                  MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc56b200L),
                  false,
                  false,
                  false))
          .children(new String[] {"condition", "body"}, new boolean[] {false, false})
          .alias("unless", "")
          .staticScope(StaticScope.NONE)
          .create();

  @Override
  public Collection<ConceptDescriptor> getDescriptors() {
    return Arrays.asList(
        myConceptFalseFlow,
        myConceptFlow,
        myConceptMyIfStatement,
        myConceptTrueFlow,
        myConceptUnlessStatement);
  }

  @Override
  @Nullable
  public ConceptDescriptor getDescriptor(String conceptFqName) {
    switch (Arrays.binarySearch(stringSwitchCases_1htk8d_a0a0j, conceptFqName)) {
      case 0:
        return myConceptFalseFlow;
      case 1:
        return myConceptFlow;
      case 2:
        return myConceptMyIfStatement;
      case 3:
        return myConceptTrueFlow;
      case 4:
        return myConceptUnlessStatement;
      default:
        return null;
    }
  }

  private static String[] stringSwitchCases_1htk8d_a0a0j =
      new String[] {
        "org.jetbrains.mps.samples.IfAndUnless.structure.FalseFlow",
        "org.jetbrains.mps.samples.IfAndUnless.structure.Flow",
        "org.jetbrains.mps.samples.IfAndUnless.structure.MyIfStatement",
        "org.jetbrains.mps.samples.IfAndUnless.structure.TrueFlow",
        "org.jetbrains.mps.samples.IfAndUnless.structure.UnlessStatement"
      };
}
Ejemplo n.º 25
0
  @Override
  protected Map<SReferenceLinkId, ReferenceConstraintsDescriptor> getNotDefaultSReferenceLinks() {
    Map<SReferenceLinkId, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLinkId, ReferenceConstraintsDescriptor>();
    references.put(
        MetaIdFactory.refId(
            0xc7d5b9dda05f4be2L, 0xbc73f2e16994cc67L, 0x340eb2bd2e03d160L, 0x1955e1ca83e5ed92L),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0xc7d5b9dda05f4be2L, 0xbc73f2e16994cc67L, 0x340eb2bd2e03d160L, 0x1955e1ca83e5ed92L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseScopeProvider() {
              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_664l29_a0a0a0a0a1a0b0a1a3;
              }

              @Override
              public Scope createScope(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                return new FilteringScope(
                    new ConceptsScope(
                        _context.getContextNode(),
                        MetaAdapterFactory.getConcept(
                            0xc72da2b97cce4447L,
                            0x8389f407dc1158b7L,
                            0x1103553c5ffL,
                            "jetbrains.mps.lang.structure.structure.AbstractConceptDeclaration"))) {
                  @Override
                  public boolean isExcluded(SNode node) {
                    if (!(SNodeOperations.isInstanceOf(
                        node,
                        MetaAdapterFactory.getConcept(
                            0xc72da2b97cce4447L,
                            0x8389f407dc1158b7L,
                            0x1103553c5ffL,
                            "jetbrains.mps.lang.structure.structure.AbstractConceptDeclaration")))) {
                      return false;
                    }
                    return !((AbstractConceptDeclaration_Behavior
                        .call_isSubconceptOf_8134325418312549386(
                            SNodeOperations.cast(
                                node,
                                MetaAdapterFactory.getConcept(
                                    0xc72da2b97cce4447L,
                                    0x8389f407dc1158b7L,
                                    0x1103553c5ffL,
                                    "jetbrains.mps.lang.structure.structure.AbstractConceptDeclaration")),
                            SNodeOperations.getNode(
                                "r:00000000-0000-4000-0000-011c895902ca(jetbrains.mps.baseLanguage.structure)",
                                "1068390468198"))));
                  }
                };
              }
            };
          }
        });
    return references;
  }
Ejemplo n.º 26
0
public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {

  /*package*/ final ConceptDescriptor myConceptBreakpointCreator =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.BreakpointCreator",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x2bd07aa080dfb3a4L))
          .super_("jetbrains.mps.lang.core.structure.BaseConcept")
          .super_(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .parents("jetbrains.mps.lang.core.structure.BaseConcept")
          .parentIds(
              MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .childDescriptors(
              new ConceptDescriptorBuilder.Link(
                  1270798772176052787L,
                  "breakpointableConcepts",
                  MetaIdFactory.conceptId(
                      0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x2bd07aa080dfb937L),
                  true,
                  true,
                  false))
          .children(new String[] {"breakpointableConcepts"}, new boolean[] {true})
          .alias("breakpoint creators", "")
          .create();
  /*package*/ final ConceptDescriptor myConceptBreakpointableNodeItem =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.BreakpointableNodeItem",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x2bd07aa080dfb937L))
          .super_("jetbrains.mps.lang.core.structure.BaseConcept")
          .super_(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .parents("jetbrains.mps.lang.core.structure.BaseConcept")
          .parentIds(
              MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .propertyDescriptors(new ConceptDescriptorBuilder.Prop(8751745335399632086L, "isComplex"))
          .properties("isComplex")
          .referenceDescriptors(
              new ConceptDescriptorBuilder.Ref(
                  3157158168562219321L,
                  "declaration",
                  MetaIdFactory.conceptId(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L),
                  true))
          .references("declaration")
          .childDescriptors(
              new ConceptDescriptorBuilder.Link(
                  3157158168562219320L,
                  "createBreakpoint",
                  MetaIdFactory.conceptId(
                      0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x2bd07aa080dfb93aL),
                  false,
                  false,
                  false),
              new ConceptDescriptorBuilder.Link(
                  8751745335399632085L,
                  "isApplicable",
                  MetaIdFactory.conceptId(
                      0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x79747203892d4cc9L),
                  true,
                  false,
                  false),
              new ConceptDescriptorBuilder.Link(
                  3104811047188238838L,
                  "isApplicableBreakpoint",
                  MetaIdFactory.conceptId(
                      0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x2b1681328a5d4b64L),
                  true,
                  false,
                  false),
              new ConceptDescriptorBuilder.Link(
                  5789575999242884576L,
                  "conceptsToCreateBreakpoint",
                  MetaIdFactory.conceptId(
                      0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x5058b4b262ffd5deL),
                  true,
                  true,
                  false))
          .children(
              new String[] {
                "createBreakpoint",
                "isApplicable",
                "isApplicableBreakpoint",
                "conceptsToCreateBreakpoint"
              },
              new boolean[] {false, false, false, true})
          .create();
  /*package*/ final ConceptDescriptor myConceptConceptDeclarationReference =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.ConceptDeclarationReference",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x5058b4b262ffd5deL))
          .super_("jetbrains.mps.lang.core.structure.BaseConcept")
          .super_(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .parents("jetbrains.mps.lang.core.structure.BaseConcept")
          .parentIds(
              MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .referenceDescriptors(
              new ConceptDescriptorBuilder.Ref(
                  5789575999242884575L,
                  "conceptDeclaration",
                  MetaIdFactory.conceptId(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0xf979ba0450L),
                  false))
          .references("conceptDeclaration")
          .create();
  /*package*/ final ConceptDescriptor myConceptConceptFunctionParameter_Concept =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.ConceptFunctionParameter_Concept",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x79747203892d4ccdL))
          .super_("jetbrains.mps.baseLanguage.structure.ConceptFunctionParameter")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101c66e2c0bL))
          .parents("jetbrains.mps.baseLanguage.structure.ConceptFunctionParameter")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101c66e2c0bL))
          .alias("concept", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptConceptFunctionParameter_Debug_Project =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.ConceptFunctionParameter_Debug_Project",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x11a2c8c0148e628cL))
          .super_("jetbrains.mps.baseLanguage.structure.ConceptFunctionParameter")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101c66e2c0bL))
          .parents("jetbrains.mps.baseLanguage.structure.ConceptFunctionParameter")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101c66e2c0bL))
          .alias("project", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptConceptFunctionParameter_DebuggableNode =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.ConceptFunctionParameter_DebuggableNode",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x11a2c8c0148e6290L))
          .super_("jetbrains.mps.baseLanguage.structure.ConceptFunctionParameter")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101c66e2c0bL))
          .parents("jetbrains.mps.baseLanguage.structure.ConceptFunctionParameter")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x101c66e2c0bL))
          .alias("debuggableNode", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptConceptFunction_CreateBreakpoint =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.ConceptFunction_CreateBreakpoint",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x2bd07aa080dfb93aL))
          .super_("jetbrains.mps.baseLanguage.structure.ConceptFunction")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L))
          .parents("jetbrains.mps.baseLanguage.structure.ConceptFunction")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L))
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptConceptFunction_IsApplicableBreakpoint =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.ConceptFunction_IsApplicableBreakpoint",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x2b1681328a5d4b64L))
          .super_("jetbrains.mps.baseLanguage.structure.ConceptFunction")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L))
          .parents("jetbrains.mps.baseLanguage.structure.ConceptFunction")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L))
          .alias("isApplicable", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptConceptFunction_IsApplicableToConcept =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.ConceptFunction_IsApplicableToConcept",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x79747203892d4cc9L))
          .super_("jetbrains.mps.baseLanguage.structure.ConceptFunction")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L))
          .parents("jetbrains.mps.baseLanguage.structure.ConceptFunction")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L))
          .alias("isApplicable", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptCreateBreakpointOperation =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.CreateBreakpointOperation",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x23a852e9c43bcae9L))
          .super_("jetbrains.mps.lang.core.structure.BaseConcept")
          .super_(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .parents(
              "jetbrains.mps.lang.core.structure.BaseConcept",
              "jetbrains.mps.baseLanguage.structure.IOperation")
          .parentIds(
              MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL),
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x116b46ac030L))
          .propertyDescriptors(
              new ConceptDescriptorBuilder.Prop(2569394751387978475L, "kindName"),
              new ConceptDescriptorBuilder.Prop(2569394751387978476L, "kindPresentation"))
          .properties("kindName", "kindPresentation")
          .childDescriptors(
              new ConceptDescriptorBuilder.Link(
                  2569394751387978492L,
                  "nodeExpression",
                  MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL),
                  false,
                  false,
                  false),
              new ConceptDescriptorBuilder.Link(
                  2569394751387978493L,
                  "projectExpression",
                  MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL),
                  false,
                  false,
                  false))
          .children(
              new String[] {"nodeExpression", "projectExpression"}, new boolean[] {false, false})
          .alias("create breakpoint", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptDebuggerConfiguration =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.DebuggerConfiguration",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x5d457621242d16f5L))
          .super_("jetbrains.mps.lang.core.structure.BaseConcept")
          .super_(MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .parents("jetbrains.mps.lang.core.structure.BaseConcept")
          .parentIds(
              MetaIdFactory.conceptId(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL))
          .childDescriptors(
              new ConceptDescriptorBuilder.Link(
                  6720907903633266912L,
                  "debugger",
                  MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL),
                  false,
                  false,
                  false),
              new ConceptDescriptorBuilder.Link(
                  6720907903633266913L,
                  "getSettings",
                  MetaIdFactory.conceptId(
                      0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x5d457621242d18e2L),
                  false,
                  false,
                  false))
          .children(new String[] {"debugger", "getSettings"}, new boolean[] {false, false})
          .create();
  /*package*/ final ConceptDescriptor myConceptDebuggerReference =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.DebuggerReference",
              MetaIdFactory.conceptId(0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0xf528808f912d151L))
          .super_("jetbrains.mps.baseLanguage.structure.Expression")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL))
          .parents("jetbrains.mps.baseLanguage.structure.Expression")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506fL))
          .propertyDescriptors(
              new ConceptDescriptorBuilder.Prop(1104094430779068757L, "debuggerName"))
          .properties("debuggerName")
          .alias("debugger", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptDebuggerType =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.DebuggerType",
              MetaIdFactory.conceptId(0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0xf528808f912bd83L))
          .super_("jetbrains.mps.baseLanguage.structure.Type")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506dL))
          .parents("jetbrains.mps.baseLanguage.structure.Type")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8c37f506dL))
          .propertyDescriptors(new ConceptDescriptorBuilder.Prop(2569394751388009837L, "name"))
          .properties("name")
          .alias("debugger type", "")
          .staticScope(StaticScope.NONE)
          .create();
  /*package*/ final ConceptDescriptor myConceptGetDebuggerSettings_Function =
      new ConceptDescriptorBuilder(
              "jetbrains.mps.debugger.api.lang.structure.GetDebuggerSettings_Function",
              MetaIdFactory.conceptId(
                  0xfbc142795e2a4c87L, 0xa5d15f7061e6c456L, 0x5d457621242d18e2L))
          .super_("jetbrains.mps.baseLanguage.structure.ConceptFunction")
          .super_(MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L))
          .parents("jetbrains.mps.baseLanguage.structure.ConceptFunction")
          .parentIds(
              MetaIdFactory.conceptId(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x108bbca0f48L))
          .alias("get debugger settings", "")
          .staticScope(StaticScope.NONE)
          .create();

  @Override
  public Collection<ConceptDescriptor> getDescriptors() {
    return Arrays.asList(
        myConceptBreakpointCreator,
        myConceptBreakpointableNodeItem,
        myConceptConceptDeclarationReference,
        myConceptConceptFunctionParameter_Concept,
        myConceptConceptFunctionParameter_Debug_Project,
        myConceptConceptFunctionParameter_DebuggableNode,
        myConceptConceptFunction_CreateBreakpoint,
        myConceptConceptFunction_IsApplicableBreakpoint,
        myConceptConceptFunction_IsApplicableToConcept,
        myConceptCreateBreakpointOperation,
        myConceptDebuggerConfiguration,
        myConceptDebuggerReference,
        myConceptDebuggerType,
        myConceptGetDebuggerSettings_Function);
  }

  @Override
  @Nullable
  public ConceptDescriptor getDescriptor(String conceptFqName) {
    switch (Arrays.binarySearch(stringSwitchCases_1htk8d_a0a0s, conceptFqName)) {
      case 0:
        return myConceptBreakpointCreator;
      case 1:
        return myConceptBreakpointableNodeItem;
      case 2:
        return myConceptConceptDeclarationReference;
      case 3:
        return myConceptConceptFunctionParameter_Concept;
      case 4:
        return myConceptConceptFunctionParameter_Debug_Project;
      case 5:
        return myConceptConceptFunctionParameter_DebuggableNode;
      case 6:
        return myConceptConceptFunction_CreateBreakpoint;
      case 7:
        return myConceptConceptFunction_IsApplicableBreakpoint;
      case 8:
        return myConceptConceptFunction_IsApplicableToConcept;
      case 9:
        return myConceptCreateBreakpointOperation;
      case 10:
        return myConceptDebuggerConfiguration;
      case 11:
        return myConceptDebuggerReference;
      case 12:
        return myConceptDebuggerType;
      case 13:
        return myConceptGetDebuggerSettings_Function;
      default:
        return null;
    }
  }

  private static String[] stringSwitchCases_1htk8d_a0a0s =
      new String[] {
        "jetbrains.mps.debugger.api.lang.structure.BreakpointCreator",
        "jetbrains.mps.debugger.api.lang.structure.BreakpointableNodeItem",
        "jetbrains.mps.debugger.api.lang.structure.ConceptDeclarationReference",
        "jetbrains.mps.debugger.api.lang.structure.ConceptFunctionParameter_Concept",
        "jetbrains.mps.debugger.api.lang.structure.ConceptFunctionParameter_Debug_Project",
        "jetbrains.mps.debugger.api.lang.structure.ConceptFunctionParameter_DebuggableNode",
        "jetbrains.mps.debugger.api.lang.structure.ConceptFunction_CreateBreakpoint",
        "jetbrains.mps.debugger.api.lang.structure.ConceptFunction_IsApplicableBreakpoint",
        "jetbrains.mps.debugger.api.lang.structure.ConceptFunction_IsApplicableToConcept",
        "jetbrains.mps.debugger.api.lang.structure.CreateBreakpointOperation",
        "jetbrains.mps.debugger.api.lang.structure.DebuggerConfiguration",
        "jetbrains.mps.debugger.api.lang.structure.DebuggerReference",
        "jetbrains.mps.debugger.api.lang.structure.DebuggerType",
        "jetbrains.mps.debugger.api.lang.structure.GetDebuggerSettings_Function"
      };
}
 public ConceptEditorDeclaration_Constraints() {
   super(MetaIdFactory.conceptId(0x18bc659203a64e29L, 0xa83a7ff23bde13baL, 0xf9845363abL));
 }
Ejemplo n.º 28
0
  @Override
  protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() {
    Map<SReferenceLink, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>();
    references.put(
        MetaAdapterFactory.getReferenceLink(
            0xf3061a5392264cc5L,
            0xa443f952ceaf5816L,
            0xf93d4da00cL,
            0x1136d9d21b3L,
            "classConcept"),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf93d4da00cL, 0x1136d9d21b3L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseScopeProvider() {
              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_cfy36u_a0a0a0a0a1a0b0a1a5;
              }

              @Override
              public Scope createScope(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                if (!(SNodeOperations.isInstanceOf(
                    _context.getReferenceNode(),
                    MetaAdapterFactory.getConcept(
                        0xf3061a5392264cc5L,
                        0xa443f952ceaf5816L,
                        0xf93d4da00cL,
                        "jetbrains.mps.baseLanguage.structure.ThisExpression")))) {
                  return new EmptyScope();
                }
                return new NamedElementsScope(
                    ThisExpression__BehaviorDescriptor.getPossibleClassifiers_idhGcjiYt.invoke(
                        SNodeOperations.cast(
                            _context.getReferenceNode(),
                            MetaAdapterFactory.getConcept(
                                0xf3061a5392264cc5L,
                                0xa443f952ceaf5816L,
                                0xf93d4da00cL,
                                "jetbrains.mps.baseLanguage.structure.ThisExpression")))) {
                  @Nullable
                  @Override
                  public SNode resolve(SNode contextNode, @NotNull String refText) {
                    String packageName =
                        jetbrains.mps.util.SNodeOperations.getModelLongName(
                                SNodeOperations.getModel(contextNode))
                            + ".";
                    if (refText.startsWith(packageName)) {
                      refText = refText.substring(packageName.length());
                    }
                    return super.resolve(contextNode, refText);
                  }
                };
              }
            };
          }
        });
    return references;
  }
  @Override
  protected Map<SReferenceLink, ReferenceConstraintsDescriptor> getSpecifiedReferences() {
    Map<SReferenceLink, ReferenceConstraintsDescriptor> references =
        new HashMap<SReferenceLink, ReferenceConstraintsDescriptor>();
    references.put(
        MetaAdapterFactory.getReferenceLink(
            0xcf935df46994e9cL,
            0xa132fa109541cba3L,
            0x5b7be37b4deb1201L,
            0x5b7be37b4deb1202L,
            "group"),
        new BaseReferenceConstraintsDescriptor(
            MetaIdFactory.refId(
                0xcf935df46994e9cL, 0xa132fa109541cba3L, 0x5b7be37b4deb1201L, 0x5b7be37b4deb1202L),
            this) {
          @Override
          public boolean hasOwnScopeProvider() {
            return true;
          }

          @Nullable
          @Override
          public ReferenceScopeProvider getScopeProvider() {
            return new BaseScopeProvider() {
              @Override
              public boolean hasPresentation() {
                return true;
              }

              @Override
              public String getPresentation(
                  final IOperationContext operationContext,
                  final ReferencePresentationContext _context) {
                if (SNodeOperations.getContainingRoot(_context.getParameterNode())
                    != SNodeOperations.getContainingRoot(_context.getContextNode())) {
                  SNode proj =
                      SNodeOperations.as(
                          SNodeOperations.getContainingRoot(_context.getParameterNode()),
                          MetaAdapterFactory.getConcept(
                              0x798100da4f0a421aL,
                              0xb99171f8c50ce5d2L,
                              0x4df58c6f18f84a13L,
                              "jetbrains.mps.build.structure.BuildProject"));
                  if (proj != null) {
                    return SPropertyOperations.getString(
                            proj,
                            MetaAdapterFactory.getProperty(
                                0xceab519525ea4f22L,
                                0x9b92103b95ca8c0cL,
                                0x110396eaaa4L,
                                0x110396ec041L,
                                "name"))
                        + "/"
                        + SPropertyOperations.getString(
                            _context.getParameterNode(),
                            MetaAdapterFactory.getProperty(
                                0xceab519525ea4f22L,
                                0x9b92103b95ca8c0cL,
                                0x110396eaaa4L,
                                0x110396ec041L,
                                "name"));
                  }
                }
                return SPropertyOperations.getString(
                    _context.getParameterNode(),
                    MetaAdapterFactory.getProperty(
                        0xceab519525ea4f22L,
                        0x9b92103b95ca8c0cL,
                        0x110396eaaa4L,
                        0x110396ec041L,
                        "name"));
              }

              @Override
              public SNodeReference getSearchScopeValidatorNode() {
                return breakingNode_h6r07b_a0a2a0a0a1a0b0a1a3;
              }

              @Override
              public Scope createScope(
                  final IOperationContext operationContext,
                  final ReferenceConstraintsContext _context) {
                {
                  Scope scope =
                      Scope.getScope(
                          _context.getContextNode(),
                          _context.getContainmentLink(),
                          _context.getPosition(),
                          MetaAdapterFactory.getConcept(
                              0xcf935df46994e9cL,
                              0xa132fa109541cba3L,
                              0x14d3fb6fb843ebddL,
                              "jetbrains.mps.build.mps.structure.BuildMps_Group"));
                  return (scope == null ? new EmptyScope() : scope);
                }
              }
            };
          }
        });
    return references;
  }
 public SimpleBuilderParameterReference_Constraints() {
   super(MetaIdFactory.conceptId(0x132aa4d8a3f7441cL, 0xa7eb3fce23492c6aL, 0x4b4c01fdd9029ce4L));
 }