public interface DiagramProvider
A ModelReader
can support diagrams by subclassing this interface. The subclass must be referenced in the metamodels.xml
or connectors.xml
file using the property PROPERTY_DIAGRAM_PROVIDER
.
Please note that many model readers won't be able to support diagrams (XMI reader for example). To support diagrams, a model reader should generally have a live connection with a CASE tool, through COM APIs for example, to be able to dynamically retrieve images.
Clients may implement this interface.
ModelReader
,
ConnectorDescriptor.PROPERTY_DIAGRAM_PROVIDER
Modifier and Type | Method and Description |
---|---|
DiagramImage |
getDiagram(MDWObject object,
DiagramOptions options,
ConnectorContext context)
Get the diagram image for a specific model element.
|
DiagramImage getDiagram(MDWObject object, DiagramOptions options, ConnectorContext context) throws CoreException
Once the returned DiagramImage
is not used anymore, client should invoke DiagramImage.dispose()
.
object
- a model element which is a logical diagram, or which has an attached diagram.options
- some options used to retrieve the diagram image (may be null
).context
- the context used by the ModelReader
to load the model.CoreException
- if no diagram image could be retrieved.