@OpenApiAll public class RepresentationTextCreator extends DeprecatedRepresentationTextCreator
| Modifier and Type | Class and Description | 
|---|---|
static interface  | 
RepresentationTextCreator.RepresentationTextProvider
Representation text provider extension point. 
 | 
COLOR_POSTFIX, COLOR_PREFIX, EMPTY_NAME_NOTATION, GRAY_COLOR_STRING| Constructor and Description | 
|---|
RepresentationTextCreator()  | 
| Modifier and Type | Method and Description | 
|---|---|
static void | 
addProvider(RepresentationTextCreator.RepresentationTextProvider provider)
Registers a given representation text provider. 
 | 
static java.lang.String | 
createDefaultRepresentationText(BaseElement element,
                               RepresentationTextParams textParams)
Gets default (not extended) representation text. 
 | 
static java.util.Comparator<BaseElement> | 
createRepresentationTextComparator(RepresentationTextParams params)  | 
static java.lang.String | 
getAbsoluteUMLPathToRoot(Element element)
Method returns string representing path from root element to the given element. 
 | 
static java.util.Map<java.lang.Class<? extends Element>,SmartListenerConfig> | 
getAllConfigsFromProviders()  | 
static boolean | 
getFullName(Element element,
           java.lang.StringBuffer path,
           java.lang.String separator,
           boolean checkTopStereotype)
Get Element full name. 
 | 
static boolean | 
getFullName(Element element,
           java.lang.StringBuffer path,
           java.lang.String separator,
           boolean checkTopStereotype,
           boolean checkTopModelElement)
Get NameElement full name. 
 | 
static java.lang.String | 
getFullUMLName(Element element)
Method returns full UML name of element given element 
 | 
static java.lang.String | 
getFullUMLName(Element element,
              boolean doNotAddTopLevels)
Get full UML Name of the given element 
 | 
static RepresentationTextCreator | 
getInstance()  | 
static java.lang.String | 
getModelElementNameWithParentPath(NamedElement element,
                                 boolean addColor)
Get element name with parent path. 
 | 
static java.lang.String | 
getModelElementParentPath(Element element,
                         boolean addBrackets)
Get element name with parent path. 
 | 
static java.lang.String | 
getPathToRoot(Element element)
Get path of the given element to the root of element. 
 | 
static java.lang.String | 
getPathToRoot(Element element,
             boolean checkTop)
Get path of the given element to the root of element. 
 | 
static java.lang.String | 
getPathToRoot(Element element,
             boolean relativeToLibrary,
             boolean compactMode)
Calculates qualified name. 
 | 
static java.lang.String | 
getPathToRoot(Element element,
             boolean relativeToLibrary,
             boolean relativeToModel,
             boolean compactMode)
Calculates qualified name. 
 | 
static java.lang.String | 
getPathToRoot(Element element,
             boolean toModelLibrary,
             boolean toModel,
             java.lang.String separator)
Get path to root. 
 | 
static java.lang.String | 
getPathToRoot(Element element,
             boolean checkTop,
             java.lang.String separator)
Get path to root. 
 | 
static RepresentationTextCreator.RepresentationTextProvider | 
getProviderFor(BaseElement element)
Looks for a provider for a given element. 
 | 
java.lang.String | 
getRelationshipFromToPart(Element relationship,
                         Element clientModelElement,
                         Element supplierModelElement,
                         RepresentationTextParams textParams)  | 
java.lang.String | 
getRelationshipFromToPart(Relationship relationship,
                         RepresentationTextParams textParams)  | 
(package private) java.lang.String | 
getRepresentationText(BaseElement element,
                     RepresentationTextParams textParams,
                     boolean noCache)
Returns representation text for the provided element 
 | 
static java.lang.String | 
getRepresentedText(BaseElement element)
Returns representation text for the provided element 
 | 
static java.lang.String | 
getRepresentedText(BaseElement element,
                  RepresentationTextParams textParams)
Returns representation text for the provided element 
 | 
static java.lang.String | 
getRepresentedText(BaseElement element,
                  RepresentationTextParams textParams,
                  boolean noCache)
Returns representation text for the provided element 
 | 
static void | 
invalidateRepresentationCache(Project project)  | 
boolean | 
isCreateBoundElementName()  | 
static void | 
removeProvider(RepresentationTextCreator.RepresentationTextProvider provider)
Unregisters a given representation text provider. 
 | 
void | 
resetAutoIdRepresentations(Project project)
Clear the text cache for all elements that are part of the given project and have element numbers 
 | 
void | 
resetCache(BaseElement element)
Reset all cached texts about given element 
 | 
void | 
resetCache(java.util.Collection<? extends BaseElement> elements)
Reset all cached texts about given elements 
 | 
void | 
setCreateBoundElementName(boolean createBoundElementName)  | 
appendColor, appendColor, appendGrayColor, appendGrayColor, constructActivityEdgeText, constructCombinedFragmentOperatorText, createActivityParameterNodeText, createAssociationText, createBehaviorText, createBehaviorText, createBehaviorText, createBehaviorText, createClassifierName, createClassifiersRepresentation, createConstraintsText, createConstraintsText, createConstraintsText, createDefaultRepresentationText, createDefaultRepresentationText, createDefaultRepresentationText, createElementNameText, createEnumerationLiteralText, createEnumerationLiteralText, createEnumerationLiteralText, createEnumerationLiteralText, createEventText, createEventText, createGuardText, createId, createInstanceSpecificationText, createInstanceSpecificationText, createInteractionUseText, createInteractionUseText, createMultiplicityRangeText, createMultiplicityText, createMultiplicityText, createMultiplicityText, createMultiplicityText, createNamedElementListText, createOperandGuardText, createOperationText, createOperationText, createOperationText, createOperationText, createParameterDirectionText, createParametersText, createParametersText, createParameterText, createParameterText, createParameterText, createPinText, createPortText, createPortText, createPortText, createPropertyPropertyStringText, createPropertyPropertyStringText, createPropertyText, createPropertyText, createPropertyText, createPropertyText, createPropertyText, createProtocolTransitionText, createProtocolTransitionText, createProtocolTransitionText, createPureSlotsString, createReceptionText, createReceptionText, createReceptionText, createRepresentationTextComparator, createSlotsText, createSlotText, createSlotText, createSlotText, createSlotText, createStateText, createStereotypesText, createStereotypesText, createStereotypesText, createStereotypesText, createStereotypeText, createStereotypeText, createStereotypeText, createTemplateBindingText, createTemplateBindingText, createTemplateParametersText, createTemplateParameterSubstitutionText, createTemplateParameterText, createTransitionText, createTransitionText, createTransitionText, createTriggersText, createTriggersText, createTriggersText, createTriggerText, createTriggerText, createTriggerText, createTypedElementText, createTypeName, createValueSpecificationText, createVisibilityText, endColorHtmlTag, endColorHtmlTag, getLocationInTool, getPureTextFromColoredText, getRelationshipFromToRepresentation, getRepresentedText, getRepresentedText, getRepresentedText, getRepresentedText, getRepresentedText, getSlotTextBuilderFactory, isAddColor, isShowFullType, resetColor, resetColor, setAddColor, setLocationInTool, setShowFullType, startColorHtmlTag, startColorHtmlTagpublic static java.lang.String getRepresentedText(BaseElement element)
element - element which representation text will be created.public static java.lang.String getRepresentedText(BaseElement element, RepresentationTextParams textParams)
element - element which representation text will be created.textParams - parameters describing how to construct the text, what to includepublic static java.lang.String getRepresentedText(BaseElement element, RepresentationTextParams textParams, boolean noCache)
element - element which representation text will be created.textParams - parameters describing how to construct the text, what to includenoCache - if false, cached text value (that was calculated earlier) can be returned
                   if true, cache will not be used and representation text will be constructedjava.lang.String getRepresentationText(BaseElement element, RepresentationTextParams textParams, boolean noCache)
element - element which representation text will be created.textParams - parameters describing how to construct the text, what to includenoCache - if false, cached text value (that was calculated earlier) can be returned
                   if true, cache will not be used and representation text will be constructedpublic static java.lang.String createDefaultRepresentationText(BaseElement element, RepresentationTextParams textParams)
RepresentationTextCreator.RepresentationTextProviderelement - element for which to retrieve representation text.textParams - parameters describing how to construct the text, what to includepublic static RepresentationTextCreator getInstance()
public static java.lang.String getModelElementParentPath(Element element, boolean addBrackets)
element - the given name elementaddBrackets - true for add brackets to the stringpublic static java.lang.String getModelElementNameWithParentPath(NamedElement element, boolean addColor)
element - the given name elementaddColor - add color flagpublic static java.lang.String getFullUMLName(Element element)
element - elementpublic static java.lang.String getFullUMLName(Element element, boolean doNotAddTopLevels)
element - the given elementdoNotAddTopLevels - do not add to top levelpublic static java.lang.String getAbsoluteUMLPathToRoot(Element element)
element - elementpublic static java.lang.String getPathToRoot(Element element)
element - the given elementpublic static java.lang.String getPathToRoot(Element element, boolean checkTop)
element - the given elementcheckTop - true for check the rootpublic static java.lang.String getPathToRoot(Element element, boolean relativeToLibrary, boolean compactMode)
getPathToRoot(Element, boolean, boolean, boolean)element - model element used to calculate qualified namerelativeToLibrary - if true, then qualified name is calculated from "model library" element, otherwise qualified name is calculated from root.compactMode - if true, then old MagicDraw notation is used, otherwise uses standard UML notationpublic static java.lang.String getPathToRoot(Element element, boolean relativeToLibrary, boolean relativeToModel, boolean compactMode)
element - model element used to calculate qualified namerelativeToLibrary - if true, then qualified name is calculated from "model library" element, otherwise qualified name is calculated from root.relativeToModel - if true, then qualified name is calculated from nearest "model" element, otherwise qualified name is calculated from root.compactMode - if true, then old MagicDraw notation is used, otherwise uses standard UML notationpublic static java.lang.String getPathToRoot(Element element, boolean checkTop, java.lang.String separator)
getPathToRoot(Element, boolean, boolean, String)element - the given elementcheckTop - true for check the rootseparator - separator to use to create a pathpublic static java.lang.String getPathToRoot(Element element, boolean toModelLibrary, boolean toModel, java.lang.String separator)
element - the given elementtoModelLibrary - if true, stops at model librarytoModel - if true, stops at mode elementseparator - separator to use to create a pathpublic static boolean getFullName(Element element, java.lang.StringBuffer path, java.lang.String separator, boolean checkTopStereotype)
getFullName(Element, StringBuffer, String, boolean, boolean).element - the given elementpath - Path of elementseparator - the separatorcheckTopStereotype - is check top stereotypepublic static boolean getFullName(Element element, java.lang.StringBuffer path, java.lang.String separator, boolean checkTopStereotype, boolean checkTopModelElement)
element - The NameElement.path - Path of NameElement.separator - The separator.checkTopStereotype - Is check to stereotype?checkTopModelElement - indicates Model model element checkpublic static void addProvider(RepresentationTextCreator.RepresentationTextProvider provider)
provider - providerpublic static void removeProvider(RepresentationTextCreator.RepresentationTextProvider provider)
provider - providerpublic static java.util.Map<java.lang.Class<? extends Element>,SmartListenerConfig> getAllConfigsFromProviders()
@CheckForNull public static RepresentationTextCreator.RepresentationTextProvider getProviderFor(BaseElement element)
element - given elementpublic java.lang.String getRelationshipFromToPart(Relationship relationship, RepresentationTextParams textParams)
public java.lang.String getRelationshipFromToPart(Element relationship, @CheckForNull Element clientModelElement, @CheckForNull Element supplierModelElement, RepresentationTextParams textParams)
public boolean isCreateBoundElementName()
public void setCreateBoundElementName(boolean createBoundElementName)
public void resetAutoIdRepresentations(Project project)
project - projectpublic void resetCache(java.util.Collection<? extends BaseElement> elements)
elements - elementspublic void resetCache(BaseElement element)
element - elementpublic static void invalidateRepresentationCache(Project project)
public static java.util.Comparator<BaseElement> createRepresentationTextComparator(RepresentationTextParams params)