Class ToggleHandler

All Implemented Interfaces:
IHandler, IHandler2, IElementUpdater

public abstract class ToggleHandler extends AbstractHandler implements IElementUpdater
Use this handler for style="toggle" command contributions. You need to declare a state for your command to use ToggleHandler:
 <command id="somecommand" name="SomeCommand">
    <state class="org.eclipse.jface.commands.ToggleState" id="STYLE"/>
 </command>
 
The id="STYLE" was chosen because of IMenuStateIds.STYLE - maybe this will work without any Handler foo in later Eclipse versions. See http://www.ralfebert.de/eclipse/2009_01_21_togglehandler/ http://eclipsesource.com/blogs/2009/01/15/toggling-a-command-contribution/