-
Notifications
You must be signed in to change notification settings - Fork 92
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
Fix error range for EntityNotDeclared #531
Fix error range for EntityNotDeclared #531
Conversation
Could we underline both the starting |
...xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/participants/DTDErrorCode.java
Outdated
Show resolved
Hide resolved
int end = start + name.length(); | ||
Position startPosition = new Position(line, start); | ||
Position endPosition = new Position(line, end); | ||
return new Range(startPosition, endPosition); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note for later: we should have a public static Range newRange(line, start, end)
utility method somewhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this change take place in a different PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XMLPositionUtility is the best place to add this method
Signed-off-by: David Kwon <[email protected]>
XMLPositionUtility is the best place to add this method |
Fixes the error range mentioned in #518
I am using the name of the undeclared entity, (in this case, "nbsp"), looking for the substring " " in the line provided by xerces to determine the error range.
Signed-off-by: David Kwon [email protected]