public class DefaultRemoveFeature extends AbstractFeature implements IRemoveFeature
Constructor and Description |
---|
DefaultRemoveFeature(IFeatureProvider fp)
Creates a new
DefaultRemoveFeature . |
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute(IContext context)
Decides if the current feature can execute with the given context.
|
boolean |
canRemove(IRemoveContext context)
Checks if given object could be removed.
|
void |
execute(IContext context)
Executes the current feature with the given context.
|
java.lang.String |
getDescription()
Gets the description.
|
java.lang.String |
getName()
Gets the name.
|
boolean |
isRemoveAbort()
The Graphiti framework will call this method after
IRemove.preRemove(IRemoveContext) has been called and before the actual
remove is done. |
void |
postRemove(IRemoveContext context)
called after remove call.
|
void |
preRemove(IRemoveContext context)
called prior to remove call.
|
void |
remove(IRemoveContext context)
Remove the given object.
|
canUndo, getFeatureProvider, hasDoneChanges, isAvailable, manageFont, manageFont, setProgressCallback, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
canUndo, hasDoneChanges, isAvailable
getFeatureProvider
public DefaultRemoveFeature(IFeatureProvider fp)
DefaultRemoveFeature
.fp
- the feature providerpublic boolean canRemove(IRemoveContext context)
IRemove
public void remove(IRemoveContext context)
IRemove
public void preRemove(IRemoveContext context)
IRemove
public boolean isRemoveAbort()
IRemove
IRemove.preRemove(IRemoveContext)
has been called and before the actual
remove is done. In case this method returns true
, the
operation will be cancelled by the Graphiti framework by throwing an
OperationCanceledException
that causes am EMF revert of the
operation.
Implementing classes might e.g. set a flag in
IRemove.preRemove(IRemoveContext)
as cancellation indication and check
that that flag here.
isRemoveAbort
in interface IRemove
true
in case you want to cancel the current
operation, false
otherwise.public void postRemove(IRemoveContext context)
IRemove
postRemove
in interface IRemove
context
- the contextpublic 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 getName()
IName
getName
in interface IName
getName
in class AbstractFeature
public java.lang.String getDescription()
IDescription
getDescription
in interface IDescription
getDescription
in class AbstractFeature