Bug 182714 [Contributions] Improve toolbar configurability
bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java
Object data = mi[i].getData();
                    if (data == null || !clean.contains(data)) {
                        mi[i].dispose();
                    } else if (data instanceof IContributionItem
                            && ((IContributionItem) data).isDynamic()
                            && ((IContributionItem) data).isDirty()) {
                        mi[i].dispose();
                    }
                }
                
                mi = getMenuItems();
                int srcIx = 0;
                int destIx = 0;
                for (Iterator e = clean.iterator(); e.hasNext();) {
                    IContributionItem src = (IContributionItem) e.next();
                    IContributionItem dest;
                    
                    if (srcIx < mi.length) {
						dest = (IContributionItem) mi[srcIx].getData();
					} else {
						dest = null;
					}
                    if (dest != null && src.equals(dest)) {
                        srcIx++;
                        destIx++;
                    } else if (dest != null && dest.isSeparator()
                            && src.isSeparator()) {
                        mi[srcIx].setData(src);
                        srcIx++;
                        destIx++;