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
}
    /* (non-Javadoc)
     * @see org.eclipse.jface.action.ICoolBarManager#add(org.eclipse.jface.action.IToolBarManager)
     */
    public void add(IToolBarManager toolBarManager) {
        Assert.isNotNull(toolBarManager);
        super.add(new ToolBarContributionItem(toolBarManager));
    }
    /* (non-Javadoc)
     * @see org.eclipse.jface.action.ICoolBarManager#getStyle()
     */
    public int getStyle() {
        
        
        return ((CoolBarManager) getParent()).getStyle();
    }
    /**
     * Returns the parent cool bar manager that this sub-manager contributes to.
     * 
     * @return the parent cool bar manager 
     */
    protected final ICoolBarManager getParentCoolBarManager() {
        
        
        return (ICoolBarManager) getParent();
    }
    /* (non-Javadoc)
     * @see org.eclipse.jface.action.ICoolBarManager#isLayoutLocked()
     */
    public boolean getLockLayout() {