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/resource/JFaceResources.java
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.internal.JFaceActivator;
import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.osgi.framework.Bundle;
/**
 * Utility methods to access JFace-specific resources.
 * <p>
 * All methods declared on this class are static. This class cannot be
 * instantiated.
 * </p>
 * <p>
 * The following global state is also maintained by this class:
 * <ul>
 * <li>a font registry</li>
 * <li>a color registry</li>
 * <li>an image registry</li>
 * <li>a resource bundle</li>
 * </ul>
 * </p>
 */
public class JFaceResources {
	/**
	 * The path to the icons in the resources.
	 */
	private final static String ICONS_PATH = "$nl$/icons/full/";