Bug 51965 [JFace] NPE in JavaElementImageDescriptor
This was with 3.0M6. I had an Ant build running, initiated from the ant view. While it was running, I saw a needed change in some code and started editing. I tried using code assist while typing; something like Object foo = theObject.getF<control-space> At that point, in the console for the ant build, the following messages appeared: Action for command 'org.eclipse.ui.edit.text.contentAssist.proposals' failed to execute properly. Reason: Action for command 'org.eclipse.ui.edit.text.contentAssist.proposals' failed to execute properly. In the log file, I see !ENTRY org.eclipse.ui 4 0 Feb 13, 2004 09:29:15.429 !MESSAGE Action for command 'org.eclipse.ui.edit.text.contentAssist.proposals' failed to execute properly. !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.ui.JavaElementImageDescriptor.drawTopRight(JavaElementImageDescriptor.java:191) at org.eclipse.jdt.ui.JavaElementImageDescriptor.drawCompositeImage(JavaElementImageDescriptor.java:166) at org.eclipse.jface.resource.CompositeImageDescriptor.getImageData(CompositeImageDescriptor.java:190) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:118) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:94) at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:83) at org.eclipse.jdt.internal.ui.viewsupport.ImageDescriptorRegistry.get(ImageDescriptorRegistry.java:67) at org.eclipse.jdt.internal.ui.text.java.ResultCollector.getImage(ResultCollector.java:493) at org.eclipse.jdt.internal.ui.text.java.ResultCollector.createCompletion(ResultCollector.java:475) at org.eclipse.jdt.internal.ui.text.java.ResultCollector.createMethodCallCompletion(ResultCollector.java:385) at org.eclipse.jdt.internal.ui.text.java.ResultCollector.acceptMethod(ResultCollector.java:230) at org.eclipse.jdt.internal.core.CompletionRequestorWrapper.acceptMethod(CompletionRequestorWrapper.java:204) at org.eclipse.jdt.internal.codeassist.CompletionEngine.findLocalMethods(CompletionEngine.java:2137) at org.eclipse.jdt.internal.codeassist.CompletionEngine.findMethods(CompletionEngine.java:2522) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:528) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:953) at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:133) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:185) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:179) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.internalComputeCompletionProposals(JavaCompletionProcessor.java:354) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletionProposals(JavaCompletionProcessor.java:328) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:1406) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:231) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7(CompletionProposalPopup.java:227) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:190) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:185) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1258) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:165) at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:82) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:80) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.ui.internal.commands.ActionHandler.execute(ActionHandler.java:40) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:390) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:763) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:803) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:486) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$0(WorkbenchKeyboard.java:421) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$1.handleEvent(WorkbenchKeyboard.java:215) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:692) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:846) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:871) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:856) at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1716) at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1712) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3036) at org.eclipse.swt.widgets.Control.windowProc(Control.java:2939) at org.eclipse.swt.widgets.Display.windowProc(Display.java:2836) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1369) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1990) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1506) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1482) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:246) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581)
bundles/org.eclipse.jface/src/org/eclipse/jface/resource/ImageDescriptor.java
* An image descriptor is an object that knows how to create
 * an SWT image.  It does not hold onto images or cache them,
 * but rather just creates them on demand.  An image descriptor
 * is intended to be a lightweight representation of an image
 * that can be manipulated even when no SWT display exists.
 * <p>
 * This package defines a concrete image descriptor implementation
 * which reads an image from a file (<code>FileImageDescriptor</code>).
 * It also provides abstract framework classes (this one and
 * <code>CompositeImageDescriptor</code>) which may be subclassed to define
 * news kinds of image descriptors.
 * </p>
 * <p>
 * Using this abstract class involves defining a concrete subclass
 * and providing an implementation for the <code>getImageData</code>
 * method.
 * </p>
 *
 * @see org.eclipse.swt.graphics.Image
 */
public abstract class ImageDescriptor {
	
	/** 
	 * A small red square used to warn that an image cannot be created.
	 * <p>
	 */
	protected static final ImageData DEFAULT_IMAGE_DATA= new ImageData(6, 6, 1, new PaletteData(new RGB[] { new RGB(255, 0, 0) }));
/**
 * Constructs an image descriptor.
 */