Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java
index 564726cdb..a25353e7f 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareHandlerService.java
@@ -10,6 +10,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Stefan Dirix (sdirix@eclipsesource.com) - Bug 473847: Minimum E4 Compatibility of Compare
*******************************************************************************/
package org.eclipse.compare.internal;
@@ -44,6 +45,10 @@ public class CompareHandlerService {
if (service != null)
return new CompareHandlerService(container, null);
}
+ if (!PlatformUI.isWorkbenchRunning() && shell != null) {
+ Expression e = new ActiveShellExpression(shell);
+ return new CompareHandlerService(container, e);
+ }
if (container.getWorkbenchPart() == null && shell != null) {
// We're in a dialog so we can use an active shell expression
IHandlerService service = PlatformUI.getWorkbench().getService(IHandlerService.class);
@@ -92,7 +97,7 @@ public class CompareHandlerService {
if (service != null)
fHandlerService = service;
}
- if (fHandlerService == null && fContainer.getWorkbenchPart() == null && fExpression != null) {
+ if (PlatformUI.isWorkbenchRunning() && fHandlerService == null && fContainer.getWorkbenchPart() == null && fExpression != null) {
// We're in a dialog so we can use an active shell expression
IHandlerService service = PlatformUI.getWorkbench().getService(IHandlerService.class);
if (service != null) {

Back to the top