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 java.lang.Object implements IWorkbenchWindowActionDelegate, IActionDelegate2
Re-launches the last launch.- Since:
- 3.8
- See Also:
ContextRunner,ILaunchConfiguration,RunLastAction,DebugLastAction,ProfileLastAction
-
-
Constructor Summary
Constructors Constructor Description RelaunchLastAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddispose()Disposes this action delegate.protected abstract java.lang.StringgetCommandId()Returns the command id this action is associated with.protected abstract java.lang.StringgetDescription()Returns a description for this action (to associate with command).protected ILaunchConfigurationgetLastLaunch()Return the last launch that occurred in the workspace.protected abstract java.lang.StringgetLaunchGroupId()Returns the launch group id of this action.protected abstract java.lang.StringgetMode()Returns the mode (run or debug) of this action.protected ShellgetShell()Returns the parent shell for this menu itemprotected abstract java.lang.StringgetText()Returns the text to display on the menu item.protected abstract java.lang.StringgetTooltipText()Returns the text to display in the menu item tooltipvoidinit(IAction action)Allows the action delegate to initialize itself after being created by the proxy action.voidinit(IWorkbenchWindow window)Initializes this action delegate with the workbench window it will work in.voidrun(IAction action)Performs this action.voidrunWithEvent(IAction action, Event event)Performs this action, passing the SWT event which triggered it.voidselectionChanged(IAction action, ISelection selection)Notifies this action delegate that the selection in the workbench has changed.
-
-
-
Method Detail
-
dispose
public void dispose()
Description copied from interface:IWorkbenchWindowActionDelegateDisposes this action delegate. The implementor should unhook any references to itself so that garbage collection can occur.- Specified by:
disposein interfaceIActionDelegate2- Specified by:
disposein interfaceIWorkbenchWindowActionDelegate
-
init
public void init(IWorkbenchWindow window)
Description copied from interface:IWorkbenchWindowActionDelegateInitializes this action delegate with the workbench window it will work in.- Specified by:
initin interfaceIWorkbenchWindowActionDelegate- Parameters:
window- the window that provides the context for this delegate
-
init
public void init(IAction action)
Description copied from interface:IActionDelegate2Allows 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:
initin interfaceIActionDelegate2- Parameters:
action- the proxy action that handles the presentation portion of the action.- Since:
- 3.12
-
run
public void run(IAction action)
Description copied from interface:IActionDelegatePerforms 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:
runin interfaceIActionDelegate- Parameters:
action- the action proxy that handles the presentation portion of the action
-
runWithEvent
public void runWithEvent(IAction action, Event event)
Description copied from interface:IActionDelegate2Performs 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:
runWithEventin 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
public void selectionChanged(IAction action, ISelection selection)
Description copied from interface:IActionDelegateNotifies 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:
selectionChangedin interfaceIActionDelegate- Parameters:
action- the action proxy that handles presentation portion of the actionselection- the current selection, ornullif there is no selection.
-
getLastLaunch
protected ILaunchConfiguration getLastLaunch()
Return the last launch that occurred in the workspace.- Returns:
- the filtered last launch
-
getShell
protected Shell getShell()
Returns the parent shell for this menu item- Returns:
- the parent shell
-
getMode
protected abstract java.lang.String getMode()
Returns the mode (run or debug) of this action.- Returns:
- the mode
-
getLaunchGroupId
protected abstract java.lang.String getLaunchGroupId()
Returns the launch group id of this action.- Returns:
- the launch group id
-
getText
protected abstract java.lang.String getText()
Returns the text to display on the menu item.- Returns:
- the text for the menu item
-
getTooltipText
protected abstract java.lang.String getTooltipText()
Returns the text to display in the menu item tooltip- Returns:
- the text for the tooltip
-
getCommandId
protected abstract java.lang.String getCommandId()
Returns the command id this action is associated with.- Returns:
- command id
-
getDescription
protected abstract java.lang.String getDescription()
Returns a description for this action (to associate with command).- Returns:
- command description
-
-