Package org.eclipse.graphiti.pattern
Class ReconnectionFeatureForPattern
java.lang.Object
org.eclipse.graphiti.features.impl.AbstractFeature
org.eclipse.graphiti.pattern.ReconnectionFeatureForPattern
- All Implemented Interfaces:
ICustomAbortableUndoRedoFeature,ICustomUndoRedoFeature,IFeature,IFeatureProviderHolder,IReconnectionFeature,IReconnection,IDescription,IName
public class ReconnectionFeatureForPattern
extends AbstractFeature
implements IReconnectionFeature, ICustomAbortableUndoRedoFeature
This feature wraps the reconnection functionality of a pattern for calls of
the Graphiti framework. Clients should not need to use this class directly.
-
Constructor Summary
ConstructorsConstructorDescriptionReconnectionFeatureForPattern(IFeatureProvider fp, IReconnection pattern) Creates a newReconnectionFeatureForPattern. -
Method Summary
Modifier and TypeMethodDescriptionvoidcanceledReconnect(IReconnectionContext context) Will called if the connection reconnect process was canceled after dragging the start or end of the connection.booleancanExecute(IContext context) Decides if the current feature can execute with the given context.booleancanReconnect(IReconnectionContext context) Can reconnect.booleanDecides if the processed feature can be re-done.booleancanStartReconnect(IReconnectionContext context) Can start reconnect.booleanDecides if the current feature can be undone - this is the undo of the execute operation.voidExecutes the current feature with the given context.getName()Gets the name.booleanisAbort()The Graphiti framework will call this method afterICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext)/ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext)have been called and before the actual undo/redo operation is triggered.voidpostReconnect(IReconnectionContext context) Post reconnnect.voidThis method will be called by the Graphiti framework after the EMF undo has finished.voidThis method will be called by the Graphiti framework after the EMF undo is finished.voidpreReconnect(IReconnectionContext context) Pre reconnnect.voidThis method will be called by the Graphiti framework before the EMF undo has triggered.voidThis method will be called by the Graphiti framework before the EMF undo is triggered.voidreconnect(IReconnectionContext context) Reconnnect.Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature
addGraphicalRepresentation, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramBehavior, getFeatureProvider, getProgressCallback, getUserDecision, hasDoneChanges, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, manageDefaultFont, manageFont, manageFont, setProgressCallback, toString, updatePictogramElementMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.graphiti.IDescription
getDescriptionMethods inherited from interface org.eclipse.graphiti.features.IFeature
hasDoneChanges, isAvailableMethods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder
getFeatureProvider
-
Constructor Details
-
ReconnectionFeatureForPattern
Creates a newReconnectionFeatureForPattern.- Parameters:
fp- the feature providerpattern- the pattern
-
-
Method Details
-
canReconnect
Description copied from interface:IReconnectionCan reconnect.- Specified by:
canReconnectin interfaceIReconnection- Parameters:
context- the context- Returns:
- true, if successful
-
postReconnect
Description copied from interface:IReconnectionPost reconnnect.- Specified by:
postReconnectin interfaceIReconnection- Parameters:
context- the context
-
preReconnect
Description copied from interface:IReconnectionPre reconnnect.- Specified by:
preReconnectin interfaceIReconnection- Parameters:
context- the context
-
reconnect
Description copied from interface:IReconnectionReconnnect.- Specified by:
reconnectin interfaceIReconnection- Parameters:
context- the context
-
canceledReconnect
Description copied from interface:IReconnectionWill called if the connection reconnect process was canceled after dragging the start or end of the connection. E.g. user pressed ESC, user clicked on an invalid target, focus was lost, ...- Specified by:
canceledReconnectin interfaceIReconnection- Parameters:
context- the context- Since:
- 0.9
-
canExecute
Description copied from interface:IFeatureDecides if the current feature can execute with the given context.- Specified by:
canExecutein interfaceIFeature- Parameters:
context- this is the general input for this method- Returns:
- true if the feature can be executed, false if not
- See Also:
-
execute
Description copied from interface:IFeatureExecutes the current feature with the given context. -
getName
Description copied from interface:INameGets the name.- Specified by:
getNamein interfaceIName- Overrides:
getNamein classAbstractFeature- Returns:
- the name
-
isAbort
public boolean isAbort()Description copied from interface:ICustomAbortableUndoRedoFeatureThe Graphiti framework will call this method afterICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext)/ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext)have been called and before the actual undo/redo operation is triggered. In case this method returnstrue, the operation will be cancelled by the Graphiti framework by throwing anOperationCanceledExceptionthat causes am EMF revert of the operation.Implementing classes might e.g. set a flag in
ICustomUndoRedoFeature.preUndo(org.eclipse.graphiti.features.context.IContext)/ICustomUndoRedoFeature.preRedo(org.eclipse.graphiti.features.context.IContext)as cancellation indication and check that that flag here.- Specified by:
isAbortin interfaceICustomAbortableUndoRedoFeature- Returns:
truein case you want to cancel the current operation,falseotherwise.- Since:
- 0.12
-
canUndo
Description copied from interface:IFeatureDecides if the current feature can be undone - this is the undo of the execute operation.- Specified by:
canUndoin interfaceICustomUndoRedoFeature- Specified by:
canUndoin interfaceIFeature- Overrides:
canUndoin classAbstractFeature- Parameters:
context- this is the general input for this method- Returns:
- true if the feature can be undone, false if not
- See Also:
-
preUndo
Description copied from interface:ICustomUndoRedoFeatureThis method will be called by the Graphiti framework before the EMF undo is triggered. Customers may revert their non-EMF changes done by the feature here or inICustomUndoRedoFeature.postUndo(IContext).- Specified by:
preUndoin interfaceICustomUndoRedoFeature- Parameters:
context- this is the instance of theIContextobject that was in use when executing the feature- Since:
- 0.12
-
postUndo
Description copied from interface:ICustomUndoRedoFeatureThis method will be called by the Graphiti framework after the EMF undo is finished. Customers may revert their non-EMF changes done by the feature here or inICustomUndoRedoFeature.preUndo(IContext).- Specified by:
postUndoin interfaceICustomUndoRedoFeature- Parameters:
context- this is the instance of theIContextobject that was in use when executing the feature- Since:
- 0.12
-
canRedo
Description copied from interface:ICustomUndoRedoFeatureDecides if the processed feature can be re-done. This method is called once by the Graphiti framework just before any redo work is started, e.g. beforeICustomUndoRedoFeature.preRedo(IContext).Note that as soon as any feature reports
falsehere, also all consecutive entries in the command stack are no longer reachable for redo.- Specified by:
canRedoin interfaceICustomUndoRedoFeature- Parameters:
context- this is the instance of theIContextobject that was in use when executing the feature- Returns:
- true if the feature can be re-done, false if not
- Since:
- 0.8
-
preRedo
Description copied from interface:ICustomUndoRedoFeatureThis method will be called by the Graphiti framework before the EMF undo has triggered. Customers may re-apply their non-EMF changes done by the feature here or inICustomUndoRedoFeature.postRedo(IContext). (Usually it might be sufficient to delegate to the execution method of the feature.)- Specified by:
preRedoin interfaceICustomUndoRedoFeature- Parameters:
context- this is the instance of theIContextobject that was in use when executing the feature- Since:
- 0.12
-
postRedo
Description copied from interface:ICustomUndoRedoFeatureThis method will be called by the Graphiti framework after the EMF undo has finished. Customers may re-apply their non-EMF changes done by the feature here or inICustomUndoRedoFeature.preRedo(IContext). (Usually it might be sufficient to delegate to the execution method of the feature.)- Specified by:
postRedoin interfaceICustomUndoRedoFeature- Parameters:
context- this is the instance of theIContextobject that was in use when executing the feature- Since:
- 0.12
-
canStartReconnect
Description copied from interface:IReconnectionCan start reconnect.- Specified by:
canStartReconnectin interfaceIReconnection- Parameters:
context- the context- Returns:
- true, if successful
- Since:
- 0.11
-