Bug 55827 [Contributions] Need to remove refs to Platform.getDebugOption from JFace
build I20040323 Standalone JFace applications are currently broken due to several refs to Platform.getDebugOption in JFace, which is only available if Eclipse is running. Should have static flags for the various debug options in JFace, and initialize them from the Workbench.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/CoolBarManager.java
public void setContextMenuManager(IMenuManager contextMenuManager) {
        this.contextMenuManager = (MenuManager) contextMenuManager;
        if (coolBar != null) {
            coolBar.setMenu(getContextMenuControl());
        }
    }
    /**
     * Replaces the internal data structure with the given new order. Then
     * force and update.
     * 
     * @param newLayout
     *            a list of new order of contribution items.
     */
    public void setLayout(ArrayList newLayout) {
        IContributionItem[] newItems = new IContributionItem[newLayout.size()];
        newItems = (IContributionItem[]) newLayout.toArray(newItems);
        
        if (coolBar != null) {
            CoolItem[] coolItems = coolBar.getItems();
            for (int i = 0; i < coolItems.length; i++) {
                dispose(coolItems[i]);
            }
        }
        
        internalSetItems(newItems);
        
        update(true);
    }
    /*
     * (non-Javadoc)