diff options
author | tbaumann2dj | 2014-03-01 23:22:59 +0000 |
---|---|---|
committer | Dani Megert | 2014-03-05 21:11:11 +0000 |
commit | e6dac5182609b33ac3378c9cad00312302fa5364 (patch) | |
tree | 571eaaed429a31f882475198f230551df96c45d7 | |
parent | 6181cfea6e8683c138f18f6bc65ab35d33e9fa30 (diff) | |
download | eclipse.platform.ui-e6dac5182609b33ac3378c9cad00312302fa5364.tar.gz eclipse.platform.ui-e6dac5182609b33ac3378c9cad00312302fa5364.tar.xz eclipse.platform.ui-e6dac5182609b33ac3378c9cad00312302fa5364.zip |
Bug 428323 - [Workbench] Wrong action definition in ActionFactory
Update to new ActionFactory("lockToolBar",
IWorkbenchCommandConstants.WINDOW_LOCK_TOOLBAR), use getCommandId() in
action creation, set tooltip and help.
Update copyright year and add credentials to copyright notice.
Change-Id: Ic78664472d2ef256abcbc1eafdab54ebf97eaac8
Signed-off-by: tbaumann2dj <tobbaumann@gmail.com>
-rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java index 6ca34dabf23..735959c8b54 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/actions/ActionFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2013 IBM Corporation and others. + * Copyright (c) 2003, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Tobias Baumann <tobbaumann@gmail.com> - Bug 428323 - Correct lock tool bar action definition *******************************************************************************/ package org.eclipse.ui.actions; @@ -627,24 +628,26 @@ public abstract class ActionFactory { }; /** - * Workbench action (id: "lockToolBar"): Lock/unlock the workbench window tool bar. This action - * maintains its enablement state. + * Workbench action (id: "lockToolBar"): Lock/unlock the workbench window + * tool bar. This action maintains its enablement state. */ - public static final ActionFactory LOCK_TOOL_BAR = new ActionFactory( - "lockToolBar") {//$NON-NLS-1$ + public static final ActionFactory LOCK_TOOL_BAR = new ActionFactory("lockToolBar", //$NON-NLS-1$ + IWorkbenchCommandConstants.WINDOW_LOCK_TOOLBAR) { /* (non-Javadoc) * @see org.eclipse.ui.actions.ActionFactory#create(org.eclipse.ui.IWorkbenchWindow) */ - public IWorkbenchAction create(IWorkbenchWindow window) { - if (window == null) { - throw new IllegalArgumentException(); - } - WorkbenchCommandAction action = new WorkbenchCommandAction( - IWorkbenchCommandConstants.HELP_ABOUT, window); - action.setId(getId()); - return action; - } + public IWorkbenchAction create(IWorkbenchWindow window) { + if (window == null) { + throw new IllegalArgumentException(); + } + WorkbenchCommandAction action = new WorkbenchCommandAction(getCommandId(), window); + action.setId(getId()); + action.setToolTipText(WorkbenchMessages.LockToolBarAction_toolTip); + window.getWorkbench().getHelpSystem() + .setHelp(action, IWorkbenchHelpContextIds.LOCK_TOOLBAR_ACTION); + return action; + } }; /** |