Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2017-07-05 21:33:13 +0000
committerKarsten Thoms2017-08-23 07:43:27 +0000
commit1976fd165753360e3bcfb89e6bbabb018e870182 (patch)
tree50f03a25fed2ecbd2f9c90175a595eda2bf5b216
parent4879c167e0aba9587ad54bb4d7ef2c1c32e8c14b (diff)
downloadeclipse.platform.ui-1976fd165753360e3bcfb89e6bbabb018e870182.tar.gz
eclipse.platform.ui-1976fd165753360e3bcfb89e6bbabb018e870182.tar.xz
eclipse.platform.ui-1976fd165753360e3bcfb89e6bbabb018e870182.zip
Bug 519268 Added guard condition for open project command
Command must not be executed when it is not enabled. Change-Id: Icc3df6edbf6ca8848baee4db27d50288d29014ea Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
-rw-r--r--bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
index b12bd4528c9..26ca7cd93cd 100644
--- a/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
+++ b/bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ProjectExplorer.java
@@ -239,7 +239,7 @@ public final class ProjectExplorer extends CommonNavigator {
protected void handleDoubleClick(DoubleClickEvent anEvent) {
ICommandService commandService = getViewSite().getService(ICommandService.class);
Command openProjectCommand = commandService.getCommand(IWorkbenchCommandConstants.PROJECT_OPEN_PROJECT);
- if (openProjectCommand != null && openProjectCommand.isHandled()) {
+ if (openProjectCommand != null && openProjectCommand.isHandled() && openProjectCommand.isEnabled()) {
IStructuredSelection selection = (IStructuredSelection) anEvent
.getSelection();
Object element = selection.getFirstElement();

Back to the top