Runtime

## org.eclipse.gmf.runtime.diagram.ui.services.editpart
Class AbstractEditPartProvider

    java.lang.Object
      org.eclipse.gmf.runtime.common.core.service.AbstractProvider
          org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider

All Implemented Interfaces:
  org.eclipse.gmf.runtime.diagram.ui.internal.services.editpart.IEditPartProvider, IProvider, org.eclipse.gmf.runtime.diagram.ui.internal.properties.Properties

public abstract class AbstractEditPartProvider
extends AbstractProvider
implements org.eclipse.gmf.runtime.diagram.ui.internal.services.editpart.IEditPartProvider, org.eclipse.gmf.runtime.diagram.ui.internal.properties.Properties

An AbstractFactory implementation of the `IEditPartProvider` interface. This implementations invokes the approrpiate factory method by inspecting the supplied operation and provides the actual editpart creation functionality.

See Also:
  `AbstractEditPartProvider.provides(IOperation)`

Field Summary

Fields inherited from interface org.eclipse.gmf.runtime.diagram.ui.internal.properties.Properties

`DIAGRAMLINK_ANNOTATION, ID_AVOIDOBSTRUCTIONS, ID_BENDPOINT, ID_CLOSESTDISTANCE, ID_COLLAPSED, ID_DESCRIPTION, ID_EXTENTX, ID_EXTENTY, ID_FILLCOLOR, ID_FILTERED_OBJECTS, ID_FILTERING, ID_FILTERING_KEYS, ID_FONTBOLD, ID_FONTCOLOR, ID_FONTITALIC, ID_FONTNAME, ID_FONTSIZE, ID_FONTSTRIKETHROUGH, ID_FONTUNDERLINE, ID_ISCANONICAL, ID_ISVISIBLE, ID_JUMPLINKS_REVERSE, ID_JUMPLINKS_STATUS, ID_JUMPLINKS_TYPE, ID_LINECOLOR, ID_PAGE_HEIGHT, ID_PAGE_WIDTH, ID_PAGEX, ID_PAGEY, ID_PERSISTED_CHILDREN, ID_PERSISTED_EDGES, ID_POSITIONX, ID_POSITIONY, ID_RATIO, ID_ROUTING, ID_SEMANTICREF, ID_SHOWCOMPARTMENTTITLE, ID_SMOOTHNESS, ID_SORTED_OBJECTS, ID_SORTING, ID_SORTING_KEYS, ID_SOURCECONNECTIONS, ID_TARGETCONNECTIONS, ID_TRANSIENT_CHILDREN, ID_TRANSIENT_EDGES`

Constructor Summary
`AbstractEditPartProvider()`

Method Summary
`IGraphicalEditPart` `createGraphicEditPart(View view)` create an instance of `GraphicEditPaty`.
`RootEditPart` `createRootEditPart(Diagram diagram)` Creates a `RootEditPart`.
`protected java.lang.Class` `getDiagramEditPartClass(View view)` Gets a diagram's editpart class.
`protected java.lang.Class` `getEdgeEditPartClass(View view)` Gets a connection's editpart class.
`protected java.lang.Class` `getNodeEditPartClass(View view)` Gets a Node's editpart class.
`protected static EClass` `getReferencedElementEClass(View view)` gets the supplied view's underlying notation element's eClass
`boolean` `provides(IOperation operation)` Cycles through the various operations supported by this provider and invokes the appropriate `setXXXEditPartClass` method.

Methods inherited from class org.eclipse.gmf.runtime.common.core.service.AbstractProvider
`addProviderChangeListener, fireProviderChange, removeProviderChangeListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.gmf.runtime.common.core.service.IProvider
`addProviderChangeListener, removeProviderChangeListener`

Constructor Detail

### AbstractEditPartProvider

    public AbstractEditPartProvider()

Method Detail

### createGraphicEditPart

    public IGraphicalEditPart createGraphicEditPart(View view)

  create an instance of `GraphicEditPaty`. The instance is created via reflection and the supplied paramter is the editpart's constructor paramter.

  Specified by:
    `createGraphicEditPart` in interface `org.eclipse.gmf.runtime.diagram.ui.internal.services.editpart.IEditPartProvider`
  Parameters:
    `view` - the view to be controlled by the created editpart.

### provides

    public boolean provides(IOperation operation)

  Cycles through the various operations supported by this provider and invokes the appropriate `setXXXEditPartClass` method.

  Specified by:
    `provides` in interface `IProvider`
  Parameters:
    `operation` - an instance of a `CreateGraphicEditPartOperation`
  Returns:
    `true` if an editpart class was set, otherwise `false`. (i.e.,

        return getEditPartClass() != null;

  See Also:
    `IProvider.provides(IOperation)`, `EditPartOperation.getView()`

### getEdgeEditPartClass

    protected java.lang.Class getEdgeEditPartClass(View view)

  Gets a connection's editpart class. This method should be overridden by a provider if it wants to provide this service.

  Parameters:
    `view` - the view to be controlled by the created editpart
  Returns:
    `Class`

### getDiagramEditPartClass

    protected java.lang.Class getDiagramEditPartClass(View view)

  Gets a diagram's editpart class. This method should be overridden by a provider if it wants to provide this service.

  Parameters:
    `view` - the view to be controlled by the created editpart
  Returns:
    `Class`

### getNodeEditPartClass

    protected java.lang.Class getNodeEditPartClass(View view)

  Gets a Node's editpart class. This method should be overridden by a provider if it wants to provide this service.

  Parameters:
    `view` - the view to be controlled by the created editpart
  Returns:
    `Class`

### getReferencedElementEClass

    protected static EClass getReferencedElementEClass(View view)

  gets the supplied view's underlying notation element's eClass

  Parameters:
    `view` -
  Returns:
    the view's `EClass`

### createRootEditPart

    public RootEditPart createRootEditPart(Diagram diagram)

  Description copied from interface: `org.eclipse.gmf.runtime.diagram.ui.internal.services.editpart.IEditPartProvider`
  Creates a `RootEditPart`.

  Specified by:
    `createRootEditPart` in interface `org.eclipse.gmf.runtime.diagram.ui.internal.services.editpart.IEditPartProvider`
  Parameters:
    `diagram` - `Diagram` notation object that is the context for the operation.
  Returns:
    the `RootEditPart`

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.