diff options
| author | Remy Suen | 2012-02-08 21:20:41 +0000 |
|---|---|---|
| committer | Remy Suen | 2012-02-08 21:20:41 +0000 |
| commit | b6d2d2517fd8f8c04bc8698237fed677b7b64222 (patch) | |
| tree | e6e9469cf51b4265d76fba98280e26fda9a1045c | |
| parent | 99f6636b6f4afd4fe50f75f65ac3c076aa8e067a (diff) | |
| download | eclipse.platform.ui-b6d2d2517fd8f8c04bc8698237fed677b7b64222.tar.gz eclipse.platform.ui-b6d2d2517fd8f8c04bc8698237fed677b7b64222.tar.xz eclipse.platform.ui-b6d2d2517fd8f8c04bc8698237fed677b7b64222.zip | |
Bug 361562 [Compatibility] Debug actions in the global debug toolbar arezArchived/integrationv20120208-2120I20120209-1230I20120208-2200
enabled prematurely
If the source bundle has been activated, we'll initialize the
delegate so that the plug-in can intelligently disable and
enable the action as necessary.
| -rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ActionDelegateHandlerProxy.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ActionDelegateHandlerProxy.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ActionDelegateHandlerProxy.java index 0227a038b51..245fcf0e2b4 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ActionDelegateHandlerProxy.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/ActionDelegateHandlerProxy.java @@ -55,6 +55,7 @@ import org.eclipse.ui.IWorkbenchPartReference; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.ui.internal.WorkbenchPlugin; +import org.eclipse.ui.internal.util.BundleUtility; /** * <p> @@ -304,9 +305,14 @@ public final class ActionDelegateHandlerProxy implements ISelectionListener, */ private void updateDelegate(final IAction action, final IEvaluationContext context) { - if (action == null || delegate == null) { + if (action == null) { return; } + if (delegate == null) { + if (!BundleUtility.isActive(element.getContributor().getName()) || !loadDelegate()) { + return; + } + } if (editorDelegate != null) { final Object activeEditor = context |
