Bug 180701 [JFace] API - Popup dialog is creating image descriptors every time it is opened
We are not caching the imageDescriptors from PopupDialog but are recreating them all of the time. This is likely not a serious issue but it will generate garbage. Also the images are not looked up using bundles so they cannot be overridden in other Locales. As they are currently symmetric this is not an issue but they should be looked up in the same way we do it in JFaceResources when this fixed.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/PopupDialog.java
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.ToolBar;
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.swt.widgets.Tracker;
/**
 * A lightweight, transient dialog that is popped up to show contextual or
 * temporal information and is easily dismissed. Clients control whether the
 * dialog should be able to receive input focus. An optional title area at the
 * top and an optional info area at the bottom can be used to provide additional
 * information.
 * <p>
 * Because the dialog is short-lived, most of the configuration of the dialog is
 * done in the constructor. Set methods are only provided for those values that
 * are expected to be dynamically computed based on a particular instance's
 * internal state.
 * <p>
 * Clients are expected to override the creation of the main dialog area, and
 * may optionally override the creation of the title area and info area in order
 * to add content. In general, however, the creation of stylistic features, such
 * as the dialog menu, separator styles, and fonts, is kept private so that all
 * popup dialogs will have a similar appearance.
 * 
 * @since 3.2
 */
public class PopupDialog extends Window {