Class ElementReferencingInTexts
java.lang.Object
com.nomagic.magicdraw.elementreferenceintext.ElementReferencingInTexts
Class responsible for creating rich texts(with references to other elements).
For more information on usage refer to the examples.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
createReferencingText
(BaseElement referencedElement, String text) Creates text referencing an element using default settings(DisplayMode.CUSTOM_TEXT
,UpdateMode.AUTOMATIC_UPDATE
)static String
createReferencingText
(BaseElement referencedElement, String text, DisplayMode displayMode) Creates text referencing an element using provided display mode andUpdateMode.AUTOMATIC_UPDATE
modestatic String
createReferencingText
(BaseElement referencedElement, String text, DisplayMode display, UpdateMode update) Creates text referencing an element using provided display mode and update modestatic Collection<Element>
getReferredElements
(Element referringElement)
-
Constructor Details
-
ElementReferencingInTexts
public ElementReferencingInTexts()
-
-
Method Details
-
createReferencingText
Creates text referencing an element using default settings(DisplayMode.CUSTOM_TEXT
,UpdateMode.AUTOMATIC_UPDATE
)- Parameters:
referencedElement
- element referenced in texttext
- text to display- Returns:
- text that refers provided element
-
createReferencingText
public static String createReferencingText(BaseElement referencedElement, String text, DisplayMode displayMode) Creates text referencing an element using provided display mode andUpdateMode.AUTOMATIC_UPDATE
mode- Parameters:
referencedElement
- element referenced by texttext
- text to display(only affective if display mode isDisplayMode.CUSTOM_TEXT
)displayMode
- the reference display mode. Must not be null.- Returns:
- text referring provided element
-
createReferencingText
public static String createReferencingText(BaseElement referencedElement, String text, DisplayMode display, UpdateMode update) Creates text referencing an element using provided display mode and update mode- Parameters:
referencedElement
- element referenced by texttext
- text to displaydisplay
- the reference display mode. Must not be null.update
- the reference update mode. Must not be null.- Returns:
- text referring provided element
-
getReferredElements
- Parameters:
referringElement
- the element that is referring to other elements- Returns:
- a collection of elements that are referred by provided element
-