summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Liebig2008-04-22 05:25:55 (EDT)
committerStefan Liebig2008-04-22 05:25:55 (EDT)
commit658fce596d5038be879029e72b650ce46a2a6706 (patch)
tree08db601e092887e916a0b23c6e83b150d9c78ac9
parentd0dbab588647999dfef3eec87759be3c8bdbbfbb (diff)
downloadorg.eclipse.riena-658fce596d5038be879029e72b650ce46a2a6706.zip
org.eclipse.riena-658fce596d5038be879029e72b650ce46a2a6706.tar.gz
org.eclipse.riena-658fce596d5038be879029e72b650ce46a2a6706.tar.bz2
made ┬┤using translation┬┤ via ConfigurationPlugin explicit and harmonized the andStart() method
-rw-r--r--org.eclipse.riena.core/src/org/eclipse/riena/core/extension/ExtensionInjector.java30
1 files changed, 16 insertions, 14 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 9885347..6654840 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
@@ -41,6 +41,7 @@ public class ExtensionInjector {
private BundleContext context;
private boolean started;
private boolean track = true;
+ private boolean translate;
private String updateMethodName = "update"; //$NON-NLS-1$
private Method updateMethod;
// TODO 3.4: private IRegistryEventListener injectorListener;
@@ -62,21 +63,9 @@ public class ExtensionInjector {
/**
* Start the extension injector.<br>
- * Started with this the extension injector will NOT modify the values with
- * ConfigurationPlugin.
- *
- * @return
- */
- public ExtensionInjector andStart() {
- return andStart(null);
- }
-
- /**
- * Start the extension injector.<br>
- * Started with this the extension injector WILL modify the values with
- * ConfigurationPlugin.
*
* @param context
+ * @return itself
*/
public ExtensionInjector andStart(BundleContext context) {
Assert.isTrue(!started, "ExtensionInjector already started.");
@@ -109,6 +98,7 @@ public class ExtensionInjector {
* If not given ┤update┤ will be assumed.
*
* @param bindMethodName
+ * @return itself
*/
public ExtensionInjector bind(String bindMethodName) {
Assert.isNotNull(bindMethodName, "Bind method name must not be null");
@@ -120,7 +110,7 @@ public class ExtensionInjector {
/**
* Explicitly forbid tracking of changes of the extensions.
*
- * @return
+ * @return itself
*/
public ExtensionInjector doNotTrack() {
Assert.isTrue(!started, "ExtensionInjector already started.");
@@ -130,6 +120,18 @@ public class ExtensionInjector {
}
/**
+ * Modify the values with ConfigurationPlugin.
+ *
+ * @return itself
+ */
+ public ExtensionInjector useTranslation() {
+ Assert.isTrue(!started, "ExtensionInjector already started.");
+ Assert.isTrue(!this.translate, "Translation is already set.");
+ translate = true;
+ return this;
+ }
+
+ /**
* Stop the extension injector.
*/
public void stop() {