com.aptana.ide.core.ui.actions
Class ActionDelegate

java.lang.Object
  extended by com.aptana.ide.core.ui.actions.ActionDelegate
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate
Direct Known Subclasses:
BaseSyncAction, DuplicateVirtualFileManagerAction, FileSynchronizeAction, FileTypeCloakAction, FileTypeUncloakAction

public abstract class ActionDelegate
extends java.lang.Object
implements org.eclipse.ui.IActionDelegate

A basic action delegate with some nice convenience methods

Author:
Ingo Muschenetz

Constructor Summary
ActionDelegate()
           
 
Method Summary
protected  java.lang.Object[] getValidSelection(org.eclipse.jface.viewers.ISelection selection)
          Returns a valid array of selections
protected  java.lang.Object getValidSingleSelection(org.eclipse.jface.viewers.ISelection selection)
          Returns a valid selection
abstract  void run(org.eclipse.jface.action.IAction action)
           
abstract  void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionDelegate

public ActionDelegate()
Method Detail

run

public abstract void run(org.eclipse.jface.action.IAction action)
Specified by:
run in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.run(org.eclipse.jface.action.IAction)

selectionChanged

public abstract void selectionChanged(org.eclipse.jface.action.IAction action,
                                      org.eclipse.jface.viewers.ISelection selection)
Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate
See Also:
IActionDelegate.selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)

getValidSingleSelection

protected java.lang.Object getValidSingleSelection(org.eclipse.jface.viewers.ISelection selection)
Returns a valid selection

Parameters:
selection -
Returns:
Object

getValidSelection

protected java.lang.Object[] getValidSelection(org.eclipse.jface.viewers.ISelection selection)
Returns a valid array of selections

Parameters:
selection -
Returns:
Object[]