Package com.nomagic.magicdraw.uml
Interface RepresentationTextCreator.RepresentationTextProvider
- 
- All Superinterfaces:
 PriorityProvider,PriorityProvider
- Enclosing class:
 - RepresentationTextCreator
 
public static interface RepresentationTextCreator.RepresentationTextProvider extends PriorityProvider
Representation text provider extension point.Plugins may register these providers and override default element's representation text displayed in MagicDraw
 
- 
- 
Field Summary
- 
Fields inherited from interface com.nomagic.utils.PriorityProvider
HIGH_PRIORITY, LOW_PRIORITY, MEDIUM_PRIORITY 
 - 
 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanaccept(BaseElement element)Checks if this provider should be used to create a representation text for the given elementdefault java.util.Map<java.lang.Class<? extends Element>,SmartListenerConfig>createAcceptableElementSmartListenerConfig()ReturnedSmartListenerConfigdescribes on what model changes this representation text provider can be started/stopped using as text provider (seeaccept(BaseElement)).java.util.Map<java.lang.Class<? extends Element>,SmartListenerConfig>createSmartListenerConfig()ReturnsSmartListenerConfigfor the provider.default intgetPriority()Returns a priority of text creator.java.lang.StringgetRepresentedText(BaseElement element, RepresentationTextParams textParams)Returns representation text for a given Element.default booleanisHumanTypeUsed()Checks if human type may be used in representation text. 
 - 
 
- 
- 
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()
ReturnsSmartListenerConfigfor 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
 
- 
createAcceptableElementSmartListenerConfig
default java.util.Map<java.lang.Class<? extends Element>,SmartListenerConfig> createAcceptableElementSmartListenerConfig()
ReturnedSmartListenerConfigdescribes on what model changes this representation text provider can be started/stopped using as text provider (seeaccept(BaseElement)). Usually it is simple thanSmartListenerConfigcreated bycreateSmartListenerConfig().- Returns:
 - map of configs or an empty map
 - See Also:
 SmartListenerConfig,accept(BaseElement)
 
- 
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:
 getPriorityin interfacePriorityProvider- Returns:
 - MEDIUM_PRIORITY be default
 - See Also:
 PriorityProvider.MEDIUM_PRIORITY
 
 - 
 
 -