Runtime

org.eclipse.gmf.runtime.emf.type.core.edithelper
Interface IEditHelperAdvice

All Known Implementing Classes:
AbstractEditHelperAdvice, NotationViewDependentsAdvice, RemoveBookmarksAdvice

public interface IEditHelperAdvice

Provides 'before' and 'after' editing behaviour for modifying model elements.

Clients should not implement this interface directly. They should instead subclass AbstractEditHelperAdviceand override the methods for the specific requests that they provide advice for.


Method Summary
 boolean approveRequest(IEditCommandRequest request)
          Approves the edit gesture described in the request.
 void configureRequest(IEditCommandRequest request)
          Configures the request.
 ICommand getAfterEditCommand(IEditCommandRequest request)
          Gets a command to be executed after the base editing behaviour.
 ICommand getBeforeEditCommand(IEditCommandRequest request)
          Gets a command to be executed before the base editing behaviour.
 

Method Detail

getBeforeEditCommand

ICommand getBeforeEditCommand(IEditCommandRequest request)
Gets a command to be executed before the base editing behaviour.

Parameters:
request - the request
Returns:
the 'before' command, or null if I do not provide 'before' behaviour.

getAfterEditCommand

ICommand getAfterEditCommand(IEditCommandRequest request)
Gets a command to be executed after the base editing behaviour.

Parameters:
request - the request
Returns:
the 'after' command, or null if I do not provide 'after' behaviour.

configureRequest

void configureRequest(IEditCommandRequest request)
Configures the request. Advisors may modify the request parameters in this method. This method is consulted before the request is approved by approveRequest(IEditCommandRequest) and before the edit command is constructed.

Parameters:
request - the edit request to be configured.

approveRequest

boolean approveRequest(IEditCommandRequest request)
Approves the edit gesture described in the request. This method will be consulted before the edit command is constructed, but after configureRequest(IEditCommandRequest) has been called on all applicable advice.

Parameters:
request - the edit request
Returns:
true if the edit request is approved, false otherwise. No edit command will be constructed if the request is not approved.

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.