public abstract class RelaunchLastAction extends Object implements IWorkbenchWindowActionDelegate, IActionDelegate2
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(IAction action)
Allows the action delegate to initialize itself after being created by
the proxy action.
|
void |
init(IWorkbenchWindow window)
Initializes this action delegate with the workbench window it will work in.
|
void |
run(IAction action)
Performs this action.
|
void |
runWithEvent(IAction action,
Event event)
Performs this action, passing the SWT event which triggered it.
|
void |
selectionChanged(IAction action,
ISelection selection)
Notifies this action delegate that the selection in the workbench has changed.
|
public void dispose()
IWorkbenchWindowActionDelegatedispose in interface IActionDelegate2dispose in interface IWorkbenchWindowActionDelegatepublic void init(IWorkbenchWindow window)
IWorkbenchWindowActionDelegateinit in interface IWorkbenchWindowActionDelegatewindow - the window that provides the context for this delegatepublic void init(IAction action)
IActionDelegate2init in interface IActionDelegate2action - the proxy action that handles the presentation portion of
the action.public void run(IAction action)
IActionDelegateThis 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 IActionDelegateaction - the action proxy that handles the presentation portion of the
actionpublic void runWithEvent(IAction action, Event event)
IActionDelegate2
Note: This method is called instead of run(IAction).
runWithEvent in interface IActionDelegate2action - the action proxy that handles the presentation portion of
the actionevent - the SWT event which triggered this action being runpublic void selectionChanged(IAction action, ISelection selection)
IActionDelegateImplementers 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 IActionDelegateaction - 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, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.