Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemy Suen2010-08-12 16:23:03 +0000
committerRemy Suen2010-08-12 16:23:03 +0000
commitc602d2c29123ca424f545f8aa7eb40966c34fb5f (patch)
treec759b6b959f5a73c0e7429dd9d0432d21f8e9aa2 /bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
parentbfb273e3d6db0fe6ab63990f058b8179c24982af (diff)
downloadeclipse.platform.ui-c602d2c29123ca424f545f8aa7eb40966c34fb5f.tar.gz
eclipse.platform.ui-c602d2c29123ca424f545f8aa7eb40966c34fb5f.tar.xz
eclipse.platform.ui-c602d2c29123ca424f545f8aa7eb40966c34fb5f.zip
Bug 322013 [Compatibility] Failure to open workbench windows or workbench pages should cause the throwing of WorkbenchExceptions
Diffstat (limited to 'bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java')
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
index ced61a85397..b12421d6641 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
@@ -69,6 +69,7 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.e4.core.contexts.ContextFunction;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
+import org.eclipse.e4.core.di.InjectionException;
import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.e4.ui.internal.workbench.E4CommandProcessor;
import org.eclipse.e4.ui.internal.workbench.E4Workbench;
@@ -2201,8 +2202,12 @@ public final class Workbench extends EventManager implements IWorkbench {
WorkbenchMessages.WorkbenchPage_ErrorCreatingPerspective, perspectiveId));
}
- MWindow window = BasicFactoryImpl.eINSTANCE.createTrimmedWindow();
- return openWorkbenchWindow(input, descriptor, window, true);
+ try {
+ MWindow window = BasicFactoryImpl.eINSTANCE.createTrimmedWindow();
+ return openWorkbenchWindow(input, descriptor, window, true);
+ } catch (InjectionException e) {
+ throw new WorkbenchException(e.getMessage(), e);
+ }
}
public WorkbenchWindow openWorkbenchWindow(IAdaptable input, IPerspectiveDescriptor descriptor,

Back to the top