Package org.eclipse.graphiti.func
Interface ICreateConnection
- All Superinterfaces:
ICreateInfo
- All Known Subinterfaces:
IConnectionPattern
,ICreateConnectionFeature
- All Known Implementing Classes:
AbstractConnectionPattern
,AbstractCreateConnectionFeature
,CreateConnectionFeatureForPattern
The Interface ICreateConnection.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
attachedToSource
(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 likecanCreate(ICreateConnectionContext)
andcreate(ICreateConnectionContext)
this method will not be called in the scope of an EMF transaction.void
Will called if the connection creation process was canceled after the successful attachment of the connection to an anchor of a source object.boolean
canCreate
(ICreateConnectionContext context) Can create.boolean
Can start connection.create
(ICreateConnectionContext context) Creates the connection.void
Will called after a connection creation tool from the palette was deselected.
Note: In contrast to the standard feature methods likecanCreate(ICreateConnectionContext)
andcreate(ICreateConnectionContext)
this method will not be called in the scope of an EMF transaction.void
Will called after a connection creation tool from the palette was selected.
Note: In contrast to the standard feature methods likecanCreate(ICreateConnectionContext)
andcreate(ICreateConnectionContext)
this method will not be called in the scope of an EMF transaction.Methods inherited from interface org.eclipse.graphiti.func.ICreateInfo
getCreateDescription, getCreateImageId, getCreateLargeImageId, getCreateName
-
Method Details
-
canCreate
Can create.- Parameters:
context
- the context- Returns:
- true, if successful
-
create
Creates the connection.- Parameters:
context
- the context- Returns:
- The connection that has been created or
null
in case no valid connection can be returned. Currently this return value is not evaluated by the Graphiti framework but it might be used in future versions but only for performance optimizations.
-
canStartConnection
Can start connection.- Parameters:
context
- the context- Returns:
- true, if successful
-
startConnecting
void startConnecting()Will called after a connection creation tool from the palette was selected.
Note: In contrast to the standard feature methods likecanCreate(ICreateConnectionContext)
andcreate(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.- Since:
- 0.9
-
endConnecting
void endConnecting()Will called after a connection creation tool from the palette was deselected.
Note: In contrast to the standard feature methods likecanCreate(ICreateConnectionContext)
andcreate(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.- Since:
- 0.9
-
attachedToSource
Will called after a connection was successfully attached to an anchor of a source object.
Note: In contrast to the standard feature methods likecanCreate(ICreateConnectionContext)
andcreate(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.- Parameters:
context
- the context- Since:
- 0.9
-
canceledAttaching
Will 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 likecanCreate(ICreateConnectionContext)
andcreate(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.- Parameters:
context
- the context- Since:
- 0.9
-