Community
Participate
Working Groups
- Create a test class - import org.eclipse.swt.widgets - Type the following code into a method, except for the stuff in <...> - Place your text cursor where indicated - Type ctrl+space to activate code assist Display testDisplay = new Display(); testDisplay.disposeExec(new Runnable() { <place cursor here and type ctrl-space> }); The walkback follows: Log: Thu Oct 18 01:26:01 EDT 2001 1 org.eclipse.core.resources 4 Unhandled exception caught in event loop. Log: Thu Oct 18 01:26:01 EDT 2001 4 org.eclipse.ui 0 java.lang.NullPointerException java.lang.NullPointerException at org.eclipse.jdt.internal.codeassist.CompletionEngine.findLocalMethodDeclarations (CompletionEngine.java(Compiled Code)) at org.eclipse.jdt.internal.codeassist.CompletionEngine.findMethods (CompletionEngine.java:1490) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete (CompletionEngine.java:270) at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete (CompletionEngine.java:540) at org.eclipse.jdt.internal.core.Openable.codeComplete (Openable.java:112) at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete (CompilationUnit.java:61) at org.eclipse.jdt.internal.ui.text.java.JavaCompletionProcessor.computeCompletionP roposals(JavaCompletionProcessor.java:97) at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals (ContentAssistant.java:1064) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals (CompletionProposalPopup.java:84) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$0 (CompletionProposalPopup.java:82) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run (CompletionProposalPopup.java:62) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java (Compiled Code)) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals (CompletionProposalPopup.java:59) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions (ContentAssistant.java:999) at org.eclipse.jface.text.source.SourceViewer.doOperation (SourceViewer.java:367) at org.eclipse.ui.texteditor.TextOperationAction.run (TextOperationAction.java:61) at org.eclipse.ui.texteditor.RetargetTextEditorAction.run (RetargetTextEditorAction.java:103) at org.eclipse.jface.action.Action.runWithEvent(Action.java:451) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:407) at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent (ActionContributionItem.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306)
Continuing from the steps above, I started to type the run method. When I typed the '(' I got another, different walkback. Display testDisplay = new Display(); testDisplay.disposeExec(new Runnable() { public void run( }); Log: Thu Oct 18 01:32:28 EDT 2001 1 org.eclipse.core.resources 4 Unhandled exception caught in event loop. Log: Thu Oct 18 01:32:28 EDT 2001 4 org.eclipse.ui 0 Failed to execute runnable org.eclipse.swt.SWTException: Failed to execute runnable at org.eclipse.swt.SWT.error(SWT.java:1805) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java(Compiled Code)) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java (Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java (Compiled Code)) at org.eclipse.ui.internal.Workbench.run(Workbench.java:658) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:820) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:285) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:151) at org.eclipse.core.launcher.Main.run(Main.java:433) at org.eclipse.core.launcher.Main.main(Main.java:306)
Was missing a null check for completions in empty anonymous type. Fixed