You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The range of a marker in LSP is defined relative to the line, while in eclipse.platform.text it is relative to the start of the document.
This causes bad performance if the files are stored remotely (See eclipse-lsp4e/lsp4e#160), as creating the markers with the correct offset requires fetching the text from the remove endpoint and recalculating all offsets. Specially fetching the text is quite expensive for the remove files, so if many marker exits (we have +10000 in our workspaces), the recalculation creates a big overhead.
Would it be possible to subclass org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel.createPositionFromMarker(IMarker) to use offsets relative to the line and use that subclass to show the markers in the org.eclipse.ui.internal.genericeditor.ExtensionBasedTextEditor if a newer version of LSP4E is used? This way we would avoid the offset recalculation.
If you think that is doable, we could work on it, on eclipse.platform.text and on the LSP4E project.
Regards
The text was updated successfully, but these errors were encountered:
rubenporras
changed the title
Marker offsets mismatch between text editor and LSP
Question: Marker offsets mismatch between text editor and LSP
Jun 28, 2022
Fixed test that didn't created Display but disposed it.
Fixed tests that didn't closed created shells or assumed wrong number of
shells after creation of new.
See eclipse-platform/eclipse.platform.ui#50
laeubi
transferred this issue from eclipse-platform/eclipse.platform.text
Jun 28, 2023
Hi,
The range of a marker in LSP is defined relative to the line, while in eclipse.platform.text it is relative to the start of the document.
This causes bad performance if the files are stored remotely (See eclipse-lsp4e/lsp4e#160), as creating the markers with the correct offset requires fetching the text from the remove endpoint and recalculating all offsets. Specially fetching the text is quite expensive for the remove files, so if many marker exits (we have +10000 in our workspaces), the recalculation creates a big overhead.
Would it be possible to subclass org.eclipse.ui.texteditor.AbstractMarkerAnnotationModel.createPositionFromMarker(IMarker) to use offsets relative to the line and use that subclass to show the markers in the org.eclipse.ui.internal.genericeditor.ExtensionBasedTextEditor if a newer version of LSP4E is used? This way we would avoid the offset recalculation.
If you think that is doable, we could work on it, on eclipse.platform.text and on the LSP4E project.
Regards
The text was updated successfully, but these errors were encountered: