org.openoffice.ide.eclipse.core.actions
Class AbstractPulldownAction

java.lang.Object
  extended by org.openoffice.ide.eclipse.core.actions.AbstractPulldownAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate, org.eclipse.ui.IWorkbenchWindowPulldownDelegate
Direct Known Subclasses:
UnoProjectPulldownAction, UnoTypePulldownAction

public abstract class AbstractPulldownAction
extends java.lang.Object
implements org.eclipse.ui.IWorkbenchWindowPulldownDelegate

Abstract class to create a pulldown menu action.

Author:
cedricbosdo

Constructor Summary
AbstractPulldownAction(java.lang.String pParameterName)
          Pulldown action.
 
Method Summary
 void dispose()
          
 org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Control pParent)
          
 void init(org.eclipse.ui.IWorkbenchWindow pWindow)
          
abstract  boolean isValidSelection(org.eclipse.jface.viewers.IStructuredSelection pSelection)
          Check if the selection is valid, and if the pulldown action can be enabled.
protected  void openWizard(org.eclipse.ui.INewWizard pWizard)
          Open the new wizard dialog.
 void selectionChanged(org.eclipse.jface.action.IAction pAction, org.eclipse.jface.viewers.ISelection pSelection)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IActionDelegate
run
 

Constructor Detail

AbstractPulldownAction

public AbstractPulldownAction(java.lang.String pParameterName)
Pulldown action.

Parameters:
pParameterName - the action parameter
Method Detail

isValidSelection

public abstract boolean isValidSelection(org.eclipse.jface.viewers.IStructuredSelection pSelection)
Check if the selection is valid, and if the pulldown action can be enabled.

Parameters:
pSelection - the current selection
Returns:
true if the wizards can be launched.

openWizard

protected void openWizard(org.eclipse.ui.INewWizard pWizard)
Open the new wizard dialog.

Parameters:
pWizard - the wizard to open

getMenu

public org.eclipse.swt.widgets.Menu getMenu(org.eclipse.swt.widgets.Control pParent)

Specified by:
getMenu in interface org.eclipse.ui.IWorkbenchWindowPulldownDelegate

dispose

public void dispose()

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchWindowActionDelegate

init

public void init(org.eclipse.ui.IWorkbenchWindow pWindow)

Specified by:
init in interface org.eclipse.ui.IWorkbenchWindowActionDelegate

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction pAction,
                             org.eclipse.jface.viewers.ISelection pSelection)

Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate