|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.debug.ui.actions.AbstractLaunchHistoryAction
public abstract class AbstractLaunchHistoryAction
Abstract implementation of an action that displays a drop-down launch history for a specific launch group.
Clients may subclass this class.
LaunchingResourceManager,
ILaunchLabelChangedListener| Field Summary | |
|---|---|
protected boolean |
fRecreateMenu
Indicates whether the launch history has changed and the sub menu needs to be recreated. |
| Constructor Summary | |
|---|---|
AbstractLaunchHistoryAction(java.lang.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()
Allows the action delegate to clean up. |
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[] |
getFavorites()
Returns the launch favorites associated with this action's launch mode and group in user preference order. |
protected ILaunchConfiguration[] |
getHistory()
Returns the launch history associated with this action's launch mode and group in most recently launched order. |
protected ILaunchConfiguration |
getLastLaunch()
Return the last launch in this action's launch history. |
protected java.lang.String |
getLaunchGroupIdentifier()
Returns the identifier of the launch group this action is associated with. |
protected org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory |
getLaunchHistory()
Deprecated. this method returns a class that is not API and is not intended for clients of the debug platform. Instead, use getHistory(),
getFavorites(), and getLastLaunch(). |
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 java.lang.String |
getMode()
Returns the mode (e.g., 'run' or 'debug') of this drop down. |
protected java.lang.String |
getToolTip(ILaunchConfiguration configuration)
Returns the tooltip specific to a configuration. |
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 |
launchHistoryChanged()
Notification that the launch history has changed. |
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. |
protected void |
updateTooltip()
Updates this action's tool-tip. |
| 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(java.lang.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 toaction - the action to addaccelerator - the number that should appear as an acceleratorprotected void updateTooltip()
Subclasses may override as required.
protected java.lang.String getToolTip(ILaunchConfiguration configuration)
configuration - a ILauncConfiguration
public void launchHistoryChanged()
org.eclipse.debug.internal.ui.ILaunchHistoryChangedListenerDebugUIPlugin.
launchHistoryChanged in interface org.eclipse.debug.internal.ui.ILaunchHistoryChangedListenerILaunchHistoryChangedListener.launchHistoryChanged()public void dispose()
IActionDelegate2
dispose in interface IActionDelegate2dispose in interface IWorkbenchWindowActionDelegateIWorkbenchWindowActionDelegate.dispose()protected ILaunchConfiguration getLastLaunch()
public Menu getMenu(Control parent)
IWorkbenchWindowPulldownDelegate
getMenu in interface IWorkbenchWindowPulldownDelegateIWorkbenchWindowPulldownDelegate.getMenu(org.eclipse.swt.widgets.Control)public Menu getMenu(Menu parent)
IWorkbenchWindowPulldownDelegate2
getMenu in interface IWorkbenchWindowPulldownDelegate2IMenuCreator.getMenu(org.eclipse.swt.widgets.Menu)protected void fillMenu(Menu menu)
menu - the menu to fillprotected void addSeparator(Menu menu)
menu - 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
actionIActionDelegate.run(org.eclipse.jface.action.IAction)
public 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 runIActionDelegate2.runWithEvent(org.eclipse.jface.action.IAction, org.eclipse.swt.widgets.Event)public void init(IAction action)
IActionDelegate2
init in interface IActionDelegate2action - the proxy action that handles the presentation portion of
the action.IActionDelegate2.init(org.eclipse.jface.action.IAction)
public 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.IActionDelegate.selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)public void init(IWorkbenchWindow window)
IWorkbenchWindowActionDelegate
init in interface IWorkbenchWindowActionDelegatewindow - the window that provides the context for this delegateIWorkbenchWindowActionDelegate.init(org.eclipse.ui.IWorkbenchWindow)protected org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory getLaunchHistory()
getHistory(),
getFavorites(), and getLastLaunch().
protected ILaunchConfiguration[] getHistory()
protected ILaunchConfiguration[] getFavorites()
protected java.lang.String getMode()
protected java.lang.String getLaunchGroupIdentifier()
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.