X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=eclipse%2Fruntime%2Forg.argeo.eclipse.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Feclipse%2Fspring%2FSpringExtensionFactory.java;h=f20e1d1249f70c8e3a73fddaee6226ac9ee0e95d;hb=24652d1f8e6e8293ebae76121f0369a262ba503a;hp=49a226d39339bf15d5a7dffb3884f79709896897;hpb=9edc86b011a354c46d53552a57c4c542e9a1ca8e;p=lgpl%2Fargeo-commons.git diff --git a/eclipse/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/spring/SpringExtensionFactory.java b/eclipse/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/spring/SpringExtensionFactory.java index 49a226d39..f20e1d124 100644 --- a/eclipse/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/spring/SpringExtensionFactory.java +++ b/eclipse/runtime/org.argeo.eclipse.ui/src/main/java/org/argeo/eclipse/spring/SpringExtensionFactory.java @@ -62,11 +62,6 @@ public class SpringExtensionFactory implements IExecutableExtensionFactory, public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException { - String beanName = getBeanName(data, config); - if (beanName == null) - throw new ArgeoException("Cannot find bean name for extension " - + config); - String bundleSymbolicName = config.getContributor().getName(); ApplicationContext appContext = ApplicationContextTracker .getApplicationContext(bundleSymbolicName); @@ -75,6 +70,11 @@ public class SpringExtensionFactory implements IExecutableExtensionFactory, "Cannot find application context for bundle " + bundleSymbolicName); + String beanName = getBeanName(data, config); + if (beanName == null) + throw new ArgeoException("Cannot find bean name for extension " + + config); + this.bean = appContext.getBean(beanName); if (this.bean instanceof IExecutableExtension) { ((IExecutableExtension) this.bean).setInitializationData(config,