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
currentRow++;
            if (currentRow == targetRow) {
                
                int virtualIndex = 0;
                insertAt = iterator.nextIndex();
                
                
                while (iterator.hasNext()) {
                    IContributionItem item = (IContributionItem) iterator
                            .next();
                    Integer itemRow = (Integer) itemLocation.get(item);
                    if (item.isSeparator()) break;
                    
                    if ((itemRow != null) && (itemRow.intValue() == targetRow)) {
                        
                        
                        if (virtualIndex >= index) break;
                        virtualIndex++;
                    }
                    insertAt++;
                }
                
                if (cbInternalIndex == insertAt) return;
                break;
            }
            nextRow(iterator, true);
        }
        contributionList.remove(cbItem);
        
        if (cbInternalIndex < insertAt) {