|
Eclipse Platform 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.debug.ui.actions.AbstractLaunchHistoryAction
Abstract implementation of an action that displays a drop-down launch history for a specific launch group.
Clients may subclass this class.
Field Summary | |
protected boolean |
fRecreateMenu
Indicates whether the launch history has changed and the sub menu needs to be recreated. |
Constructor Summary | |
AbstractLaunchHistoryAction(String launchGroupIdentifier)
Constructs a launch history action. |
Method Summary | |
protected void |
addSeparator(Menu menu)
Adds a separator to the given menu |
protected void |
addToMenu(Menu menu,
IAction action,
int accelerator)
Adds the given action to the specified menu with an accelerator specified by the given number. |
void |
dispose()
Disposes this action delegate. |
protected void |
fillMenu(Menu menu)
Fills the drop-down menu with favorites and launch history |
protected IAction |
getAction()
Returns the action used to render this delegate. |
protected ILaunchConfiguration |
getLastLaunch()
Return the last launch in this action's launch history |
protected String |
getLaunchGroupIdentifier()
Returns the identifier of the launch group this action is associated with. |
protected org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory |
getLaunchHistory()
Returns the launch history associated with this action's launch group. |
Menu |
getMenu(Control parent)
Returns the menu for this pull down action. |
Menu |
getMenu(Menu parent)
Returns the menu for this pull down action. |
protected String |
getMode()
Returns the mode (e.g., 'run' or 'debug') of this drop down. |
void |
init(IWorkbenchWindow window)
Initializes this action delegate with the workbench window it will work in. |
void |
launchHistoryChanged()
Notification that the launch history has changed. |
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. |
protected void |
updateTooltip()
Updates this action's tooltip to correspond to the most recent launch. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean fRecreateMenu
Constructor Detail |
public AbstractLaunchHistoryAction(String launchGroupIdentifier)
launchGroupIdentifier
- unique identifier of the launch group
extension that this action displays a launch history for.Method Detail |
protected IAction getAction()
protected void addToMenu(Menu menu, IAction action, int accelerator)
menu
- the menu to add the action to
* @param action the action to add
* @param accelerator the number that should appear as an acceleratorprotected void updateTooltip()
public void launchHistoryChanged()
org.eclipse.debug.internal.ui.ILaunchHistoryChangedListener
DebugUIPlugin
.
launchHistoryChanged
in interface org.eclipse.debug.internal.ui.ILaunchHistoryChangedListener
ILaunchHistoryChangedListener.launchHistoryChanged()
public void dispose()
IWorkbenchWindowActionDelegate
dispose
in interface IWorkbenchWindowActionDelegate
IWorkbenchWindowActionDelegate#dispose()
protected ILaunchConfiguration getLastLaunch()
public Menu getMenu(Control parent)
IWorkbenchWindowPulldownDelegate
getMenu
in interface IWorkbenchWindowPulldownDelegate
IWorkbenchWindowPulldownDelegate#getMenu(Control)
public Menu getMenu(Menu parent)
IWorkbenchWindowPulldownDelegate2
getMenu
in interface IWorkbenchWindowPulldownDelegate2
IMenuCreator#getMenu(Menu)
protected void fillMenu(Menu menu)
menu
- the menu to fillprotected void addSeparator(Menu menu)
menu
- public 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
actionIActionDelegate#run(IAction)
public 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.
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.IActionDelegate#selectionChanged(IAction, ISelection)
public void init(IWorkbenchWindow window)
IWorkbenchWindowActionDelegate
init
in interface IWorkbenchWindowActionDelegate
window
- the window that provides the context for this delegateIWorkbenchWindowActionDelegate#init(IWorkbenchWindow)
protected org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory getLaunchHistory()
protected String getMode()
protected String getLaunchGroupIdentifier()
|
Eclipse Platform 2.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |