Interface RepresentationTextCreator.RepresentationTextProvider

    • Method Detail

      • accept

        boolean accept​(BaseElement element)
        Checks if this provider should be used to create a representation text for the given element
        Parameters:
        element - given element
        Returns:
        true if this provider should be used to create representation text for the given element
      • getRepresentedText

        java.lang.String getRepresentedText​(BaseElement element,
                                            RepresentationTextParams textParams)
        Returns representation text for a given Element.
        Parameters:
        element - element for which representation text has to be created.
        textParams - parameters describing how to construct the text, what to include
        Returns:
        representation text for the given element.
      • createSmartListenerConfig

        java.util.Map<java.lang.Class<? extends Element>,​SmartListenerConfig> createSmartListenerConfig()
        Returns SmartListenerConfig for the provider. It describes on what model changes the representation texts should be recalculated by explicitly calling RepresentationTextProvider#getRepresentedText(BaseElement, RepresentationTextParams) instead of returning a cached value that was calculated earlier.
        Returns:
        map of configs for this provider or an empty map
        See Also:
        SmartListenerConfig
      • isHumanTypeUsed

        default boolean isHumanTypeUsed()
        Checks if human type may be used in representation text.
        Returns:
        true human type is used in representation text, otherwise - false
      • getPriority

        default int getPriority()
        Returns a priority of text creator. The creator with bigger priority will be chosen for representation text creation if several creators accept the same Element.
        Specified by:
        getPriority in interface PriorityProvider
        Returns:
        MEDIUM_PRIORITY be default
        See Also:
        PriorityProvider.MEDIUM_PRIORITY