Class AbstractPulldownAction
java.lang.Object
org.libreoffice.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 Object
implements org.eclipse.ui.IWorkbenchWindowPulldownDelegate
Abstract class to create a pulldown menu action.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()org.eclipse.swt.widgets.MenugetMenu(org.eclipse.swt.widgets.Control pParent) voidinit(org.eclipse.ui.IWorkbenchWindow pWindow) abstract booleanisValidSelection(org.eclipse.jface.viewers.IStructuredSelection pSelection) Check if the selection is valid, and if the pulldown action can be enabled.protected voidopenWizard(org.eclipse.ui.INewWizard pWizard) Open the new wizard dialog.voidselectionChanged(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, waitMethods inherited from interface org.eclipse.ui.IActionDelegate
run
-
Constructor Details
-
AbstractPulldownAction
Pulldown action.- Parameters:
pParameterName- the action parameter
-
-
Method Details
-
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:
trueif 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:
getMenuin interfaceorg.eclipse.ui.IWorkbenchWindowPulldownDelegate
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.eclipse.ui.IWorkbenchWindowActionDelegate
-
init
public void init(org.eclipse.ui.IWorkbenchWindow pWindow) - Specified by:
initin interfaceorg.eclipse.ui.IWorkbenchWindowActionDelegate
-
selectionChanged
public void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection) - Specified by:
selectionChangedin interfaceorg.eclipse.ui.IActionDelegate
-