public abstract class AbstractCreateConnectionFeature extends AbstractFeature implements ICreateConnectionFeature
Constructor and Description |
---|
AbstractCreateConnectionFeature(IFeatureProvider fp,
java.lang.String name,
java.lang.String description)
Creates a new
AbstractAddShapeFeature . |
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 ICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.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 |
canExecute(IContext context)
Decides if the current feature can execute with the given context.
|
void |
endConnecting()
Will called after a connection creation tool from the palette was
deselected.
Note: In contrast to the standard feature methods like ICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. |
void |
execute(IContext context)
Executes the current feature with the given context.
|
java.lang.String |
getCreateDescription()
Gets the create description.
|
java.lang.String |
getCreateImageId()
Gets the create image id.
|
java.lang.String |
getCreateLargeImageId()
Gets the create large image id.
|
java.lang.String |
getCreateName()
Gets the create name.
|
java.lang.String |
getName()
Gets the name.
|
void |
startConnecting()
Will called after a connection creation tool from the palette was
selected.
Note: In contrast to the standard feature methods like ICreateConnection.canCreate(ICreateConnectionContext) and
ICreateConnection.create(ICreateConnectionContext) this method will not be called
in the scope of an EMF transaction. |
canUndo, getDescription, getFeatureProvider, hasDoneChanges, isAvailable, manageFont, manageFont, setProgressCallback, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canCreate, canStartConnection, create
canUndo, hasDoneChanges, isAvailable
getDescription
getFeatureProvider
public AbstractCreateConnectionFeature(IFeatureProvider fp, java.lang.String name, java.lang.String description)
AbstractAddShapeFeature
.fp
- the fpname
- the namedescription
- the descriptionpublic java.lang.String getCreateDescription()
getCreateDescription
in interface ICreateInfo
public java.lang.String getCreateName()
getCreateName
in interface ICreateInfo
public boolean canExecute(IContext context)
IFeature
canExecute
in interface IFeature
context
- this is the general input for this methodIContext
public void execute(IContext context)
IFeature
public java.lang.String getCreateImageId()
ICreateInfo
getCreateImageId
in interface ICreateInfo
public java.lang.String getCreateLargeImageId()
ICreateInfo
getCreateLargeImageId
in interface ICreateInfo
public java.lang.String getName()
IName
getName
in interface IName
getName
in class AbstractFeature
public void startConnecting()
ICreateConnection
ICreateConnection.canCreate(ICreateConnectionContext)
and
ICreateConnection.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.startConnecting
in interface ICreateConnection
public void endConnecting()
ICreateConnection
ICreateConnection.canCreate(ICreateConnectionContext)
and
ICreateConnection.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.endConnecting
in interface ICreateConnection
public void attachedToSource(ICreateConnectionContext context)
ICreateConnection
ICreateConnection.canCreate(ICreateConnectionContext)
and
ICreateConnection.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.attachedToSource
in interface ICreateConnection
context
- the contextpublic void canceledAttaching(ICreateConnectionContext context)
ICreateConnection
ICreateConnection.canCreate(ICreateConnectionContext)
and
ICreateConnection.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.canceledAttaching
in interface ICreateConnection
context
- the context