Project: JDT
Bug 342559 [content assist] IllegalArgumentException on Javadoc reference completion
Reported: 2011-04-12 08:58:14 | Status: resolved fixed

Write the following class: /** * | * */ public class Gen<T> { } Then place your cursor at "|" and type "Ge", then invoke code assist. Accept the suggestion for {@link Gen<T>}: a "{@link Gen}" is correctly inserted, but the following error appears in the log: java.lang.IllegalArgumentException: at org.eclipse.core.runtime.Assert.isLegal(Assert.java:63) at org.eclipse.core.runtime.Assert.isLegal(Assert.java:47) at org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider.createParameterList(CompletionProposalLabelProvider.java:96) at org.eclipse.jdt.internal.ui.text.java.ProposalContextInformation.<init>(ProposalContextInformation.java:48) at org.eclipse.jdt.internal.ui.text.java.LazyJavaTypeCompletionProposal.computeContextInformation(LazyJavaTypeCompletionProposal.java:389) at org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.getContextInformation(LazyJavaCompletionProposal.java:203) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertProposal(CompletionProposalPopup.java:942) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.insertSelectedProposalWithMask(CompletionProposalPopup.java:879) at org.eclipse.jface.text.contentassist.CompletionProposalPopup.verifyKey(CompletionProposalPopup.java:1305) at org.eclipse.jface.text.contentassist.ContentAssistant$InternalListener.verifyKey(ContentAssistant.java:806) at org.eclipse.jface.text.TextViewer$VerifyKeyListenersManager.verifyKey(TextViewer.java:489) at org.eclipse.swt.custom.StyledTextListener.handleEvent(StyledTextListener.java:65) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774) at org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5957) at org.eclipse.swt.custom.StyledText$7.handleEvent(StyledText.java:5656) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4270) at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4162) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) at org.eclipse.equinox.launcher.Main.run(Main.java:1408) at org.eclipse.equinox.launcher.Main.main(Main.java:1384) Session data: eclipse.buildId=M20110210-1200 java.version=1.6.0_22 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=it_IT Command-line arguments: -os win32 -ws win32 -arch x86_64

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/text/java/CompletionProposalLabelProvider.java