-
Notifications
You must be signed in to change notification settings - Fork 408
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
[Feature Request] Provide method for converting callstack entry to location #1202
Comments
@jdneo @yaohaizh @testforstephen you guys might want to look into this, as I'm sure this could be useful for the vscode java debugger |
The java debugger has provided our own source look up logic, probably it's able to port back to jdt.ls. |
@testforstephen can you point me to this logic? |
I'm working on this. |
Seems reasonable. Eclipse does something pretty similar in the Java Stacktrace Console . You can also see some of the code in JavaStackTraceHyperlink.java. Though it's in jdt.debug.ui/jdt.debug it could still serve as a guide. |
Have a look at JavaStackTraceHyperlink.java, it will search the type with search engine first, if no result, then fall back to resolveSourceElement, which is equivalent to search in the source containers used by @jdneo PR. One benefit of using search engine is it's more efficient since it's based on indexer. But there are some cases search engine doesn't support well, such as anonymous class and class name with $. Source container approach can cover more corner cases. Maybe we can also combine these two approaches together. |
In that case, I would be fine with just submitting the current "source container" logic and add the SearchEngine logic at a later point (if performance demands it). |
This will allow the clients to make the links in the output clickable:
E. g.
I think that it might be possible to implement this on client-side by parsing the message and then using workspace/symbols but maybe it makes more sense to implement that on the server.
The text was updated successfully, but these errors were encountered: