Package org.eclipse.debug.ui.actions
Class RelaunchLastAction
java.lang.Object
org.eclipse.debug.ui.actions.RelaunchLastAction
- All Implemented Interfaces:
IActionDelegate
,IActionDelegate2
,IWorkbenchWindowActionDelegate
public abstract class RelaunchLastAction
extends Object
implements IWorkbenchWindowActionDelegate, IActionDelegate2
Re-launches the last launch.
- Since:
- 3.8
- See Also:
-
ContextRunner
ILaunchConfiguration
RunLastAction
DebugLastAction
ProfileLastAction
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes this action delegate.protected abstract String
Returns the command id this action is associated with.protected abstract String
Returns a description for this action (to associate with command).protected ILaunchConfiguration
Return the last launch that occurred in the workspace.protected abstract String
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 itemprotected abstract String
getText()
Returns the text to display on the menu item.protected abstract String
Returns the text to display in the menu item tooltipvoid
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
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.
-
Constructor Details
-
RelaunchLastAction
public RelaunchLastAction()
-
-
Method Details
-
dispose
public void dispose()Description copied from interface:IWorkbenchWindowActionDelegate
Disposes this action delegate. The implementor should unhook any references to itself so that garbage collection can occur.- Specified by:
dispose
in interfaceIActionDelegate2
- Specified by:
dispose
in interfaceIWorkbenchWindowActionDelegate
-
init
Description copied from interface:IWorkbenchWindowActionDelegate
Initializes this action delegate with the workbench window it will work in.- Specified by:
init
in interfaceIWorkbenchWindowActionDelegate
- Parameters:
window
- the window that provides the context for this delegate
-
init
Description copied from interface:IActionDelegate2
Allows the action delegate to initialize itself after being created by the proxy action. This lifecycle method is called after the action delegate has been created and before any other method of the action delegate is called.- Specified by:
init
in interfaceIActionDelegate2
- Parameters:
action
- the proxy action that handles the presentation portion of the action.- Since:
- 3.12
-
run
Description copied from interface:IActionDelegate
Performs this action.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 therunWithEvent(IAction, Event)
method is called.- Specified by:
run
in interfaceIActionDelegate
- Parameters:
action
- the action proxy that handles the presentation portion of the action
-
runWithEvent
Description copied from interface:IActionDelegate2
Performs this action, passing the SWT event which triggered it. This method is called by the proxy action when the action has been triggered. Implement this method to do the actual work.Note: This method is called instead of
run(IAction)
.- Specified by:
runWithEvent
in interfaceIActionDelegate2
- Parameters:
action
- the action proxy that handles the presentation portion of the actionevent
- the SWT event which triggered this action being run- Since:
- 3.12
-
selectionChanged
Description copied from interface:IActionDelegate
Notifies this action delegate that the selection in the workbench has changed.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.
- Specified by:
selectionChanged
in interfaceIActionDelegate
- Parameters:
action
- the action proxy that handles presentation portion of the actionselection
- the current selection, ornull
if there is no selection.
-
getLastLaunch
Return the last launch that occurred in the workspace.- Returns:
- the filtered last launch
-
getShell
Returns the parent shell for this menu item- Returns:
- the parent shell
-
getMode
Returns the mode (run or debug) of this action.- Returns:
- the mode
-
getLaunchGroupId
Returns the launch group id of this action.- Returns:
- the launch group id
-
getText
Returns the text to display on the menu item.- Returns:
- the text for the menu item
-
getTooltipText
Returns the text to display in the menu item tooltip- Returns:
- the text for the tooltip
-
getCommandId
Returns the command id this action is associated with.- Returns:
- command id
-
getDescription
Returns a description for this action (to associate with command).- Returns:
- command description
-