net.refractions.udig.tools.edit
Interface Activator

All Known Implementing Classes:
AdvancedBehaviourCommandHandlerActivator, DeleteGlobalActionSetterActivator, DrawCurrentGeomVerticesActivator, DrawEndPointsActivator, DrawGeomsActivator, EditManagerListenerActivator, EditStateListenerActivator, EnableAcceptEditCommandHandlerActivator, GridActivator, ResetAllStateActivator, ResetHandlerActivator, SetRenderingFilter, SetSnapBehaviourCommandHandlerActivator

public interface Activator

A safe runnable.

Since:
1.1.0
Author:
jones

Method Summary
 void activate(EditToolHandler handler)
          The action to be performed by this activator when activating.
 void deactivate(EditToolHandler handler)
          The action to be performed by this activator when deactivating.
 void handleActivateError(EditToolHandler handler, java.lang.Throwable error)
          This method is called if an exception occurs during the execution of the activate method.
 void handleDeactivateError(EditToolHandler handler, java.lang.Throwable error)
          This method is called if an exception occurs during the execution of the deactivate method.
 

Method Detail

activate

void activate(EditToolHandler handler)
The action to be performed by this activator when activating.

Parameters:
handler -

deactivate

void deactivate(EditToolHandler handler)
The action to be performed by this activator when deactivating.

Parameters:
handler -

handleActivateError

void handleActivateError(EditToolHandler handler,
                         java.lang.Throwable error)
This method is called if an exception occurs during the execution of the activate method.

This method should

  1. Rollback the changes made during the run method
  2. Log the error in the plugin's log

Parameters:
error - Error that occurred
activating - Indicates whether activator is being activated.

handleDeactivateError

void handleDeactivateError(EditToolHandler handler,
                           java.lang.Throwable error)
This method is called if an exception occurs during the execution of the deactivate method.

This method should

  1. Rollback the changes made during the run method
  2. Log the error in the plugin's log

Parameters:
error - Error that occurred
activating - Indicates whether activator is being activated.