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

Comments throws off diagnostic (cvc-complex-type.2.3) mark onto the wrong location in server.xml #163

Closed
dshimo opened this issue Feb 28, 2023 · 12 comments

Comments

@dshimo
Copy link
Contributor

dshimo commented Feb 28, 2023

The expected behavior is for the diagnostics/markers to appear on the text. This behavior is also observed in pom.xml
image

When a comment is in between the text and the server element, the diagnostic marks the comment on line 4 rather than line 12.
image
This issue does not seem to occur on pom.xml

Steps to recreate:

  1. Create a server.xml with a server element
  2. Put a comment with content into it
  3. Type any text anywhere in the server element

This bug appears in IntelliJ and VSCode
image

@evie-lau
Copy link
Member

evie-lau commented Feb 28, 2023

Reproduced the same issue in a pom.xml file in VS Code without our language server installed via any plugins - only XML by redhat should be affecting XML files.
image

@cherylking
Copy link
Member

This may be an error in LemMinX itself since LCLS only does diagnostics for certain elements (featureManager/feature and include). All other elements are validate against the schema with LemMinX afaik.

@cherylking
Copy link
Member

Reproduced the same issue in a pom.xml file in VS Code.

So that means it is not a LCLS issue, correct?

@kathrynkodama
Copy link
Contributor

I've opened eclipse/lemminx#1495

@angelozerr
Copy link
Contributor

We will invedtigate the problem on lemminx, but when you say that you have the problem with IJ, it means that you have integrated lemminx in IJ?

If the answer is yes, could you give me a link to the repository which does that. Thanks!

@kathrynkodama
Copy link
Contributor

@angelozerr yes, in Liberty Tools for IntelliJ we are running LemMinX with the Liberty LS ext: https:/OpenLiberty/liberty-tools-intellij

@angelozerr
Copy link
Contributor

Wow thats great! Thanks @kathrynkodama for your answer.

@kathrynkodama
Copy link
Contributor

kathrynkodama commented Mar 2, 2023

With eclipse/lemminx#1495 fixed, lemminx-liberty, LT for IntelliJ and LT for Eclipse will have to update to the latest LemMinX version containing the fix.

@cherylking
Copy link
Member

@kathrynkodama Any outlook on when that next version of Eclipse LemMinX is expected?

@angelozerr
Copy link
Contributor

For the moment it is not planned, but we would like to create 1.0.0 eclipse/lemminx#1470 which will break API participant. Please follow this issue.

@cherylking
Copy link
Member

Release 0.25.0 was released today - https:/eclipse/lemminx/blob/main/CHANGELOG.md

@cherylking
Copy link
Member

This is fixed in the 2.0-snapshot branch which will be merged into the main branch once the 1.0 release is published. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants