org.eclipse.graphiti.features

## Interface IFeatureProvider

All Superinterfaces:
  IMappingProvider

All Known Implementing Classes:
  AbstractFeatureProvider, ConfigurableFeatureProviderWrapper, DefaultFeatureProvider, DefaultFeatureProviderWithPatterns, DefaultFeatureProviderWrapper

    public interface IFeatureProvider
    extends IMappingProvider

The Interface IFeatureProvider. The set of provided features defines the operations, potentially available in a graphical editor. There has been the idea to restrict available operations through tool behavior providers ( `IToolBehaviorProvider`).

See Also:
  `IFeature`

### Method Summary

All Methods Instance Methods Abstract Methods
`PictogramElement` `addIfPossible(IAddContext context)` Adds the if possible.
`IReason` `canAdd(IAddContext context)` Can add.
`IReason` `canLayout(ILayoutContext context)` Checks if an layout process can be processed.
`IReason` `canUpdate(IUpdateContext context)` Checks if an update process can be processed.
`void` `dispose()` This is called to dispose the object.
`IAddBendpointFeature` `getAddBendpointFeature(IAddBendpointContext context)` Add bendpoint features handle the user's requst to have more connection bendpoints.
`IAddFeature` `getAddFeature(IAddContext context)` Add features create graphical representations of domain model objects.
`ICopyFeature` `getCopyFeature(ICopyContext context)` Copy features fill the clipboard.
`ICreateConnectionFeature[]` `getCreateConnectionFeatures()` Gets the create connection features.
`ICreateFeature[]` `getCreateFeatures()` Provides all create features.
`ICustomFeature[]` `getCustomFeatures(ICustomContext context)` Custom features can do anything.
`IDeleteFeature` `getDeleteFeature(IDeleteContext context)` Delete features remove the grapical representations of domain model objects as well as the domain model objects itself.
`IDiagramTypeProvider` `getDiagramTypeProvider()` Returns the diagram type provider.
`IDirectEditingFeature` `getDirectEditingFeature(IDirectEditingContext context)` Direct editing features handle direct editing functionality (including drop down lists and text completion).
`IDirectEditingInfo` `getDirectEditingInfo()` If a creation feature wants to switch directly into the direct editing mode (after the object creation), it must provide the necessary information via this object.
`IFeature[]` `getDragAndDropFeatures(IPictogramElementContext context)` if the user should be able to create connections directly from a pictogram element without using the connection tool you can provide an array of features.
`ILayoutFeature` `getLayoutFeature(ILayoutContext context)` Layout features do the layouting work (sizes and dimensions) inside (and/or) outside a pictogram element.
`IMoveAnchorFeature` `getMoveAnchorFeature(IMoveAnchorContext context)` Move features respond to user's move requests.
`IMoveBendpointFeature` `getMoveBendpointFeature(IMoveBendpointContext context)` Move features respond to user's move requests.
`IMoveConnectionDecoratorFeature` `getMoveConnectionDecoratorFeature(IMoveConnectionDecoratorContext context)` Move features respond to user's move requests.
`IMoveShapeFeature` `getMoveShapeFeature(IMoveShapeContext context)` Move shape features respond to user's move requests.
`IPasteFeature` `getPasteFeature(IPasteContext context)` Paste features bring clipboard content to the diagram.
`IPrintFeature` `getPrintFeature()` It is planned to use this for printing support.
`IReconnectionFeature` `getReconnectionFeature(IReconnectionContext context)` Reconnection features handle the change of a connection's start or end anchor.
`IRemoveBendpointFeature` `getRemoveBendpointFeature(IRemoveBendpointContext context)` Add bendpoint features handle the user's requst to remove connection bendpoints.
`IRemoveFeature` `getRemoveFeature(IRemoveContext context)` Remove features remove the grapical representations of domain model objects.
`IResizeShapeFeature` `getResizeShapeFeature(IResizeShapeContext context)` Resize shape features respond to user's resize requests.
`ISaveImageFeature` `getSaveImageFeature()` It is planned to use this for save as image support.
`IUpdateFeature` `getUpdateFeature(IUpdateContext context)` Update features do the synchronization work and transport data from domain model to pictograms model elements.
`IReason` `layoutIfPossible(ILayoutContext context)` Process the layout process.
`IReason` `updateIfPossible(IUpdateContext context)` Process the update process.
`IReason` `updateIfPossibleAndNeeded(IUpdateContext context)` Update if possible and needed.
`IReason` `updateNeeded(IUpdateContext context)` Checks if an update process is needed and has be processed.

### Methods inherited from interface org.eclipse.graphiti.features.IMappingProvider

`getAllBusinessObjectsForPictogramElement, getAllPictogramElementsForBusinessObject, getBusinessObjectForPictogramElement, getPictogramElementForBusinessObject, hasPictogramElementForBusinessObject, link, link`

### Method Detail

#### getCreateFeatures

    ICreateFeature[] getCreateFeatures()

Provides all create features. In the graphics framework they will be visualized in an editor as create tools.

Returns:
  all create features
See Also:
  `ICreateFeature`

#### getCreateConnectionFeatures

    ICreateConnectionFeature[] getCreateConnectionFeatures()

Gets the create connection features.

Returns:
  all features to create connections
See Also:
  `ICreateConnectionFeature`

#### getAddFeature

    IAddFeature getAddFeature(IAddContext context)

Add features create graphical representations of domain model objects.

Parameters:
  `context` - the context
Returns:
  add feature according to the given context
See Also:
  `IAddFeature`

#### getDeleteFeature

    IDeleteFeature getDeleteFeature(IDeleteContext context)

Delete features remove the grapical representations of domain model objects as well as the domain model objects itself.

Parameters:
  `context` - the context
Returns:
  delete feature according to the given context
See Also:
  `IDeleteFeature`

#### getCopyFeature

    ICopyFeature getCopyFeature(ICopyContext context)

Copy features fill the clipboard.

Parameters:
  `context` - the context
Returns:
  copy feature according to the given context
See Also:
  `ICopyFeature`

#### getPasteFeature

    IPasteFeature getPasteFeature(IPasteContext context)

Paste features bring clipboard content to the diagram.

Parameters:
  `context` - the context
Returns:
  copy feature according to the given context
See Also:
  `ICopyFeature`

#### getRemoveFeature

    IRemoveFeature getRemoveFeature(IRemoveContext context)

Remove features remove the grapical representations of domain model objects.

Parameters:
  `context` - the context
Returns:
  remove feature according to the given context
See Also:
  `IRemoveFeature`

#### getResizeShapeFeature

    IResizeShapeFeature getResizeShapeFeature(IResizeShapeContext context)

Resize shape features respond to user's resize requests.

Parameters:
  `context` - the context
Returns:
  resize feature according to the given context
See Also:
  `IResizeShapeFeature`

#### getMoveShapeFeature

    IMoveShapeFeature getMoveShapeFeature(IMoveShapeContext context)

Move shape features respond to user's move requests.

Parameters:
  `context` - the context
Returns:
  move feature according to the given context
See Also:
  `IMoveShapeFeature`

#### getMoveConnectionDecoratorFeature

    IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IMoveConnectionDecoratorContext context)

Move features respond to user's move requests.

Parameters:
  `context` - the context
Returns:
  move feature according to the given context
See Also:
  `IMoveConnectionDecoratorFeature`

#### getMoveAnchorFeature

    IMoveAnchorFeature getMoveAnchorFeature(IMoveAnchorContext context)

Move features respond to user's move requests. This one is especially for fix point anchors ( `FixPointAnchor`).

Parameters:
  `context` - the context
Returns:
  move feature according to the given context
See Also:
  `IMoveAnchorFeature`

#### getMoveBendpointFeature

    IMoveBendpointFeature getMoveBendpointFeature(IMoveBendpointContext context)

Move features respond to user's move requests. This one is especially for fix point anchors ( `FixPointAnchor`).

Parameters:
  `context` - the context
Returns:
  move feature according to the given context
See Also:
  `IMoveBendpointFeature`

#### getPrintFeature

    IPrintFeature getPrintFeature()

It is planned to use this for printing support. Not yet supported perfectly. The default implementation in `AbstractFeatureProvider` returns the an instance of `DefaultPrintFeature` which could be overridden to influence the standard behaviour.
Return `null` to disable printing.

Returns:
  The print feature to use or `null` to disable printing.
See Also:
  `IPrintFeature`

#### getSaveImageFeature

    ISaveImageFeature getSaveImageFeature()

It is planned to use this for save as image support. Not yet supported perfectly. The default implementation in `AbstractFeatureProvider` returns the an instance of `DefaultSaveImageFeature` which could be overridden to influence the standard behaviour.
Return `null` to disable save as image.

Returns:
  The save feature to use or `null` to disable save as image.

#### getUpdateFeature

    IUpdateFeature getUpdateFeature(IUpdateContext context)

Update features do the synchronization work and transport data from domain model to pictograms model elements.

Parameters:
  `context` - the context
Returns:
  update feature according to the given context
See Also:
  `IUpdateFeature`

#### getLayoutFeature

    ILayoutFeature getLayoutFeature(ILayoutContext context)

Layout features do the layouting work (sizes and dimensions) inside (and/or) outside a pictogram element.

Parameters:
  `context` - the context
Returns:
  layout feature according to the given context
See Also:
  `ILayoutFeature`

#### getReconnectionFeature

    IReconnectionFeature getReconnectionFeature(IReconnectionContext context)

Reconnection features handle the change of a connection's start or end anchor.

Parameters:
  `context` - the context
Returns:
  reconnection feature according to the given context
See Also:
  `IReconnectionFeature`

#### getCustomFeatures

    ICustomFeature[] getCustomFeatures(ICustomContext context)

Custom features can do anything. Their functionality can not be planned by the graphics framework (team).

Parameters:
  `context` - the context
Returns:
  custom feature according to the given context
See Also:
  `ICustomFeature`

#### getDiagramTypeProvider

    IDiagramTypeProvider getDiagramTypeProvider()

Returns the diagram type provider.

Returns:
  the diagram type provider
See Also:
  `IDiagramTypeProvider`

#### getAddBendpointFeature

    IAddBendpointFeature getAddBendpointFeature(IAddBendpointContext context)

Add bendpoint features handle the user's requst to have more connection bendpoints.

Parameters:
  `context` - the context
Returns:
  add feature according to the given context
See Also:
  `IAddBendpointFeature`, `IAddBendpointContext`

#### getRemoveBendpointFeature

    IRemoveBendpointFeature getRemoveBendpointFeature(IRemoveBendpointContext context)

Add bendpoint features handle the user's requst to remove connection bendpoints.

Parameters:
  `context` - the context
Returns:
  remove feature according to the given context
See Also:
  `IRemoveBendpointFeature`

#### getDirectEditingFeature

    IDirectEditingFeature getDirectEditingFeature(IDirectEditingContext context)

Direct editing features handle direct editing functionality (including drop down lists and text completion).

Parameters:
  `context` - the context
Returns:
  direct editing feature according to the given context
See Also:
  `IDirectEditingFeature`

#### getDirectEditingInfo

    IDirectEditingInfo getDirectEditingInfo()

If a creation feature wants to switch directly into the direct editing mode (after the object creation),
it must provide the necessary information via this object.

Returns:
  `IDirectEditingInfo`

#### getDragAndDropFeatures

    IFeature[] getDragAndDropFeatures(IPictogramElementContext context)

if the user should be able to create connections directly from a pictogram element without using the connection tool you can provide an array of features. By providing one feature this feature will be executed directly on drop. By providing 2 or more features a popup menu will let the user select the feature.

Parameters:
  `context` - - the pictogram element the drag and drop should be initiated on
Returns:
  an array of features or null.

#### addIfPossible

    PictogramElement addIfPossible(IAddContext context)

Adds the if possible.

Parameters:
  `context` - the context
Returns:
  added pictogram elements

#### canAdd

    IReason canAdd(IAddContext context)

Can add.

Parameters:
  `context` - the context
Returns:
  status and reason

#### canLayout

    IReason canLayout(ILayoutContext context)

Checks if an layout process can be processed. Usually implementers have to check the context.

Parameters:
  `context` - the context
Returns:
  status and reason

#### canUpdate

    IReason canUpdate(IUpdateContext context)

Checks if an update process can be processed. Usually implementers have to check the context.

Parameters:
  `context` - the context
Returns:
  status and reason

#### layoutIfPossible

    IReason layoutIfPossible(ILayoutContext context)

Process the layout process.

Parameters:
  `context` - the context
Returns:
  status and reason, simply a `true` `IReason` in case the layout operation was executed, a `false` `IReason` otherwise.

#### updateIfPossible

    IReason updateIfPossible(IUpdateContext context)

Process the update process. Usually reads businees data and modifies pictograms model.

Parameters:
  `context` - the context
Returns:
  status and reason

#### updateIfPossibleAndNeeded

    IReason updateIfPossibleAndNeeded(IUpdateContext context)

Update if possible and needed.

Parameters:
  `context` - the context
Returns:
  status and reason

#### updateNeeded

    IReason updateNeeded(IUpdateContext context)

Checks if an update process is needed and has be processed. Usually implementers have to compare pictograms and business data.

Parameters:
  `context` - the context
Returns:
  status and reason

#### dispose

    void dispose()

This is called to dispose the object.