Class AbstractFeatureProvider
java.lang.Object
org.eclipse.graphiti.features.impl.AbstractFeatureProvider
- All Implemented Interfaces:
- IFeatureProvider,- IMappingProvider
- Direct Known Subclasses:
- DefaultFeatureProvider
The Class AbstractFeatureProvider.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final PictogramElement[]The Constant EMPTY_PICTOGRAM_ELEMENTS.protected static final org.eclipse.emf.ecore.EObject[]The Constant EMPTY_REF_OBJECTS.
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractFeatureProvider(IDiagramTypeProvider diagramTypeProvider) Creates a newAbstractFeatureProvider.
- 
Method SummaryModifier and TypeMethodDescriptionaddIfPossible(IAddContext context) Adds the if possible.canAdd(IAddContext context) Can add.canLayout(ILayoutContext context) Checks if an layout process can be processed.canUpdate(IUpdateContext context) Checks if an update process can be processed.voiddispose()This is called to dispose the object.Add bendpoint features handle the user's requst to have more connection bendpoints.getAddFeature(IAddContext context) Add features create graphical representations of domain model objects.Object[]getAllBusinessObjectsForPictogramElement(PictogramElement pictogramElement) Returns all business objects which are linked to the given pictogram element.getAllPictogramElementsForBusinessObject(Object businessObject) Provides the pictogram elements which represents the given business object.getBusinessObjectForPictogramElement(PictogramElement pictogramElement) Returns the first of possibly several business objects which are linked to the given pictogram element.Gets the create connection features.Provides all create features.getCustomFeatures(ICustomContext context) Custom features can do anything.getDeleteFeature(IDeleteContext context) Delete features remove the grapical representations of domain model objects as well as the domain model objects itself.Returns the diagram type provider.Direct editing features handle direct editing functionality (including drop down lists and text completion).final IDirectEditingInfoIf 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[]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.protected final IIndependenceSolverGets the independence solver.getLayoutFeature(ILayoutContext context) Layout features do the layouting work (sizes and dimensions) inside (and/or) outside a pictogram element.protected ILinkServicegetMoveAnchorFeature(IMoveAnchorContext context) Move features respond to user's move requests.Move features respond to user's move requests.Move features respond to user's move requests.getMoveShapeFeature(IMoveShapeContext context) Move shape features respond to user's move requests.getPictogramElementForBusinessObject(Object businessObject) Provides the first pictogram element which represents the given business object.abstract IPrintFeatureIt is planned to use this for printing support.Reconnection features handle the change of a connection's start or end anchor.Add bendpoint features handle the user's requst to remove connection bendpoints.getRemoveFeature(IRemoveContext context) Remove features remove the grapical representations of domain model objects.getResizeShapeFeature(IResizeShapeContext context) Resize shape features respond to user's resize requests.abstract ISaveImageFeatureIt is planned to use this for save as image support.getUpdateFeature(IUpdateContext context) Update features do the synchronization work and transport data from domain model to pictograms model elements.booleanhasPictogramElementForBusinessObject(Object businessObject) Check does there have pictogram element linked to this business object.layoutIfPossible(ILayoutContext context) Process the layout process.voidlink(PictogramElement pictogramElement, Object businessObject) Links the pictogram element with a business object.voidlink(PictogramElement pictogramElement, Object[] businessObjects) Links the pictogram element with several business objects.protected final voidsetIndependenceSolver(IIndependenceSolver independenceSolver) Sets the independence solver.updateIfPossible(IUpdateContext context) Process the update process.updateIfPossibleAndNeeded(IUpdateContext context) Update if possible and needed.updateNeeded(IUpdateContext context) Checks if an update process is needed and has be processed.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.graphiti.features.IFeatureProvidergetCopyFeature, getPasteFeature
- 
Field Details- 
NO_OBJECTSprotected static final org.eclipse.emf.ecore.EObject[] NO_OBJECTSThe Constant EMPTY_REF_OBJECTS.
- 
EMPTY_PICTOGRAM_ELEMENTSThe Constant EMPTY_PICTOGRAM_ELEMENTS.
 
- 
- 
Constructor Details- 
AbstractFeatureProviderCreates a newAbstractFeatureProvider.- Parameters:
- diagramTypeProvider- the diagram type provider
 
 
- 
- 
Method Details- 
getAddFeatureDescription copied from interface:IFeatureProviderAdd features create graphical representations of domain model objects.- Specified by:
- getAddFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- add feature according to the given context
- See Also:
 
- 
getCreateConnectionFeaturesDescription copied from interface:IFeatureProviderGets the create connection features.- Specified by:
- getCreateConnectionFeaturesin interface- IFeatureProvider
- Returns:
- all features to create connections
- See Also:
 
- 
getCreateFeaturesDescription copied from interface:IFeatureProviderProvides all create features. In the graphics framework they will be visualized in an editor as create tools.- Specified by:
- getCreateFeaturesin interface- IFeatureProvider
- Returns:
- all create features
- See Also:
 
- 
getCustomFeaturesDescription copied from interface:IFeatureProviderCustom features can do anything. Their functionality can not be planned by the graphics framework (team).- Specified by:
- getCustomFeaturesin interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- custom feature according to the given context
- See Also:
 
- 
getDeleteFeatureDescription copied from interface:IFeatureProviderDelete features remove the grapical representations of domain model objects as well as the domain model objects itself.- Specified by:
- getDeleteFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- delete feature according to the given context
- See Also:
 
- 
getDiagramTypeProviderDescription copied from interface:IFeatureProviderReturns the diagram type provider.- Specified by:
- getDiagramTypeProviderin interface- IFeatureProvider
- Returns:
- the diagram type provider
- See Also:
 
- 
getMoveAnchorFeatureDescription copied from interface:IFeatureProviderMove features respond to user's move requests. This one is especially for fix point anchors (FixPointAnchor).- Specified by:
- getMoveAnchorFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- move feature according to the given context
- See Also:
 
- 
getRemoveFeatureDescription copied from interface:IFeatureProviderRemove features remove the grapical representations of domain model objects.- Specified by:
- getRemoveFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- remove feature according to the given context
- See Also:
 
- 
getUpdateFeatureDescription copied from interface:IFeatureProviderUpdate features do the synchronization work and transport data from domain model to pictograms model elements.- Specified by:
- getUpdateFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- update feature according to the given context
- See Also:
 
- 
getLayoutFeatureDescription copied from interface:IFeatureProviderLayout features do the layouting work (sizes and dimensions) inside (and/or) outside a pictogram element.- Specified by:
- getLayoutFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- layout feature according to the given context
- See Also:
 
- 
getMoveShapeFeatureDescription copied from interface:IFeatureProviderMove shape features respond to user's move requests.- Specified by:
- getMoveShapeFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- move feature according to the given context
- See Also:
 
- 
getMoveConnectionDecoratorFeaturepublic IMoveConnectionDecoratorFeature getMoveConnectionDecoratorFeature(IMoveConnectionDecoratorContext context) Description copied from interface:IFeatureProviderMove features respond to user's move requests.- Specified by:
- getMoveConnectionDecoratorFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- move feature according to the given context
- See Also:
 
- 
getMoveBendpointFeatureDescription copied from interface:IFeatureProviderMove features respond to user's move requests. This one is especially for fix point anchors (FixPointAnchor).- Specified by:
- getMoveBendpointFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- move feature according to the given context
- See Also:
 
- 
getResizeShapeFeatureDescription copied from interface:IFeatureProviderResize shape features respond to user's resize requests.- Specified by:
- getResizeShapeFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- resize feature according to the given context
- See Also:
 
- 
getAddBendpointFeatureDescription copied from interface:IFeatureProviderAdd bendpoint features handle the user's requst to have more connection bendpoints.- Specified by:
- getAddBendpointFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- add feature according to the given context
- See Also:
 
- 
getRemoveBendpointFeatureDescription copied from interface:IFeatureProviderAdd bendpoint features handle the user's requst to remove connection bendpoints.- Specified by:
- getRemoveBendpointFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- remove feature according to the given context
- See Also:
 
- 
getDirectEditingFeatureDescription copied from interface:IFeatureProviderDirect editing features handle direct editing functionality (including drop down lists and text completion).- Specified by:
- getDirectEditingFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- direct editing feature according to the given context
- See Also:
 
- 
canUpdateDescription copied from interface:IFeatureProviderChecks if an update process can be processed. Usually implementers have to check the context.- Specified by:
- canUpdatein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- status and reason
 
- 
canLayoutDescription copied from interface:IFeatureProviderChecks if an layout process can be processed. Usually implementers have to check the context.- Specified by:
- canLayoutin interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- status and reason
 
- 
updateIfPossibleDescription copied from interface:IFeatureProviderProcess the update process. Usually reads businees data and modifies pictograms model.- Specified by:
- updateIfPossiblein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- status and reason
 
- 
layoutIfPossibleDescription copied from interface:IFeatureProviderProcess the layout process.- Specified by:
- layoutIfPossiblein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- status and reason, simply a trueIReasonin case the layout operation was executed, afalseIReasonotherwise.
 
- 
updateNeededDescription copied from interface:IFeatureProviderChecks if an update process is needed and has be processed. Usually implementers have to compare pictograms and business data.- Specified by:
- updateNeededin interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- status and reason
 
- 
updateIfPossibleAndNeededDescription copied from interface:IFeatureProviderUpdate if possible and needed.- Specified by:
- updateIfPossibleAndNeededin interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- status and reason
 
- 
addIfPossibleDescription copied from interface:IFeatureProviderAdds the if possible.- Specified by:
- addIfPossiblein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- added pictogram elements
 
- 
canAddDescription copied from interface:IFeatureProviderCan add.- Specified by:
- canAddin interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- status and reason
 
- 
getDirectEditingInfoDescription copied from interface:IFeatureProviderIf 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.- Specified by:
- getDirectEditingInfoin interface- IFeatureProvider
- Returns:
- IDirectEditingInfo
 
- 
getReconnectionFeatureDescription copied from interface:IFeatureProviderReconnection features handle the change of a connection's start or end anchor.- Specified by:
- getReconnectionFeaturein interface- IFeatureProvider
- Parameters:
- context- the context
- Returns:
- reconnection feature according to the given context
- See Also:
 
- 
getPrintFeatureDescription copied from interface:IFeatureProviderIt is planned to use this for printing support. Not yet supported perfectly. The default implementation inAbstractFeatureProviderreturns the an instance ofDefaultPrintFeaturewhich could be overridden to influence the standard behaviour.
 Returnnullto disable printing.- Specified by:
- getPrintFeaturein interface- IFeatureProvider
- Returns:
- The print feature to use or nullto disable printing.
- See Also:
 
- 
getSaveImageFeatureDescription copied from interface:IFeatureProviderIt is planned to use this for save as image support. Not yet supported perfectly. The default implementation inAbstractFeatureProviderreturns the an instance ofDefaultSaveImageFeaturewhich could be overridden to influence the standard behaviour.
 Returnnullto disable save as image.- Specified by:
- getSaveImageFeaturein interface- IFeatureProvider
- Returns:
- The save feature to use or nullto disable save as image.
 
- 
getDragAndDropFeaturesDescription copied from interface:IFeatureProviderif 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.- Specified by:
- getDragAndDropFeaturesin interface- IFeatureProvider
- Parameters:
- context- - the pictogram element the drag and drop should be initiated on
- Returns:
- an array of features or null.
 
- 
getAllBusinessObjectsForPictogramElementDescription copied from interface:IMappingProviderReturns all business objects which are linked to the given pictogram element. Equality is determined by calling theEcoreUtil.equals(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)method, but this might be changed by clients by overridingIToolBehaviorProvider.equalsBusinessObjects(Object, Object).- Specified by:
- getAllBusinessObjectsForPictogramElementin interface- IMappingProvider
- Parameters:
- pictogramElement- The pictogram element for which to return the business objects.
- Returns:
- The business objects which are linked to the given pictogram element. Can be empty but not null.
- See Also:
 
- 
getBusinessObjectForPictogramElementDescription copied from interface:IMappingProviderReturns the first of possibly several business objects which are linked to the given pictogram element. Equality is determined by calling theEcoreUtil.equals(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EObject)method, but this might be changed by clients by overridingIToolBehaviorProvider.equalsBusinessObjects(Object, Object). This is a convenience method forIMappingProvider.getAllBusinessObjectsForPictogramElement(PictogramElement), because in many usecases only a single business object is linked.- Specified by:
- getBusinessObjectForPictogramElementin interface- IMappingProvider
- Parameters:
- pictogramElement- The pictogram element for which to return the business object.
- Returns:
- The first of possibly several business objects which are linked to the given pictogram element. Can be null.
- See Also:
 
- 
getAllPictogramElementsForBusinessObjectDescription copied from interface:IMappingProviderProvides the pictogram elements which represents the given business object.- Specified by:
- getAllPictogramElementsForBusinessObjectin interface- IMappingProvider
- Parameters:
- businessObject- the given business object
- Returns:
- the pictogram elements
 
- 
getPictogramElementForBusinessObjectProvides the first pictogram element which represents the given business object.- Specified by:
- getPictogramElementForBusinessObjectin interface- IMappingProvider
- Parameters:
- businessObject- the business object
- Returns:
- the pictogram element for business object
- See Also:
 
- 
hasPictogramElementForBusinessObjectCheck does there have pictogram element linked to this business object.- Specified by:
- hasPictogramElementForBusinessObjectin interface- IMappingProvider
- Parameters:
- businessObject- the business object
- Returns:
- true when at least one pictogram element is linked, otherwise return false.
 
- 
linkDescription copied from interface:IMappingProviderLinks the pictogram element with a business object. This deletes all previous links of this pictogram element.- Specified by:
- linkin interface- IMappingProvider
- Parameters:
- pictogramElement- The pictogram element which to link to a new business object.
- businessObject- The business object to link. Can be null to just delete previous links.
 
- 
linkDescription copied from interface:IMappingProviderLinks the pictogram element with several business objects. This deletes all previous links of this pictogram element.- Specified by:
- linkin interface- IMappingProvider
- Parameters:
- pictogramElement- The pictogram element which to link to new business objects.
- businessObjects- The business objects to link. Can be null or empty to just delete previous links.
 
- 
getIndependenceSolverGets the independence solver.- Returns:
- the independence solver
 
- 
setIndependenceSolverSets the independence solver.- Parameters:
- independenceSolver- the new independence solver
 
- 
disposepublic void dispose()Description copied from interface:IFeatureProviderThis is called to dispose the object.- Specified by:
- disposein interface- IFeatureProvider
 
- 
getLinkService
 
-