Bug 128293 [Contributions] visible/enabled: Object contributions contributed to submenus do not show up
bundles/org.eclipse.jface/src/org/eclipse/jface/action/SubMenuManager.java
}
    /**
     * The default implementation of this <code>IContributionItem</code>
     * method does nothing. Subclasses may override.
     */
    public void dispose() {
        
    }
    /* (non-Javadoc)
     * @see org.eclipse.jface.action.SubContributionManager#disposeManager()
     */
    public void disposeManager() {
        if (menuListener != null) {
            getParentMenuManager().removeMenuListener(menuListener);
            menuListener = null;
            clearListenerList(menuListeners);
        }
        
        
        
        
        
        if (mapMenuToWrapper != null) {
            Iterator iter = mapMenuToWrapper.values().iterator();
            while (iter.hasNext()) {
                SubMenuManager wrapper = (SubMenuManager) iter.next();
                wrapper.disposeManager();
            }
            mapMenuToWrapper.clear();
            mapMenuToWrapper = null;