changes to upgrade lsp4j.version to 1.0.0#1781
Conversation
Method signatures updated
|
Thanks. Have you tested if it is working with Eclipse IDE and vscode-xml? |
|
And please note that if we merge this PR, we need also take care of https://github.com/eclipse-lemminx/lemminx-maven |
Tested in vscode-xml Screen.Recording.2026-06-04.at.6.08.51.PM.movTested in wildwebdeveloper Screen.Recording.2026-06-04.at.6.24.52.PM.mov |
|
Great! The last part is to test it with lemminx maven |
Created an issue in lemminx-maven. eclipse-lemminx/lemminx-maven#665 |
|
|
||
| private static final Logger LOGGER = Logger.getLogger(TextEditUtils.class.getName()); | ||
|
|
||
| /** |
There was a problem hiding this comment.
I noticed that all code of this utility class is not linked to to DOM lemminx code except for
public static TextDocumentEdit creatTextDocumentEdit(DOMDocument document, List<TextEdit> textEdits) {
I suggest that you:
- move TextEditUtils to org/eclipse/commons package.
- remove
public static TextDocumentEdit creatTextDocumentEdit(DOMDocument document, List<TextEdit> textEdits) { - create a new method
public static TextDocumentEdit creatTextDocumentEdit(TextDocument document, List<TextEdit> textEdits) {and use document.getUri() -isntead of document.getDocumentUri() - create DOMTextEditUtils in this utils package with a signle method
public static TextDocumentEdit creatTextDocumentEdit(DOMDocument document, List<TextEdit> textEdits) {which will call TextEditUtils with document.getTextDocument.
and in lemminx maven, rename TextEditUtils to DOMTextEditUtils in https://github.com/eclipse-lemminx/lemminx-maven/blob/e85154e3616404a128e07209b3a6efedaefdb41b/lemminx-maven/src/test/java/org/eclipse/lemminx/extensions/maven/participants/rename/MavenPropertyRenameParticipantTest.java#L13
There was a problem hiding this comment.
Done.. Deprecated TextEditUtils in lemminx/utils/TextEditUtils
Created new TextEditUtils in commons and added DOMTextEditUtils as well
Created org.eclipse.lemminx.commons.DiagnosticUtils, updated some tests to use these Created org.eclipse.lemminx.commons.TextEditUtils Created org.eclipse.lemminx.utils.DOMTextEditUtils
|
|
||
| // Insert the expected content. | ||
| try { | ||
| org.eclipse.lsp4j.Position endPos = textDocument.positionAt(to); |
| } | ||
| } | ||
| return leftLimit; | ||
| return org.eclipse.lemminx.commons.TextEditUtils.adjustOffsetWithLeftWhitespaces(leftLimit, to, text); |
|
Thanks so much @venmanyarun ! |
Related to #1780
Method signatures updated
also found some invalid constructors for TextEdit and TextDocumentContentChangeEvent