use of org.eclipse.scout.rt.platform.annotations.ConfigOperation in project scout.rt by eclipse.
the class AbstractCode method execCreateChildCodes.
/**
* @return Creates and returns child codes. Note: {@link #addChildCodeInternal(ICode)} must not be invoked.
* @since 3.8.3
*/
@ConfigOperation
@SuppressWarnings("unchecked")
protected List<? extends ICode<T>> execCreateChildCodes() {
List<Class<ICode>> configuredCodes = getConfiguredCodes();
List<ICode> contributedCodes = m_contributionHolder.getContributionsByClass(ICode.class);
List<ICode<T>> codes = new ArrayList<ICode<T>>(configuredCodes.size() + contributedCodes.size());
for (Class<? extends ICode> codeClazz : configuredCodes) {
ICode<T> code = ConfigurationUtility.newInnerInstance(this, codeClazz);
codes.add(code);
}
for (ICode<?> c : contributedCodes) {
codes.add((ICode<T>) c);
}
Collections.sort(codes, new OrderedComparator());
return codes;
}
Aggregations