# Diagram Type Providers

###### Identifier:

org.eclipse.graphiti.ui.diagramTypeProviders

###### Since:

0.7.0

###### Description:

Customers of Graphiti can use this extension point to register their own diagram type providers.

###### Configuration Markup:

<!ELEMENT extension (diagramTypeProvider*)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED

>

<!ELEMENT diagramTypeProvider (diagramType , imageProvider)*>

<!ATTLIST diagramTypeProvider

id CDATA #REQUIRED

name CDATA #REQUIRED

description CDATA #IMPLIED

class CDATA #REQUIRED

>

- id - a unique name in the Eclipse environment that will be used to identify this diagram type provider
- name - a name that will be used in the editor or viewer UI for this diagram type provider
- description - an optional description that will be used in the editor or viewer UI for this diagram type provider
- class - the name of a class that implements `org.eclipse.graphiti.dt.IDiagramTypeProviderr`.

<!ELEMENT diagramType EMPTY>

<!ATTLIST diagramType

id IDREF #REQUIRED

>

Advertises that the containing diagram type provider understands the given diagram type and is suitable for editing/viewing diagrams of that type.

- id - the diagram type identifier. This is an ID defined by the 'org.eclipse.graphiti.ui.diagramTypes' extension point.

<!ELEMENT imageProvider EMPTY>

<!ATTLIST imageProvider

id IDREF #REQUIRED

>

Advertises that the containing diagram type provider needs the given image provider for rendering purposes.

- id - the image provider identifier. This is an ID defined by the 'org.eclipse.graphiti.ui.imageProviders' extension point.

###### Examples:

       <extension
             point="org.eclipse.graphiti.ui.diagramTypeProviders">
          <diagramTypeProvider
                class="org.eclipse.graphiti.examples.ecore.TestDiagramTypeProvider"
                description="This is a small Ecore test editor for the automated junit tests"
                id="org.eclipse.graphiti.examples.ecore.TestDiagramTypeProvider"
                name="Ecore example editor">
             <diagramType
                   id="org.eclipse.graphiti.examples.ecore.EcoreDiagramType">
             </diagramType>
             <imageProvider
                   id="org.eclipse.graphiti.examples.common.SampleImageProvider">
             </imageProvider>
          </diagramTypeProvider>
       </extension>

###### API Information:

Instead of implementing the interface `"org.eclipse.graphiti.dt.IDiagramTypeProvider` directly, the customer should extend the base class `"org.eclipse.graphiti.dt.AbstractDiagramTypeProvider`.