Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StickyScrolling: Exceptions while opening Java editors from Search view #2678

Closed
iloveeclipse opened this issue Jan 9, 2025 · 8 comments · Fixed by #2680 or #2718 · May be fixed by #2719
Closed

StickyScrolling: Exceptions while opening Java editors from Search view #2678

iloveeclipse opened this issue Jan 9, 2025 · 8 comments · Fixed by #2680 or #2718 · May be fixed by #2719
Assignees
Labels
bug Something isn't working regression
Milestone

Comments

@iloveeclipse
Copy link
Member

I've searched for method references and used Search view to navigate ("reuse editors" was on, "sticky lines" limit set to 4).
Sooner or later I've got following exceptions below trying to open next search result in Java editor

eclipse.buildId=4.35.0.I20250108-1800
java.version=21.0.2-13
java.vendor=N/A
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64 -data /data/4x_platform_workspace

org.eclipse.ui
Error
Thu Jan 09 09:23:08 CET 2025
Unhandled event loop exception

java.lang.IllegalArgumentException: Index out of bounds
	at org.eclipse.swt.SWT.error(SWT.java:4913)
	at org.eclipse.swt.SWT.error(SWT.java:4847)
	at org.eclipse.swt.SWT.error(SWT.java:4818)
	at org.eclipse.swt.custom.StyledText.getOffsetAtLine(StyledText.java:4062)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyLine.getStyleRanges(StickyLine.java:56)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingControl.styleStickyLines(StickyScrollingControl.java:239)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingControl.updateStickyScrollingControls(StickyScrollingControl.java:217)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingControl.limitVisibleStickyLinesToTextWidgetHeight(StickyScrollingControl.java:432)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingControl$1.controlResized(StickyScrollingControl.java:410)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:273)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5857)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1652)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1678)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1657)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:1211)
	at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1658)
	at org.eclipse.swt.widgets.Canvas.setBounds(Canvas.java:457)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:1019)
	at org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:168)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1877)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:1179)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:1131)
	at org.eclipse.jface.text.source.LineNumberRulerColumn.layout(LineNumberRulerColumn.java:537)
	at org.eclipse.jface.text.source.LineNumberRulerColumn$InternalListener.textChanged(LineNumberRulerColumn.java:77)
	at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2795)
	at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3415)
	at org.eclipse.jface.text.TextViewer.initializeWidgetContents(TextViewer.java:3463)
	at org.eclipse.jface.text.TextViewer.setVisibleDocument(TextViewer.java:3502)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.setVisibleDocument(ProjectionViewer.java:700)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.setVisibleDocument(JavaSourceViewer.java:646)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.executeReplaceVisibleDocument(ProjectionViewer.java:755)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.replaceVisibleDocument(ProjectionViewer.java:743)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.reinitializeProjection(ProjectionViewer.java:1221)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.catchupWithProjectionAnnotationModel(ProjectionViewer.java:937)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.processCatchupRequest(ProjectionViewer.java:857)
	at org.eclipse.jface.text.source.projection.ProjectionViewer$AnnotationModelListener.processModelChanged(ProjectionViewer.java:122)
	at org.eclipse.jface.text.source.projection.ProjectionViewer$AnnotationModelListener.modelChanged(ProjectionViewer.java:114)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:592)
	at org.eclipse.jface.text.source.AnnotationModel$InternalModelListener.modelChanged(AnnotationModel.java:256)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:592)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:558)
	at org.eclipse.jface.text.source.projection.ProjectionAnnotationModel.modifyAnnotations(ProjectionAnnotationModel.java:192)
	at org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.update(DefaultJavaFoldingStructureProvider.java:987)
	at org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.initialize(DefaultJavaFoldingStructureProvider.java:864)
	at org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.handleProjectionEnabled(DefaultJavaFoldingStructureProvider.java:834)
	at org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider$ProjectionListener.projectionEnabled(DefaultJavaFoldingStructureProvider.java:712)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:475)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:523)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.setVisibleDocument(JavaSourceViewer.java:639)
	at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2891)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:683)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(ProjectionViewer.java:368)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:633)
	at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:3989)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4192)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:262)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1526)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2567)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2554)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1410)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInputWithNotify(AbstractTextEditor.java:4248)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInput(AbstractTextEditor.java:4268)
	at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.showInEditor(JavaSearchEditorOpener.java:99)
	at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.showWithReuse(JavaSearchEditorOpener.java:78)
	at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.openElement(JavaSearchEditorOpener.java:43)
	at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.openMatch(JavaSearchEditorOpener.java:55)
	at org.eclipse.jdt.internal.ui.search.JavaSearchResultPage.showMatch(JavaSearchResultPage.java:197)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage$3.run(AbstractTextSearchViewPage.java:938)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.showMatch(AbstractTextSearchViewPage.java:941)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.showCurrentMatch(AbstractTextSearchViewPage.java:1006)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.gotoNextMatch(AbstractTextSearchViewPage.java:971)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.handleOpen(AbstractTextSearchViewPage.java:1428)
	at org.eclipse.jdt.internal.ui.search.JavaSearchResultPage.handleOpen(JavaSearchResultPage.java:567)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage$2.open(AbstractTextSearchViewPage.java:765)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:799)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:796)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1110)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:295)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:330)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5857)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1652)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5067)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4519)

Probably regression from #2592

@iloveeclipse iloveeclipse added bug Something isn't working regression labels Jan 9, 2025
@iloveeclipse
Copy link
Member Author

@Christopher-Hermann , @BeckerWdf : could you please check?

@iloveeclipse
Copy link
Member Author

Steps to reproduce for me are:

  1. search for org.eclipse.jdt.core.IPackageFragmentRoot.getRawClasspathEntry()
  2. open first match org.eclipse.jdt.core.JavaCore.getGeneratedResources(IRegion, boolean)
  3. open second match org.eclipse.jdt.internal.core.CopyPackageFragmentRootOperation.executeOperation()
  4. Error logged

@jukzi jukzi changed the title Errors while opening Java editors from Search view StickyScrolling: Exceptions while opening Java editors from Search view Jan 9, 2025
@Christopher-Hermann Christopher-Hermann self-assigned this Jan 9, 2025
@iloveeclipse iloveeclipse added this to the 4.35 M2 milestone Jan 9, 2025
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Jan 10, 2025
The search view with "reuse editor" enabled sets new source code in the existing editor and causes a resize. In this call, it can happen that the sticky line number exceeds the amount of line in the new source code. In general this is not a problem since the sticky lines will be recalculated afterwards, but to avoid IllegalArgumentException it is checked for this case.

Fixes eclipse-platform#2678
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Jan 10, 2025
The search view with "reuse editor" enabled sets new source code in the existing editor and causes a resize. In this call, it can happen that the sticky line number exceeds the amount of line in the new source code. In general this is not a problem since the sticky lines will be recalculated afterwards, but to avoid IllegalArgumentException it is checked for this case.

Fixes eclipse-platform#2678
@iloveeclipse
Copy link
Member Author

I observe now worse behavior:

  1. Sticky scrolling isn't shown in most of the cases at all (no errors, just nothing). Simply use same reproduction steps as before. It looks like the very first open can't show sticky area and from there on it is not shown for all other editors opened from the "search" view too.
  2. Sometimes it is shown (seems that it works for editors opened from package Explorer)
  3. Still see the error below, but now it can be reproduced not as often as before. Still, clicking on different matches in the Search view back and forth can reproduce same error:
java.lang.IllegalArgumentException: Index out of bounds
	at org.eclipse.swt.SWT.error(SWT.java:4913)
	at org.eclipse.swt.SWT.error(SWT.java:4847)
	at org.eclipse.swt.SWT.error(SWT.java:4818)
	at org.eclipse.swt.custom.StyledText.getOffsetAtLine(StyledText.java:4062)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyLine.getStyleRanges(StickyLine.java:56)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingControl.styleStickyLines(StickyScrollingControl.java:239)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingControl.updateStickyScrollingControls(StickyScrollingControl.java:217)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingControl.limitVisibleStickyLinesToTextWidgetHeight(StickyScrollingControl.java:453)
	at org.eclipse.ui.internal.texteditor.stickyscroll.StickyScrollingControl$1.controlResized(StickyScrollingControl.java:413)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:273)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:91)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5857)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1652)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1678)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1657)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:1211)
	at org.eclipse.swt.widgets.Composite.setBounds(Composite.java:1658)
	at org.eclipse.swt.widgets.Canvas.setBounds(Canvas.java:457)
	at org.eclipse.swt.widgets.Control.setBounds(Control.java:1019)
	at org.eclipse.jface.text.source.SourceViewer$RulerLayout.layout(SourceViewer.java:168)
	at org.eclipse.swt.widgets.Composite.updateLayout(Composite.java:1877)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:1179)
	at org.eclipse.swt.widgets.Composite.layout(Composite.java:1131)
	at org.eclipse.jface.text.source.LineNumberRulerColumn.layout(LineNumberRulerColumn.java:537)
	at org.eclipse.jface.text.source.LineNumberRulerColumn$InternalListener.textChanged(LineNumberRulerColumn.java:77)
	at org.eclipse.jface.text.TextViewer.updateTextListeners(TextViewer.java:2795)
	at org.eclipse.jface.text.TextViewer.invalidateTextPresentation(TextViewer.java:3415)
	at org.eclipse.jface.text.TextViewer.initializeWidgetContents(TextViewer.java:3463)
	at org.eclipse.jface.text.TextViewer.setVisibleDocument(TextViewer.java:3502)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.setVisibleDocument(ProjectionViewer.java:700)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.setVisibleDocument(JavaSourceViewer.java:646)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.executeReplaceVisibleDocument(ProjectionViewer.java:755)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.replaceVisibleDocument(ProjectionViewer.java:743)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.reinitializeProjection(ProjectionViewer.java:1221)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.catchupWithProjectionAnnotationModel(ProjectionViewer.java:937)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.processCatchupRequest(ProjectionViewer.java:857)
	at org.eclipse.jface.text.source.projection.ProjectionViewer$AnnotationModelListener.processModelChanged(ProjectionViewer.java:122)
	at org.eclipse.jface.text.source.projection.ProjectionViewer$AnnotationModelListener.modelChanged(ProjectionViewer.java:114)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:592)
	at org.eclipse.jface.text.source.AnnotationModel$InternalModelListener.modelChanged(AnnotationModel.java:256)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:592)
	at org.eclipse.jface.text.source.AnnotationModel.fireModelChanged(AnnotationModel.java:558)
	at org.eclipse.jface.text.source.projection.ProjectionAnnotationModel.modifyAnnotations(ProjectionAnnotationModel.java:192)
	at org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.update(DefaultJavaFoldingStructureProvider.java:987)
	at org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.initialize(DefaultJavaFoldingStructureProvider.java:864)
	at org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider.handleProjectionEnabled(DefaultJavaFoldingStructureProvider.java:834)
	at org.eclipse.jdt.ui.text.folding.DefaultJavaFoldingStructureProvider$ProjectionListener.projectionEnabled(DefaultJavaFoldingStructureProvider.java:712)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:475)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:523)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.setVisibleDocument(JavaSourceViewer.java:639)
	at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2891)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:683)
	at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(ProjectionViewer.java:368)
	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:633)
	at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:3989)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4192)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:262)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1526)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.internalDoSetInput(JavaEditor.java:2567)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.doSetInput(JavaEditor.java:2554)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSetInput(CompilationUnitEditor.java:1410)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInputWithNotify(AbstractTextEditor.java:4248)
	at org.eclipse.ui.texteditor.AbstractTextEditor.setInput(AbstractTextEditor.java:4268)
	at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.showInEditor(JavaSearchEditorOpener.java:99)
	at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.showWithReuse(JavaSearchEditorOpener.java:78)
	at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.openElement(JavaSearchEditorOpener.java:43)
	at org.eclipse.jdt.internal.ui.search.JavaSearchEditorOpener.openMatch(JavaSearchEditorOpener.java:55)
	at org.eclipse.jdt.internal.ui.search.JavaSearchResultPage.showMatch(JavaSearchResultPage.java:197)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage$3.run(AbstractTextSearchViewPage.java:938)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.showMatch(AbstractTextSearchViewPage.java:941)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.showCurrentMatch(AbstractTextSearchViewPage.java:1006)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.gotoNextMatch(AbstractTextSearchViewPage.java:971)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage.handleOpen(AbstractTextSearchViewPage.java:1428)
	at org.eclipse.jdt.internal.ui.search.JavaSearchResultPage.handleOpen(JavaSearchResultPage.java:567)
	at org.eclipse.search.ui.text.AbstractTextSearchViewPage$2.open(AbstractTextSearchViewPage.java:765)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:799)

@iloveeclipse iloveeclipse reopened this Jan 14, 2025
@iloveeclipse
Copy link
Member Author

I'm using latest SDK 4.35.0.I20250113-1800

@iloveeclipse
Copy link
Member Author

@Christopher-Hermann : could you please look at the problem?

@Christopher-Hermann
Copy link
Contributor

Yes, I will have a look. However, it may take a few days due

@Christopher-Hermann
Copy link
Contributor

To reproduce the IllegalArgumentException:

  1. Open String#replace
  2. Search all references in the workspace
  3. Open jdk.jdi > com.sun.tools.jdi > JNITypeParser > nextTypeName()
  4. Open jdk.jfr > jdk.jfr.internal.instrument > ContructorWriter > ConstructorWriter(Class<?>, boolean)

Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Jan 17, 2025
Sticky lines should be shown when the file is opened via search view.

Fixes eclipse-platform#2678
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Jan 17, 2025
The search view with "reuse editor" enabled sets new source code in the existing editor and fires a extPresentation change event. In this call, it can happen that the sticky line number exceeds the amount of line in the new source code. In general this is not a problem since the sticky lines will be recalculated afterwards, but to avoid IllegalArgumentException it is checked for this case.

Fixes eclipse-platform#2678
@Christopher-Hermann
Copy link
Contributor

@iloveeclipse Thanks for spotting this issues. I created two PRs to fix it.

iloveeclipse pushed a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Jan 17, 2025
The search view with "reuse editor" enabled sets new source code in the existing editor and fires a extPresentation change event. In this call, it can happen that the sticky line number exceeds the amount of line in the new source code. In general this is not a problem since the sticky lines will be recalculated afterwards, but to avoid IllegalArgumentException it is checked for this case.

Fixes eclipse-platform#2678
Christopher-Hermann added a commit to Christopher-Hermann/eclipse.platform.ui that referenced this issue Jan 17, 2025
The search view with "reuse editor" enabled sets new source code in the existing editor and fires a extPresentation change event. In this call, it can happen that the sticky line number exceeds the amount of line in the new source code. In general this is not a problem since the sticky lines will be recalculated afterwards, but to avoid IllegalArgumentException it is checked for this case.

Fixes eclipse-platform#2678
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment