-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add support for clickableXSD CodeLens
#490
Comments
For reference, here's the payload returned by jdt.ls for a similar request (see the [Trace - 12:26:28 PM] Received response 'codeLens/resolve - (176)' in 66ms.
Result: {
"range": {
"start": {
"line": 7,
"character": 21
},
"end": {
"line": 7,
"character": 25
}
},
"command": {
"title": "5 references",
"command": "java.show.references",
"arguments": [
"file:///Users/fbricon/Downloads/sample-resources/foo/bar/Hello.java",
{
"line": 7,
"character": 21
},
[
{
"uri": "file:///Users/fbricon/Downloads/sample-resources/foo/bar/Hello.java",
"range": {
"start": {
"line": 19,
"character": 4
},
"end": {
"line": 19,
"character": 14
}
}
},
{
"uri": "file:///Users/fbricon/Downloads/sample-resources/foo/bar/Hello.java",
"range": {
"start": {
"line": 20,
"character": 4
},
"end": {
"line": 20,
"character": 14
}
}
},
{
"uri": "file:///Users/fbricon/Downloads/sample-resources/foo/bar/Hello.java",
"range": {
"start": {
"line": 25,
"character": 4
},
"end": {
"line": 25,
"character": 14
}
}
},
{
"uri": "file:///Users/fbricon/Downloads/sample-resources/foo/bar/Hello.java",
"range": {
"start": {
"line": 26,
"character": 4
},
"end": {
"line": 26,
"character": 14
}
}
},
{
"uri": "file:///Users/fbricon/Downloads/sample-resources/foo/bar/Hello.java",
"range": {
"start": {
"line": 27,
"character": 4
},
"end": {
"line": 27,
"character": 14
}
}
}
]
]
},
"data": [
"file:///Users/fbricon/Downloads/sample-resources/foo/bar/Hello.java",
{
"line": 7,
"character": 21
},
"references"
]
} |
@fbricon I think we don't need in our case doing that in resolve method since command title is updated in codeLens services. Indeed the references computing for one node requires to walk inside of all nodes of DOMDocument. So the performance to find references for one node or for several nodes is the same. In other words, we need just to update Command with the proper command in https://github.com/angelozerr/lsp4xml/blob/master/org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/xsd/participants/XSDCodeLensParticipant.java#L40 |
codeLens/resolve
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix eclipse/lemminx#490 This PR bind the XSD CodeLens references command to a function which opens the vscode references.
Fix eclipse/lemminx#490 This PR bind the XSD CodeLens references command to a function which opens the vscode references.
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix eclipse/lemminx#490 This PR bind the XSD CodeLens references command to a function which opens the vscode references.
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix eclipse/lemminx#490 This PR bind the XSD CodeLens references command to a function which opens the vscode references.
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix eclipse/lemminx#490 This PR bind the XSD CodeLens references command to a function which opens the vscode references.
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix #490 This PR set XSD references CodeLens Command with "xml.show.references" and uri, position as arguments. Signed-off-by: azerr <azerr@redhat.com>
Fix eclipse/lemminx#490 This PR bind the XSD CodeLens references command to a function which opens the vscode references.
XSD CodeLens
references should be clickable
XSD CodeLens
references should be clickableXSD CodeLens
I find that textDocument/codelens (#55) provides very little value without the ability to open reference links on the client side, that'd be computed via a call to
codeLens/resolve
.The main issue so far is there's no standard way to invoke an "open references" command (that I know of). So, clients would have to implement a custom "xml.show.references" command (similar to vscode-java's own java.show.references.
Clients would need to advertise their support for that feature, in the initialization options.
The text was updated successfully, but these errors were encountered: