Bug 55822 [CoolBar] CoolBarManager.setLayout is poor API
build I20040323 CoolBarManager.setLayout has a couple of problems: 1. its Javadoc talks about internals 2. it takes an ArrayList of unspec'ed element type instead of IContributionItem[] 3. it talks about order, but really it allows the whole set of items to be replaced, not just reordered. Should change to take an IContributionItem[] (and copy the array).
bundles/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java
}
    /**
     * Subclasses may extend this <code>ContributionManager</code> method,
     * but must call <code>super.itemAdded</code>.
     * 
     * @see org.eclipse.jface.action.ContributionManager#itemAdded(org.eclipse.jface.action.IContributionItem)
     */
    protected void itemAdded(IContributionItem item) {
        Assert.isNotNull(item);
        super.itemAdded(item);
        int insertedAt = indexOf(item);
        boolean replaced = false;
        final int size = cbItemsCreationOrder.size();
        for (int i = 0; i < size; i++) {
            IContributionItem created = (IContributionItem) cbItemsCreationOrder
                    .get(i);
            if (created.getId() != null && created.getId().equals(item.getId())) {
                cbItemsCreationOrder.set(i, item);
                replaced = true;
                break;
            }
        }
        if (!replaced) {
            cbItemsCreationOrder.add(Math.min(Math.max(insertedAt, 0),
                    cbItemsCreationOrder.size()), item);
        }
    }
    /**
     * Subclasses may extend this <code>ContributionManager</code> method,
     * but must call <code>super.itemRemoved</code>.