Implementing a diagram provider

To define the diagram provider implementation:

  1. Click File > New > Class
  2. Type a package name (e.g. com.sodius.mdw.metamodel.library) in the Package name field.
  3. Type a class name (e.g. LibraryDiagramProvider) in the Name field. This is the name of the Java class that will define the implementation of the diagram provider.

  4. Click Add..., on the right of the Interfaces list.
  5. Type DiagramProvider and click OK.

  6. Back in the Java class wizard, click Finish.
  7. Change the body of the created Java class and click File > Save.
    package com.sodius.mdw.metamodel.library;
    
    import com.sodius.mdw.core.CoreException;
    import com.sodius.mdw.core.model.MDWObject;
    import com.sodius.mdw.corext.model.diagram.DiagramImage;
    import com.sodius.mdw.corext.model.diagram.DiagramOptions;
    import com.sodius.mdw.corext.model.diagram.DiagramProvider;
    import com.sodius.mdw.corext.model.io.ConnectorContext;
    
    public class LibraryDiagramProvider implements DiagramProvider {
    
        public DiagramImage getDiagram(MDWObject object, DiagramOptions options, ConnectorContext context) throws CoreException;
            ...
        }
    }

Refer to the Javadoc of DiagramProvider for details on the contents of a diagram provider.

Related reference
DiagramProvider API