-
Notifications
You must be signed in to change notification settings - Fork 93
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
Extension completion should use node text range #837
Extension completion should use node text range #837
Conversation
This probably needs a test. I can confirm however that it fixes the issue related to eclipse-lemminx/lemminx-maven#127 (I removed the workaround but kept the test from that PR) |
Yes please. |
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.
For me it seems OK, but we need test to check that.
@angelozerr should the test just extend |
Fix eclipse-lemminx#723 Signed-off-by: Andrew Obuchowicz <[email protected]>
763ed34
to
f74c30e
Compare
@@ -753,6 +754,18 @@ private void collectInsideContent(CompletionRequest request, CompletionResponse | |||
collectCloseTagSuggestions(tagNameRange, true, true, false, request, response); | |||
} | |||
// Participant completion on XML content | |||
if (request.getNode() instanceof DOMElement) { |
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.
I think this section about DOMElement probably should be removed, I don't think it actually addresses the issue that was reported (even though it made downstream lemminx-maven workaround tests pass..).
The original bug was about triggering a completion on text, not on a node?
|
||
@Test | ||
private void testHTMLOnXMLContentCompletion() throws BadLocationException { | ||
// TODO: This isin't getting called by Junit |
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.
I don't know why I couldn't get my test to be called :P Is there anything I'm missing to get it called? For now I put the test code in testHTMLAttributeValueCompletion
so that it'd be called on CI
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.
needs to be public
This PR is replaced with #866 |
Fix #723
Signed-off-by: Andrew Obuchowicz [email protected]