Bug 204788 [Contributions] Second context menu created from MenuManager does not show
Build ID: I20070621-1340 Steps To Reproduce: 1. Create a MenuManager m with some menu items. 2. Call c.setMenu(m.createContextMenu(c)) on some Control c. 3. Observe that right-clicking on c produces the menu. 4. Dispose the menu. 5. Repeat step 2. (Alternatively, install m on a different control.) 6. The menu now doesn't appear. More information: I'm using Linux/GTK. The debugger tells me that the menu is created and handleAboutToShow() is called. I can't see a problem in the Java code, but nothing appears on the screen. Maybe something is wrong in the native code? If I use a different MenuManager to create the second menu, it works fine.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/MenuManager.java
*     IBM Corporation - initial API and implementation
 *     Remy Chi Jian Suen <remy.suen@gmail.com> - Bug 12116 [Contributions] widgets: MenuManager.setImageDescriptor() method needed
 *******************************************************************************/
package org.eclipse.jface.action;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.resource.LocalResourceManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MenuAdapter;
import org.eclipse.swt.events.MenuEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.CoolBar;
import org.eclipse.swt.widgets.Decorations;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
/**
 * A menu manager is a contribution manager which realizes itself and its items
 * in a menu control; either as a menu bar, a sub-menu, or a context menu.
 * <p>
 * This class may be instantiated; it may also be subclassed.
 * </p>
 */
public class MenuManager extends ContributionManager implements IMenuManager {