Refactor monitor and exceptions
[lgpl/argeo-commons.git] / org.argeo.eclipse.ui.workbench / src / org / argeo / eclipse / spring / SpringExtensionFactory.java
index 7a0486fd265470317a766a897f3ee8f8a73d553e..6a56266252dc82b68ac8aef39f90faae56b4c87a 100644 (file)
@@ -15,7 +15,7 @@
  */\r
 package org.argeo.eclipse.spring;\r
 \r
-import org.argeo.ArgeoException;\r
+import org.argeo.eclipse.ui.EclipseUiException;\r
 import org.eclipse.core.runtime.CoreException;\r
 import org.eclipse.core.runtime.IConfigurationElement;\r
 import org.eclipse.core.runtime.IExecutableExtension;\r
@@ -55,7 +55,7 @@ public class SpringExtensionFactory implements IExecutableExtensionFactory,
 \r
        public Object create() throws CoreException {\r
                if (bean == null)\r
-                       throw new ArgeoException("No underlying bean for extension");\r
+                       throw new EclipseUiException("No underlying bean for extension");\r
                return bean;\r
        }\r
 \r
@@ -65,13 +65,13 @@ public class SpringExtensionFactory implements IExecutableExtensionFactory,
                ApplicationContext applicationContext = ApplicationContextTracker\r
                                .getApplicationContext(bundleSymbolicName);\r
                if (applicationContext == null)\r
-                       throw new ArgeoException(\r
+                       throw new EclipseUiException(\r
                                        "Cannot find application context for bundle "\r
                                                        + bundleSymbolicName);\r
 \r
                String beanName = getBeanName(data, config);\r
                if (beanName == null)\r
-                       throw new ArgeoException("Cannot find bean name for extension "\r
+                       throw new EclipseUiException("Cannot find bean name for extension "\r
                                        + config);\r
 \r
                if (!applicationContext.containsBean(beanName)) {\r
@@ -80,7 +80,7 @@ public class SpringExtensionFactory implements IExecutableExtensionFactory,
                }\r
 \r
                if (!applicationContext.containsBean(beanName))\r
-                       throw new ArgeoException("No bean with name '" + beanName + "'");\r
+                       throw new EclipseUiException("No bean with name '" + beanName + "'");\r
 \r
                this.bean = applicationContext.getBean(beanName);\r
                if (this.bean instanceof IExecutableExtension) {\r