Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-12-04 20:02:07 +0000
committerChristian W. Damus2014-12-04 20:02:07 +0000
commita232893635bfcece9414fe559c7ad7791ac88d2c (patch)
tree654c66b2317d19ee17207f853e486f6ebb0d0fcc /plugins/infra/core
parent7c42c70504ca41c08c2c4f874f77ec10e33a7446 (diff)
downloadorg.eclipse.papyrus-a232893635bfcece9414fe559c7ad7791ac88d2c.tar.gz
org.eclipse.papyrus-a232893635bfcece9414fe559c7ad7791ac88d2c.tar.xz
org.eclipse.papyrus-a232893635bfcece9414fe559c7ad7791ac88d2c.zip
415638: [Resource Loading] Loading a controlled unit does not fix unresolved editor tab
https://bugs.eclipse.org/bugs/show_bug.cgi?id=415638 Report a proper ServiceException instead of NPE when the page manager is missing the required sash model manager.
Diffstat (limited to 'plugins/infra/core')
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editor/PageMngrServiceFactory.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editor/PageMngrServiceFactory.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editor/PageMngrServiceFactory.java
index d7f54ac535b..f4357afdd44 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editor/PageMngrServiceFactory.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/editor/PageMngrServiceFactory.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011, 2014 LIFL and others.
+ * Copyright (c) 2011, 2014 LIFL, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* LIFL - Initial API and implementation
+ * Christian W. Damus - bug 415638
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.editor;
@@ -18,6 +19,7 @@ import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.ISashWindowsCon
import org.eclipse.papyrus.infra.core.sasheditor.di.contentprovider.DiSashModelManager;
import org.eclipse.papyrus.infra.core.services.IServiceFactory;
import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
/**
@@ -70,9 +72,13 @@ public class PageMngrServiceFactory implements IServiceFactory {
*
* @return
* @throws ServiceException
+ * if the required sash model manager service is unavailable
*/
@Override
public Object createServiceInstance() throws ServiceException {
+ if (sashModelMngr == null) {
+ throw new ServiceNotFoundException(DiSashModelManager.class.getName());
+ }
return sashModelMngr.getIPageMngr();
}

Back to the top