Class ReferenceDescriptor


  • public abstract class ReferenceDescriptor
    extends Object
    Abstraction to capture constraints-related stuff about references. Is a consumer of what ConstraintsAspectDescriptor->ConstraintsDescriptor->ReferenceConstraintsDescriptor provides, and is sort of facade for these classes to the rest of MPS. I'm not quite sure it deserves to stay, as we could use descriptors directly, however, descriptors need a change as well, and it might be reasonable to keep both for a while, to facilitate step by step refactoring (first, uses of this class, then new descriptors). API this class provides is of dubious quality (e.g. #getReferencePresentation() with booleans)
    • Constructor Detail

      • ReferenceDescriptor

        public ReferenceDescriptor()
    • Method Detail

      • getReferencePresentation

        @Nullable
        @Deprecated
        public abstract String getReferencePresentation​(SNode targetNode,
                                                        boolean visible,
                                                        boolean smartRef,
                                                        boolean inEditor)
        Deprecated.
        uses only in the editor
        Returns:
        null if there is no presentation for reference
      • getScopeProvider

        @Nullable
        @Deprecated
        public ReferenceScopeProvider getScopeProvider()
        Deprecated.
        this class shall not expose its implementation detail, otherwise there's no point in its presence. refactor the single use and remove this method, it's our internal api. Perhaps, we need a distinct validator object?