public interface ICreateConnection extends ICreateInfo
Modifier and Type | Method and Description |
---|---|
void |
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 like canCreate(ICreateConnectionContext) and
create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. |
void |
canceledAttaching(ICreateConnectionContext context)
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 |
canStartConnection(ICreateConnectionContext context)
Can start connection.
|
Connection |
create(ICreateConnectionContext context)
Creates the connection.
|
void |
endConnecting()
Will called after a connection creation tool from the palette was
deselected.
Note: In contrast to the standard feature methods like canCreate(ICreateConnectionContext) and
create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. |
void |
startConnecting()
Will called after a connection creation tool from the palette was
selected.
Note: In contrast to the standard feature methods like canCreate(ICreateConnectionContext) and
create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. |
getCreateDescription, getCreateImageId, getCreateLargeImageId, getCreateName
boolean canCreate(ICreateConnectionContext context)
context
- the contextConnection create(ICreateConnectionContext context)
context
- the contextnull
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.boolean canStartConnection(ICreateConnectionContext context)
context
- the contextvoid startConnecting()
canCreate(ICreateConnectionContext)
and
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.void endConnecting()
canCreate(ICreateConnectionContext)
and
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.void attachedToSource(ICreateConnectionContext context)
canCreate(ICreateConnectionContext)
and
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.context
- the contextvoid canceledAttaching(ICreateConnectionContext context)
canCreate(ICreateConnectionContext)
and
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.context
- the context