|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice
public class AbstractEditHelperAdvice
Abstract superclass for edit helper advice classes that provide 'before' and 'after' advice for modifying model elements.
Subclasses can override the implementation for only the specific methods for
the kinds of requests that they provide advice for. For convenience, these
methods all return null
by default.
Edit helper advice can be registered against one or more element types using
the org.eclipse.gmf.runtime.emf.type.core.elementTypes
extension point.
Constructor Summary | |
---|---|
AbstractEditHelperAdvice()
|
Method Summary | |
---|---|
boolean |
approveRequest(IEditCommandRequest request)
Returns true by default. |
void |
configureRequest(IEditCommandRequest request)
Does nothing by default. |
protected org.eclipse.emf.ecore.EObject |
createType(org.eclipse.emf.ecore.EObject container,
IElementType typeToCreate,
IProgressMonitor progressMonitor)
Convenience method to create a new element of kind container . |
protected org.eclipse.emf.ecore.EObject |
createType(org.eclipse.emf.ecore.EObject container,
IElementType typeToCreate,
java.util.Map requestParameters,
IProgressMonitor progressMonitor)
Convenience method to create a new element of kind container . |
protected ICommand |
getAfterConfigureCommand(ConfigureRequest request)
Gets my 'after' advice for configuring a new element. |
protected ICommand |
getAfterCreateCommand(CreateElementRequest request)
Gets my 'after' advice for creating the new element. |
protected ICommand |
getAfterCreateRelationshipCommand(CreateRelationshipRequest request)
Gets my 'after' advice for creating the new relationship. |
protected ICommand |
getAfterDestroyDependentsCommand(DestroyDependentsRequest request)
Gets my 'after' advice for destroying the dependents of an element that is being destroyed. |
protected ICommand |
getAfterDestroyElementCommand(DestroyElementRequest request)
Gets my 'after' advice for destroying an element. |
protected ICommand |
getAfterDestroyReferenceCommand(DestroyReferenceRequest request)
Gets my 'after' advice for destroying an reference. |
protected ICommand |
getAfterDuplicateCommand(DuplicateElementsRequest request)
Gets my 'after' advice for duplicating an element. |
ICommand |
getAfterEditCommand(IEditCommandRequest request)
Gets a command to be executed after the base editing behaviour. |
protected ICommand |
getAfterEditContextCommand(GetEditContextRequest request)
Gets my 'after' advice for getting the edit context for an edit request. |
protected ICommand |
getAfterMoveCommand(MoveRequest request)
Gets my 'after' advice for moving an element into a new container. |
protected ICommand |
getAfterReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest request)
Gets my 'after' advice for changing the source or target of a reference relationship. |
protected ICommand |
getAfterReorientRelationshipCommand(ReorientRelationshipRequest request)
Gets my 'after' advice for changing the source or target of a relationship. |
protected ICommand |
getAfterSetCommand(SetRequest request)
Gets my 'after' advice for setting the value of a feature in an element. |
protected ICommand |
getBeforeConfigureCommand(ConfigureRequest request)
Gets my 'before' advice for configuring a new element. |
protected ICommand |
getBeforeCreateCommand(CreateElementRequest request)
Gets my 'before' advice for creating the new element. |
protected ICommand |
getBeforeCreateRelationshipCommand(CreateRelationshipRequest request)
Gets my 'before' advice for creating the new relationship. |
protected ICommand |
getBeforeDestroyDependentsCommand(DestroyDependentsRequest request)
Gets my 'before' advice for destroying the dependents of an element that is being destroyed. |
protected ICommand |
getBeforeDestroyElementCommand(DestroyElementRequest request)
Gets my 'before' advice for destroying an element. |
protected ICommand |
getBeforeDestroyReferenceCommand(DestroyReferenceRequest request)
Gets my 'before' advice for destroying a reference. |
protected ICommand |
getBeforeDuplicateCommand(DuplicateElementsRequest request)
Gets my 'before' advice for duplicating an element. |
ICommand |
getBeforeEditCommand(IEditCommandRequest request)
Gets a command to be executed before the base editing behaviour. |
protected ICommand |
getBeforeEditContextCommand(GetEditContextRequest request)
Gets my 'before' advice for getting the edit context for an edit request. |
protected ICommand |
getBeforeMoveCommand(MoveRequest request)
Gets my 'before' advice for moving an element into a new container. |
protected ICommand |
getBeforeReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest request)
Gets my 'before' advice for changing the source or target of a reference relationship. |
protected ICommand |
getBeforeReorientRelationshipCommand(ReorientRelationshipRequest request)
Gets my 'before' advice for changing the source or target of a relationship. |
protected ICommand |
getBeforeSetCommand(SetRequest request)
Gets my 'before' advice for setting the value of a feature in an element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractEditHelperAdvice()
Method Detail |
---|
public ICommand getBeforeEditCommand(IEditCommandRequest request)
IEditHelperAdvice
getBeforeEditCommand
in interface IEditHelperAdvice
request
- the request
null
if I do not provide
'before' behaviour.public ICommand getAfterEditCommand(IEditCommandRequest request)
IEditHelperAdvice
getAfterEditCommand
in interface IEditHelperAdvice
request
- the request
null
if I do not provide
'after' behaviour.protected ICommand getBeforeCreateRelationshipCommand(CreateRelationshipRequest request)
request
- the request
protected ICommand getAfterCreateRelationshipCommand(CreateRelationshipRequest request)
request
- the request
protected ICommand getBeforeCreateCommand(CreateElementRequest request)
request
- the request
protected ICommand getAfterCreateCommand(CreateElementRequest request)
request
- the request
protected ICommand getBeforeConfigureCommand(ConfigureRequest request)
request
- the request
protected ICommand getAfterConfigureCommand(ConfigureRequest request)
request
- the request
protected ICommand getBeforeDestroyElementCommand(DestroyElementRequest request)
request
- the request
protected ICommand getAfterDestroyElementCommand(DestroyElementRequest request)
request
- the request
protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest request)
request
- the request
protected ICommand getAfterDestroyDependentsCommand(DestroyDependentsRequest request)
request
- the request
protected ICommand getBeforeDestroyReferenceCommand(DestroyReferenceRequest request)
request
- the request
protected ICommand getAfterDestroyReferenceCommand(DestroyReferenceRequest request)
request
- the request
protected ICommand getBeforeDuplicateCommand(DuplicateElementsRequest request)
request
- the request
protected ICommand getAfterDuplicateCommand(DuplicateElementsRequest request)
request
- the request
protected ICommand getBeforeEditContextCommand(GetEditContextRequest request)
request
- the request
protected ICommand getAfterEditContextCommand(GetEditContextRequest request)
request
- the request
protected ICommand getBeforeMoveCommand(MoveRequest request)
request
- the request
protected ICommand getAfterMoveCommand(MoveRequest request)
request
- the request
protected ICommand getBeforeReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest request)
request
- the request
protected ICommand getAfterReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest request)
request
- the request
protected ICommand getBeforeReorientRelationshipCommand(ReorientRelationshipRequest request)
request
- the request
protected ICommand getAfterReorientRelationshipCommand(ReorientRelationshipRequest request)
request
- the request
protected ICommand getBeforeSetCommand(SetRequest request)
request
- the request
protected ICommand getAfterSetCommand(SetRequest request)
request
- the request
protected org.eclipse.emf.ecore.EObject createType(org.eclipse.emf.ecore.EObject container, IElementType typeToCreate, IProgressMonitor progressMonitor)
container
.
container
- the container elementtypeToCreate
- the kind of element to create
null
if it wasn't
createdprotected org.eclipse.emf.ecore.EObject createType(org.eclipse.emf.ecore.EObject container, IElementType typeToCreate, java.util.Map requestParameters, IProgressMonitor progressMonitor)
container
.
container
- the container elementtypeToCreate
- the kind of element to createrequestParameters
- parameters to be set in the creation request
null
if it wasn't
createdpublic void configureRequest(IEditCommandRequest request)
configureRequest
in interface IEditHelperAdvice
request
- the edit request to be configured.public boolean approveRequest(IEditCommandRequest request)
true
by default. Subclasses should override if
they want to give a different answer.
approveRequest
in interface IEditHelperAdvice
request
- the edit request
true
if the edit request is approved,
false
otherwise. No edit command will be
constructed if the request is not approved.
|
Runtime | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.