eclipse-jdt / eclipse-jdt/eclipse.jdt.ui
StringIndexOutOfBoundsException from proposal on javadoc {@link
- Dominant language
- Java
- Stars
- 59
- Forks
- 127
- Avg merge
- 21h 41m
- Merged PRs (30d)
- 31
Description
Given you want to type (within javadoc) `{@link #`, but instead of `#` you hit `@` once more, then jdt.ui will log this error
```
Error retrieving proposal text.
Display string:
link}
Pattern:
link @
```
with this stack trace:
```
java.lang.StringIndexOutOfBoundsException: begin 0, end 6, length 5
at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4602)
at java.base/java.lang.String.substring(String.java:2705)
at org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal.getPatternMatchRule(AbstractJavaCompletionProposal.java:929)
at org.eclipse.jdt.internal.ui.text.javadoc.JavadocInlineTagCompletionProposal.getStyledDisplayString(JavadocInlineTagCompletionProposal.java:103)
at org.eclipse.jface.text.contentassist.CompletionProposalPopup.handleSetData(CompletionProposalPopup.java:879)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5855)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1555)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1538)
at org.eclipse.swt.widgets.Table.checkData(Table.java:289)
at org.eclipse.swt.widgets.Table.cellDataProc(Table.java:227)
at org.eclipse.swt.widgets.Display.cellDataProc(Display.java:994)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4514)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:645)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:342)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:552)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
at org.eclipse.equinox.launcher.Main.main(Main.java:1432)
```
Contributor guide
Assessment
This issue has not been assessed yet.