@OpenApiAll
public static class Refactoring.Converting
extends java.lang.Object
| Constructor and Description |
|---|
Converting() |
| Modifier and Type | Method and Description |
|---|---|
static Element |
convert(Element source,
ConvertElementInfo info)
Converts given element according given conversion info.
|
static Element |
convert(Element source,
Element target,
ConvertElementInfo info)
Converts element with another element according given conversion info.
|
static ShapeElement |
convertCommentToNote(ShapeElement comment)
Converts Comment into Note.
|
static ShapeElement |
convertNoteToComment(ShapeElement note,
Stereotype commentStereotype)
Converts Note into Comment.
|
static PartView |
convertPortToPart(PortView portView)
Converts Port symbol to Part symbol
|
static PartView |
convertPortToPartAndRemovePortSymbol(PortView portView)
Convert port symbol to part symbol by creating new part symbol for port element
After that remove unused port symbol
|
public static Element convert(Element source, ConvertElementInfo info) throws ReadOnlyElementException
source - element to convert.info - conversion rules.ReadOnlyElementException - if given element is not editable (read-only).public static Element convert(Element source, @CheckForNull Element target, ConvertElementInfo info) throws ReadOnlyElementException
source - element to convert.target - element with which to convert, can be null, in this case a new element will be created.info - conversion rules.ReadOnlyElementException - if given element is not editable (read-only).public static ShapeElement convertNoteToComment(ShapeElement note, @CheckForNull Stereotype commentStereotype) throws ReadOnlyElementException
note - note shapecommentStereotype - apply given stereotypes to created CommentReadOnlyElementException - if given Note symbol is not editable (read-only) or diagram owner is not editablejava.lang.IllegalArgumentException - if given symbol is not a Note symbolpublic static ShapeElement convertCommentToNote(ShapeElement comment) throws ReadOnlyElementException
comment - comment shapeReadOnlyElementException - if given Comment symbol is not editable (read-only) or Comment is not editablejava.lang.IllegalArgumentException - if given symbol is not a Comment symbolpublic static PartView convertPortToPartAndRemovePortSymbol(PortView portView) throws ReadOnlyElementException
ReadOnlyElementExceptionpublic static PartView convertPortToPart(PortView portView) throws ReadOnlyElementException
portView - port symbolReadOnlyElementException - if given port symbol is not editable (read-only)