edu.cmu.cs.crystal.internal
Class EnableAnalysisHandler

java.lang.Object
  extended by edu.cmu.cs.crystal.internal.EnableAnalysisHandler
All Implemented Interfaces:
org.eclipse.core.commands.IHandler, org.eclipse.ui.commands.IElementUpdater

public class EnableAnalysisHandler
extends Object
implements org.eclipse.core.commands.IHandler, org.eclipse.ui.commands.IElementUpdater

A handler for the "CrystalPlugin.enableanalysis" command. When this command is issued, this handler responds by either enabling or disabling the analysis that was passed as a parameter.

Author:
Nels E. Beckman

Constructor Summary
EnableAnalysisHandler()
           
 
Method Summary
 void addHandlerListener(org.eclipse.core.commands.IHandlerListener handlerListener)
           
 void dispose()
           
 Object execute(org.eclipse.core.commands.ExecutionEvent event)
          Will enable or disable an analysis based on which menu item was chosen.
 boolean isEnabled()
           
 boolean isHandled()
           
 void removeHandlerListener(org.eclipse.core.commands.IHandlerListener handlerListener)
           
 void updateElement(org.eclipse.ui.menus.UIElement element, Map parameters)
          Method called to determine if the checkbox next to an analysis name should be checked or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnableAnalysisHandler

public EnableAnalysisHandler()
Method Detail

addHandlerListener

public void addHandlerListener(org.eclipse.core.commands.IHandlerListener handlerListener)
Specified by:
addHandlerListener in interface org.eclipse.core.commands.IHandler

dispose

public void dispose()
Specified by:
dispose in interface org.eclipse.core.commands.IHandler

execute

public Object execute(org.eclipse.core.commands.ExecutionEvent event)
               throws org.eclipse.core.commands.ExecutionException
Will enable or disable an analysis based on which menu item was chosen.

Specified by:
execute in interface org.eclipse.core.commands.IHandler
Throws:
org.eclipse.core.commands.ExecutionException

isEnabled

public boolean isEnabled()
Specified by:
isEnabled in interface org.eclipse.core.commands.IHandler

isHandled

public boolean isHandled()
Specified by:
isHandled in interface org.eclipse.core.commands.IHandler

removeHandlerListener

public void removeHandlerListener(org.eclipse.core.commands.IHandlerListener handlerListener)
Specified by:
removeHandlerListener in interface org.eclipse.core.commands.IHandler

updateElement

public void updateElement(org.eclipse.ui.menus.UIElement element,
                          Map parameters)
Method called to determine if the checkbox next to an analysis name should be checked or not.

Specified by:
updateElement in interface org.eclipse.ui.commands.IElementUpdater