|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.graphiti.features.impl.AbstractFeature
org.eclipse.graphiti.ui.features.DefaultDeleteFeature
org.eclipse.graphiti.pattern.DeleteFeatureForPattern
public class DeleteFeatureForPattern
This feature wraps the delete functionality of a pattern for calls of the Graphiti framework. Clients should not need to use this class directly.
Field Summary | |
---|---|
private IFeatureForPattern |
delegate
|
Constructor Summary | |
---|---|
DeleteFeatureForPattern(IFeatureProvider featureProvider,
IPattern pattern)
Creates a new DeleteFeatureForPattern . |
Method Summary | |
---|---|
boolean |
canDelete(IDeleteContext context)
Can delete hook. |
boolean |
canRedo(IContext context)
Decides if the processed feature can be re-done. |
boolean |
canUndo(IContext context)
Decides if the current feature can be undone - this is the undo of the execute operation. |
void |
delete(IDeleteContext context)
Hook to implement the actual delete functionality. |
boolean |
hasDoneChanges()
Is queried by the framework after a feature has been executed to find out if this feature should appear in the undo stack of e.g. |
void |
postDelete(IDeleteContext context)
Post delete hook that can be implemented by users to perform any operations that need to be done after the standard delete functionality ends. |
void |
preDelete(IDeleteContext context)
Pre delete hook that can be implemented by users to perform any operations that need to be done before the standard delete functionality starts. |
void |
redo(IContext context)
This method will be called to actually do the work needed for redo. |
void |
undo(IContext context)
This method will be called to actually do the work needed for undo. |
Methods inherited from class org.eclipse.graphiti.ui.features.DefaultDeleteFeature |
---|
canExecute, deleteBusinessObject, deleteBusinessObjects, execute, getDeleteName, getDescription, getName, getUserDecision, setDoneChanges |
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature |
---|
addGraphicalRepresentation, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDiagram, getDiagramBehavior, getDiagramEditor, getFeatureProvider, getProgressCallback, getUserDecision, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, manageDefaultFont, manageFont, manageFont, setProgressCallback, toString, updatePictogramElement |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.graphiti.features.IFeature |
---|
isAvailable |
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder |
---|
getFeatureProvider |
Field Detail |
---|
private IFeatureForPattern delegate
Constructor Detail |
---|
public DeleteFeatureForPattern(IFeatureProvider featureProvider, IPattern pattern)
DeleteFeatureForPattern
.
featureProvider
- the feature providerpattern
- the patternMethod Detail |
---|
public boolean canDelete(IDeleteContext context)
IDelete
canDelete
in interface IDelete
canDelete
in class DefaultDeleteFeature
context
- the context describing the request
true
, if the feature can perform the delete
operationpublic void preDelete(IDeleteContext context)
IDelete
DefaultDeleteFeature#setDoneChanges(boolean)
in case you modify
any EMF objects to enable that the command stack gets updated.
preDelete
in interface IDelete
preDelete
in class DefaultDeleteFeature
context
- the contextpublic void delete(IDeleteContext context)
IDelete
delete
in interface IDelete
delete
in class DefaultDeleteFeature
context
- the contextpublic void postDelete(IDeleteContext context)
IDelete
postDelete
in interface IDelete
postDelete
in class DefaultDeleteFeature
context
- the contextpublic boolean canUndo(IContext context)
IFeature
canUndo
in interface ICustomUndoableFeature
canUndo
in interface IFeature
canUndo
in class AbstractFeature
context
- this is the general input for this method
IContext
public void undo(IContext context)
ICustomUndoableFeature
undo
in interface ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic boolean canRedo(IContext context)
ICustomUndoableFeature
Note that as soon as any feature reports false
here, also
all consecutive entries in the command stack are no longer reachable for
redo.
canRedo
in interface ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the feature
public void redo(IContext context)
ICustomUndoableFeature
redo
in interface ICustomUndoableFeature
context
- this is the instance of the IContext
object that was
in use when executing the featurepublic boolean hasDoneChanges()
IFeature
AbstractFeature
), but features may decide to override this
behavior. Note that this is a dynamic attribute of the feature that is
queried each time after the feature has been executed.
IMPORTANT NOTE: The implementor of the feature is responsible for
correctly implementing this method! It might lead to inconsistencies in
the command stack if this method returns false
although the
feature did changes.
hasDoneChanges
in interface IFeature
hasDoneChanges
in class DefaultDeleteFeature
true
if the feature should appear in the undo stack,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |