org.eclipse.stp.core.saf.ui.contribution
Interface IEditorHandler


public interface IEditorHandler

Handles requests made to the encompassing editor


Method Summary
 void clearError()
          Instructs the editor to clear any errors it may currently be reporting.
 void execute(org.eclipse.core.commands.operations.IUndoableOperation operation)
          Instructs the editor to run the operation.
 org.eclipse.ui.IWorkbenchPart getWorkbenchPart()
          Returns the Workbench part for the editor
 void reportError(java.lang.String error)
          Instructs the editor to report the error in the normal place that the editor reports errors.
 

Method Detail

execute

public void execute(org.eclipse.core.commands.operations.IUndoableOperation operation)
Instructs the editor to run the operation. The operation is run from the editor's command stack, which supports Undo. Contributions to the property pages should not update the SCA model or any of its extensions directly. Instead, they should wrap the model updates in an operation and call this method to run the operation. Direct updates to the model do not integrate with the editors' undo stack; updates done by an operation do integrate.

Parameters:
operation - - the operation to run.

reportError

public void reportError(java.lang.String error)
Instructs the editor to report the error in the normal place that the editor reports errors. This method can be used to report errors in fields that the user changes as the user types (for example, by a keyListener). Only the last reported error is shown at any point in time.

Parameters:
error - - The error to display. This string must be in the appropriate locale of the user.

clearError

public void clearError()
Instructs the editor to clear any errors it may currently be reporting.


getWorkbenchPart

public org.eclipse.ui.IWorkbenchPart getWorkbenchPart()
Returns the Workbench part for the editor

Returns:
the IWorkbenchPart for the editor