Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Bur2013-05-21 08:17:26 +0000
committerStephan Leicht Vogt2013-05-21 08:45:26 +0000
commit34477bee40cb85e9dbaf1452a292f4a71f4811b7 (patch)
tree82e01032d1f9ef397489ef89e53911207c623b0d
parent26f27f3f1d32ea23d0ac6cf57fe65ca2a6ab599c (diff)
downloadorg.eclipse.scout.rt-34477bee40cb85e9dbaf1452a292f4a71f4811b7.tar.gz
org.eclipse.scout.rt-34477bee40cb85e9dbaf1452a292f4a71f4811b7.tar.xz
org.eclipse.scout.rt-34477bee40cb85e9dbaf1452a292f4a71f4811b7.zip
bug 384479: additional Extension Support for Scout
https://bugs.eclipse.org/bugs/show_bug.cgi?id=384479 (cherry picked from commit c35057e5112a157ba6483f8ba718d8e19687d4e1) Change-Id: I50ab924ac39279c51165c0b6000dc383d9fd3fac Reviewed-on: https://git.eclipse.org/r/13007 Tested-by: Hudson CI Reviewed-by: Stephan Leicht Vogt <stephan.leicht@bsiag.com> IP-Clean: Stephan Leicht Vogt <stephan.leicht@bsiag.com>
-rw-r--r--org.eclipse.scout.rt.shared/src/org/eclipse/scout/rt/shared/services/common/code/AbstractCode.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/org.eclipse.scout.rt.shared/src/org/eclipse/scout/rt/shared/services/common/code/AbstractCode.java b/org.eclipse.scout.rt.shared/src/org/eclipse/scout/rt/shared/services/common/code/AbstractCode.java
index a9f7296473..b54fcfb680 100644
--- a/org.eclipse.scout.rt.shared/src/org/eclipse/scout/rt/shared/services/common/code/AbstractCode.java
+++ b/org.eclipse.scout.rt.shared/src/org/eclipse/scout/rt/shared/services/common/code/AbstractCode.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2010 BSI Business Systems Integration AG.
+ * Copyright (c) 2010,2013 BSI Business Systems Integration AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.scout.commons.ConfigurationUtility;
import org.eclipse.scout.commons.annotations.ConfigProperty;
@@ -140,18 +141,30 @@ public abstract class AbstractCode<T> implements ICode<T>, Serializable {
0
));
// add configured child codes
+ for (ICode childCode : execCreateChildCodes()) {
+ addChildCodeInternal(childCode);
+ }
+ }
+
+ /**
+ * @return Creates and returns child codes. Note: {@link #addChildCodeInternal(ICode)} must not be invoked.
+ * @since 3.8.3
+ */
+ protected List<ICode<?>> execCreateChildCodes() {
+ List<ICode<?>> codes = new ArrayList<ICode<?>>();
Class<? extends ICode>[] a = getConfiguredCodes();
if (a != null) {
for (int i = 0; i < a.length; i++) {
try {
ICode code = ConfigurationUtility.newInnerInstance(this, a[i]);
- addChildCodeInternal(code);
+ codes.add(code);
}
catch (Exception e) {
LOG.warn(null, e);
}
}
}
+ return codes;
}
/**

Back to the top