Search in sources :

Example 21 with ConfigOperation

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;
}
Also used : OrderedComparator(org.eclipse.scout.rt.platform.OrderedComparator) ArrayList(java.util.ArrayList) ConfigOperation(org.eclipse.scout.rt.platform.annotations.ConfigOperation)

Aggregations

ConfigOperation (org.eclipse.scout.rt.platform.annotations.ConfigOperation)21 Order (org.eclipse.scout.rt.platform.Order)20 IDataModelEntity (org.eclipse.scout.rt.shared.data.model.IDataModelEntity)4 EntityNode (org.eclipse.scout.rt.client.ui.form.fields.composer.node.EntityNode)3 ArrayList (java.util.ArrayList)2 LinkedList (java.util.LinkedList)2 ITreeNode (org.eclipse.scout.rt.client.ui.basic.tree.ITreeNode)2 EitherOrNode (org.eclipse.scout.rt.client.ui.form.fields.composer.node.EitherOrNode)2 SQLException (java.sql.SQLException)1 Calendar (java.util.Calendar)1 HashSet (java.util.HashSet)1 BookmarkServiceEvent (org.eclipse.scout.rt.client.services.common.bookmark.BookmarkServiceEvent)1 BookmarkServiceListener (org.eclipse.scout.rt.client.services.common.bookmark.BookmarkServiceListener)1 IBookmarkService (org.eclipse.scout.rt.client.services.common.bookmark.IBookmarkService)1 FormFieldProvisioningContext (org.eclipse.scout.rt.client.services.lookup.FormFieldProvisioningContext)1 ILookupCallProvisioningService (org.eclipse.scout.rt.client.services.lookup.ILookupCallProvisioningService)1 ITable (org.eclipse.scout.rt.client.ui.basic.table.ITable)1 ITableRow (org.eclipse.scout.rt.client.ui.basic.table.ITableRow)1 IColumn (org.eclipse.scout.rt.client.ui.basic.table.columns.IColumn)1 ITreeVisitor (org.eclipse.scout.rt.client.ui.basic.tree.ITreeVisitor)1