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, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitcanUndo, hasDoneChanges, isAvailablegetFeatureProviderpublic DefaultRemoveFeature(IFeatureProvider fp)
DefaultRemoveFeature.fp - the feature providerpublic boolean canRemove(IRemoveContext context)
IRemovepublic void remove(IRemoveContext context)
IRemovepublic void preRemove(IRemoveContext context)
IRemovepublic boolean isRemoveAbort()
IRemoveIRemove.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 IRemovetrue in case you want to cancel the current
operation, false otherwise.public void postRemove(IRemoveContext context)
IRemovepostRemove in interface IRemovecontext - the contextpublic boolean canExecute(IContext context)
IFeaturecanExecute in interface IFeaturecontext - this is the general input for this methodIContextpublic void execute(IContext context)
IFeaturepublic java.lang.String getName()
INamegetName in interface INamegetName in class AbstractFeaturepublic java.lang.String getDescription()
IDescriptiongetDescription in interface IDescriptiongetDescription in class AbstractFeature