summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Liebig2008-03-12 10:26:28 (EDT)
committerStefan Liebig2008-03-12 10:26:28 (EDT)
commitc3cd06f9c152b3eb22a10cd05609545fc96adecb (patch)
treeaaf52991e27ae2b841f70a11f5e3340eddbe12d1
parenta4fc1f2b8bbb979ae2598288f7800908ca9bb2ed (diff)
downloadorg.eclipse.riena-c3cd06f9c152b3eb22a10cd05609545fc96adecb.zip
org.eclipse.riena-c3cd06f9c152b3eb22a10cd05609545fc96adecb.tar.gz
org.eclipse.riena-c3cd06f9c152b3eb22a10cd05609545fc96adecb.tar.bz2
javadoc, added start with bundle context for ConfigurationPlugin
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/extension/ExtensionInjector.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.riena.core/src/org/eclipse/riena/core/extension/ExtensionInjector.java b/org.eclipse.riena.core/src/org/eclipse/riena/core/extension/ExtensionInjector.java
index 39aca20..4bb2499 100644
--- a/org.eclipse.riena.core/src/org/eclipse/riena/core/extension/ExtensionInjector.java
+++ b/org.eclipse.riena.core/src/org/eclipse/riena/core/extension/ExtensionInjector.java
@@ -24,15 +24,18 @@ import org.eclipse.core.runtime.IRegistryEventListener;
import org.eclipse.core.runtime.RegistryFactory;
import org.eclipse.equinox.log.Logger;
import org.eclipse.riena.core.logging.ConsoleLogger;
+import org.osgi.framework.BundleContext;
import org.osgi.service.log.LogService;
/**
- *
+ * The is the extension injectors.<br>
+ * See {@link ExtensionId} for explanation and usage.
*/
public class ExtensionInjector {
private ExtensionId extensionId;
private Object target;
+ private BundleContext context;
private boolean started;
private boolean track = true;
private String updateMethodName = "update"; //$NON-NLS-1$
@@ -52,14 +55,18 @@ public class ExtensionInjector {
this.target = target;
}
+ public ExtensionInjector andStart() {
+ return andStart(null);
+ }
+
/**
*
* @param context
*/
- public ExtensionInjector andStart() {
+ public ExtensionInjector andStart(BundleContext context) {
Assert.isTrue(!started, "ExtensionInjector already started.");
started = true;
-
+ this.context = context;
updateMethod = findUpdateMethod();
Class<?> paramaterType = updateMethod.getParameterTypes()[0];
isArray = paramaterType.isArray();
@@ -206,7 +213,7 @@ public class ExtensionInjector {
}
void populateInterfaceBeans() {
- Object[] beans = ExtensionReader.read(extensionId.getExtensionPointId(), componentType);
+ Object[] beans = ExtensionReader.read(context, extensionId.getExtensionPointId(), componentType);
if (!matchesExtensionPointConstraint(beans.length))
LOGGER.log(LogService.LOG_ERROR, "Number of extensions does not fullfil the extenion point´s constraints.");
try {