Class AbstractCreateConnectionFeature
java.lang.Object
org.eclipse.graphiti.features.impl.AbstractFeature
org.eclipse.graphiti.features.impl.AbstractCreateConnectionFeature
- All Implemented Interfaces:
ICreateConnectionFeature,IFeature,IFeatureProviderHolder,ICreateConnection,ICreateInfo,IDescription,IName
- Direct Known Subclasses:
CreateConnectionFeatureForPattern
public abstract class AbstractCreateConnectionFeature
extends AbstractFeature
implements ICreateConnectionFeature
The Class AbstractCreateConnectionFeature.
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractCreateConnectionFeature(IFeatureProvider fp, String name, String description) Creates a newAbstractAddShapeFeature. -
Method Summary
Modifier and TypeMethodDescriptionvoidattachedToSource(ICreateConnectionContext context) Will called after a connection was successfully attached to an anchor of a source object.
Note: In contrast to the standard feature methods likeICreateConnection.canCreate(ICreateConnectionContext)andICreateConnection.create(ICreateConnectionContext)this method will not be called in the scope of an EMF transaction.voidWill called if the connection creation process was canceled after the successful attachment of the connection to an anchor of a source object.booleancanExecute(IContext context) Decides if the current feature can execute with the given context.voidWill called after a connection creation tool from the palette was deselected.
Note: In contrast to the standard feature methods likeICreateConnection.canCreate(ICreateConnectionContext)andICreateConnection.create(ICreateConnectionContext)this method will not be called in the scope of an EMF transaction.voidExecutes the current feature with the given context.Gets the create description.Gets the create image id.Gets the create large image id.Gets the create name.getName()Gets the name.voidWill called after a connection creation tool from the palette was selected.
Note: In contrast to the standard feature methods likeICreateConnection.canCreate(ICreateConnectionContext)andICreateConnection.create(ICreateConnectionContext)this method will not be called in the scope of an EMF transaction.Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature
addGraphicalRepresentation, canUndo, 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.func.ICreateConnection
canCreate, canStartConnection, createMethods inherited from interface org.eclipse.graphiti.IDescription
getDescriptionMethods inherited from interface org.eclipse.graphiti.features.IFeature
canUndo, hasDoneChanges, isAvailableMethods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder
getFeatureProvider
-
Constructor Details
-
AbstractCreateConnectionFeature
Creates a newAbstractAddShapeFeature.- Parameters:
fp- the fpname- the namedescription- the description
-
-
Method Details
-
getCreateDescription
Gets the create description.- Specified by:
getCreateDescriptionin interfaceICreateInfo- Returns:
- Returns the description.
-
getCreateName
Gets the create name.- Specified by:
getCreateNamein interfaceICreateInfo- Returns:
- Returns the name.
-
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. -
getCreateImageId
Description copied from interface:ICreateInfoGets the create image id.- Specified by:
getCreateImageIdin interfaceICreateInfo- Returns:
- image for UI representation
-
getCreateLargeImageId
Description copied from interface:ICreateInfoGets the create large image id.- Specified by:
getCreateLargeImageIdin interfaceICreateInfo- Returns:
- large image for UI representation
-
getName
Description copied from interface:INameGets the name.- Specified by:
getNamein interfaceIName- Overrides:
getNamein classAbstractFeature- Returns:
- the name
-
startConnecting
public void startConnecting()Description copied from interface:ICreateConnectionWill called after a connection creation tool from the palette was selected.
Note: In contrast to the standard feature methods likeICreateConnection.canCreate(ICreateConnectionContext)andICreateConnection.create(ICreateConnectionContext)this method will not be called in the scope of an EMF transaction. In case you want to modify the model (EMF domain objects or Graphiti pictogram objects) you need to do that within a command executed on the editor's command stack to make sure that the modification happens inside an EMF write transaction. Keep in mind that any changes you do within such a command will be create a seperate entry in the undo/redo stack for the editor, which might not be the desired effect.- Specified by:
startConnectingin interfaceICreateConnection- Since:
- 0.9
-
endConnecting
public void endConnecting()Description copied from interface:ICreateConnectionWill called after a connection creation tool from the palette was deselected.
Note: In contrast to the standard feature methods likeICreateConnection.canCreate(ICreateConnectionContext)andICreateConnection.create(ICreateConnectionContext)this method will not be called in the scope of an EMF transaction. In case you want to modify the model (EMF domain objects or Graphiti pictogram objects) you need to do that within a command executed on the editor's command stack to make sure that the modification happens inside an EMF write transaction. Keep in mind that any changes you do within such a command will be create a seperate entry in the undo/redo stack for the editor, which might not be the desired effect.- Specified by:
endConnectingin interfaceICreateConnection- Since:
- 0.9
-
attachedToSource
Description copied from interface:ICreateConnectionWill called after a connection was successfully attached to an anchor of a source object.
Note: In contrast to the standard feature methods likeICreateConnection.canCreate(ICreateConnectionContext)andICreateConnection.create(ICreateConnectionContext)this method will not be called in the scope of an EMF transaction. In case you want to modify the model (EMF domain objects or Graphiti pictogram objects) you need to do that within a command executed on the editor's command stack to make sure that the modification happens inside an EMF write transaction. Keep in mind that any changes you do within such a command will be create a seperate entry in the undo/redo stack for the editor, which might not be the desired effect.- Specified by:
attachedToSourcein interfaceICreateConnection- Parameters:
context- the context- Since:
- 0.9
-
canceledAttaching
Description copied from interface:ICreateConnectionWill called if the connection creation process was canceled after the successful attachment of the connection to an anchor of a source object. E.g. user pressed ESC, user clicked on an invalid target, focus was lost, ...
Note: In contrast to the standard feature methods likeICreateConnection.canCreate(ICreateConnectionContext)andICreateConnection.create(ICreateConnectionContext)this method will not be called in the scope of an EMF transaction. In case you want to modify the model (EMF domain objects or Graphiti pictogram objects) you need to do that within a command executed on the editor's command stack to make sure that the modification happens inside an EMF write transaction. Keep in mind that any changes you do within such a command will be create a seperate entry in the undo/redo stack for the editor, which might not be the desired effect.- Specified by:
canceledAttachingin interfaceICreateConnection- Parameters:
context- the context- Since:
- 0.9
-