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
public void refresh() {
        if (!coolBarExist()) {
            return;
        }
        
        
        ArrayList contributionList = getItemList();
        
        if (contributionList.size() == 0) return;
        
        CoolItem[] coolItems = coolBar.getItems();
        
        int[] wrapIndicies = getAdjustedWrapIndices(coolBar.getWrapIndices());
        int row = 0;
        int coolItemIndex = 0;
        
        
        
        ArrayList displayedItems = new ArrayList(coolBar.getItemCount());
        for (int i = 0; i < coolItems.length; i++) {
            CoolItem coolItem = coolItems[i];
            if (coolItem.getData() instanceof IContributionItem) {
                IContributionItem cbItem = (IContributionItem) coolItem
                        .getData();
                displayedItems.add(Math.min(i, displayedItems.size()), cbItem);
            }
        }
        
        int offset = 0;
        for (int i = 1; i < wrapIndicies.length; i++) {