Bug 108624 [Coolbar] incorrect downcast in SubCoolBarManager.getStyle()
The downcast in this method public int getStyle() { // It is okay to cast down since we only accept coolBarManager objects in the // constructor return ((CoolBarManager) getParent()).getStyle(); } is not okay because the constructor accepts ICoolBarManager objects. Since ICoolBarManager has a method getStyle(), the downcast should be to ICoolBarManager, not to CoolBarManager.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/SubCoolBarManager.java
return getParentCoolBarManager().getLockLayout();
    }
    /* (non-Javadoc)
     * @see org.eclipse.jface.action.ICoolBarManager#lockLayout(boolean)
     */
    public void setLockLayout(boolean value) {
    }
    /* (non-Javadoc)
     * SubCoolBarManagers do not have control of the global context menu.
     */
    public IMenuManager getContextMenuManager() {
        return null;
    }
    /* (non-Javadoc)
     * In SubCoolBarManager we do nothing.
     */
    public void setContextMenuManager(IMenuManager menuManager) {
        
    }
    /* (non-Javadoc)
     * @see org.eclipse.jface.action.IContributionManager#update(boolean)
     */
    public void update(boolean force) {
        
        
        
        getParentCoolBarManager().update(force);
    }
}