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

Property location and jump to location in mouse over popup #370

Closed
Kiiv opened this issue Feb 23, 2023 · 4 comments · Fixed by #374
Closed

Property location and jump to location in mouse over popup #370

Kiiv opened this issue Feb 23, 2023 · 4 comments · Fixed by #374
Labels
enhancement New feature or request

Comments

@Kiiv
Copy link

Kiiv commented Feb 23, 2023

In the old pom editor, the popup on a property mouse hover show the declaration location and a link "Jump to location" allowing to jump directly in the pom where the property is declared.

Screenshot

Is it possible to have the same behaviour ?

@AObuchow
Copy link
Member

I haven't researched into this much, but the Language Server Protocol (which LemMinX-maven uses) supports the Goto definition request, which could be used for this use case. LSP4E (Eclipse's implementation of the Language Server Protocol) seems to support Goto definition.

So from an LSP-point of view it should be possible.

However, from my understanding, LemMinX-Maven uses the Maven Project model in order to get the project properties.

There doesn't seem to be any API for the Maven Project to find out where these properties are declared. So some work would probably have to be done by LemMinX-Maven to manually scan the project and find out where properties are declared. I'm not sure how feasible this is to do (could LemMinX-Maven perform this scan upon loading up the project, and re-scan periodically when the project is modified? Could the workspace diagnostics request maybe be used for this, and does LSP4E implement it?)

@AObuchow AObuchow added the enhancement New feature or request label Feb 23, 2023
@mickaelistria
Copy link
Contributor

definition/F3 works for properties (IIRC you implemented years ago @AObuchow ;).

@mickaelistria
Copy link
Contributor

This can be achieved without particular action, we can (and should) simply put links of the form file://path/to/file#L34,1-L35,3 in the documentation and those should properly open the right file and select the right range. cc @vrubezhny

@vrubezhny
Copy link
Contributor

@mickaelistria I'll take care if no other contributes a fix earlier.

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

Successfully merging a pull request may close this issue.

4 participants