org.eclipse.emf.edit.ui.action
Class DelegatingCommandAction

java.lang.Object
  extended byorg.eclipse.jface.action.Action
      extended byorg.eclipse.emf.edit.ui.action.DelegatingCommandAction
All Implemented Interfaces:
IAction, ISelectionChangedListener, ISelectionListener

public class DelegatingCommandAction
extends Action
implements ISelectionListener, ISelectionChangedListener

This class wraps an IEditorActionDelegate, e.g., a CommandAction, to make it into an Action.


Field Summary
protected  IEditorActionDelegate editorActionDelegate
          This is the delegate;
protected  IEditorPart editorPart
          This is the current editor.
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
DelegatingCommandAction(IEditorActionDelegate editorActionDelegate)
          This constructs an instance.
 
Method Summary
protected  void handleSelection(ISelection selection)
           
protected  void registerSelectionListener(IEditorPart editorPart)
           
 void run()
           
protected  void selectionChanged(ISelection selection)
           
 void selectionChanged(IWorkbenchPart part, ISelection selection)
           
 void selectionChanged(SelectionChangedEvent event)
           
 void setActiveEditor(IEditorPart editorPart)
           
protected  void unregisterSelectionListener(IEditorPart editorPart)
           
 
Methods inherited from class org.eclipse.jface.action.Action
addPropertyChangeListener, convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, firePropertyChange, firePropertyChange, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, notifyResult, removeAcceleratorText, removeMnemonics, removePropertyChangeListener, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editorActionDelegate

protected IEditorActionDelegate editorActionDelegate
This is the delegate;


editorPart

protected IEditorPart editorPart
This is the current editor.

Constructor Detail

DelegatingCommandAction

public DelegatingCommandAction(IEditorActionDelegate editorActionDelegate)
This constructs an instance.

Method Detail

selectionChanged

public void selectionChanged(SelectionChangedEvent event)
Specified by:
selectionChanged in interface ISelectionChangedListener

selectionChanged

public void selectionChanged(IWorkbenchPart part,
                             ISelection selection)
Specified by:
selectionChanged in interface ISelectionListener

selectionChanged

protected void selectionChanged(ISelection selection)

handleSelection

protected void handleSelection(ISelection selection)

registerSelectionListener

protected void registerSelectionListener(IEditorPart editorPart)

unregisterSelectionListener

protected void unregisterSelectionListener(IEditorPart editorPart)

setActiveEditor

public void setActiveEditor(IEditorPart editorPart)

run

public void run()
Specified by:
run in interface IAction

Copyright 2001-2004 IBM Corporation and others.
All Rights Reserved.