Community
Participate
Working Groups
Trying to invoke the following template (my method stub): /** * */ ${public} ${void} ${name}(${arguments}) { } // ${name} Results in the following error message to be displayed: Overlapping text edits. The template is expanded without the linked positions. Templates also no longer show up in the completion list for that editor (must be closed and reopened). The following exeception is logged: !ENTRY org.eclipse.ui 4 4 Sep 11, 2002 10:11:26.57 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Sep 11, 2002 10:11:26.107 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.jdt.internal.ui.text.template.TemplateProposal.getSelection(TemplateProposal.java:157) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:257) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7(CompletionProposalPopup.java:243) at org.eclipse.jface.text.contentassist.CompletionProposalPopup$1.run(CompletionProposalPopup.java:110) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:92) at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1200) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:218) at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:84) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:66) at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:82) at org.eclipse.jface.action.Action.runWithEvent(Action.java:749) at org.eclipse.ui.internal.registry.AcceleratorScope$AcceleratorAction.run(AcceleratorScope.java:289) at org.eclipse.ui.internal.registry.AcceleratorScope.processKey(AcceleratorScope.java:249) at org.eclipse.ui.internal.KeyBindingMenu$3.handleEvent(KeyBindingMenu.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1622) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1368) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1256) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1239) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) 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:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
fixed by Dirk >= 20020912 fixed by me: potential NPE
This same template fails if the code formatter is disabled ('Use Code Formattter' unchecked in the Java->Templates preferences). Same error message. Using build 0917.
fixed >= 20020919 (will be in M1 build)