public abstract class RelaunchLastAction extends Object implements IWorkbenchWindowActionDelegate
ContextRunner
,
ILaunchConfiguration
,
RunLastAction
,
DebugLastAction
,
ProfileLastAction
Constructor and Description |
---|
RelaunchLastAction() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this action delegate.
|
protected abstract String |
getCommandId()
Returns the command id this action is associated with.
|
protected abstract String |
getDescription()
Returns a description for this action (to associate with command).
|
protected ILaunchConfiguration |
getLastLaunch()
Return the last launch that occurred in the workspace.
|
protected abstract String |
getLaunchGroupId()
Returns the launch group id of this action.
|
protected abstract String |
getMode()
Returns the mode (run or debug) of this action.
|
protected Shell |
getShell()
Returns the parent shell for this menu item
|
protected abstract String |
getText()
Returns the text to display on the menu item.
|
protected abstract String |
getTooltipText()
Returns the text to display in the menu item tooltip
|
void |
init(IWorkbenchWindow window)
Initializes this action delegate with the workbench window it will work in.
|
void |
run(IAction action)
Performs this action.
|
void |
selectionChanged(IAction action,
ISelection selection)
Notifies this action delegate that the selection in the workbench has changed.
|
public void dispose()
IWorkbenchWindowActionDelegate
dispose
in interface IWorkbenchWindowActionDelegate
public void init(IWorkbenchWindow window)
IWorkbenchWindowActionDelegate
init
in interface IWorkbenchWindowActionDelegate
window
- the window that provides the context for this delegatepublic void run(IAction action)
IActionDelegate
This method is called by the proxy action when the action has been triggered. Implement this method to do the actual work.
Note: If the action delegate also implements
IActionDelegate2
, then this method is not invoked but
instead the runWithEvent(IAction, Event)
method is called.
run
in interface IActionDelegate
action
- the action proxy that handles the presentation portion of the
actionpublic void selectionChanged(IAction action, ISelection selection)
IActionDelegate
Implementers can use this opportunity to change the availability of the action or to modify other presentation properties.
When the selection changes, the action enablement state is updated based on the criteria specified in the plugin.xml file. Then the delegate is notified of the selection change regardless of whether the enablement criteria in the plugin.xml file is met.
selectionChanged
in interface IActionDelegate
action
- the action proxy that handles presentation portion of
the actionselection
- the current selection, or null
if there
is no selection.protected ILaunchConfiguration getLastLaunch()
protected Shell getShell()
protected abstract String getMode()
protected abstract String getLaunchGroupId()
protected abstract String getText()
protected abstract String getTooltipText()
protected abstract String getCommandId()
protected abstract String getDescription()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.