-
Notifications
You must be signed in to change notification settings - Fork 13
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
Provide hover/completion support for property references in server.xml #68
Comments
Good Liberty doc for reference |
I think we should go ahead and provide hover support too. We already have to find all the variables, why not resolve their values when possible and display them? Update: I am flip flopping on hover support. If we cannot guarantee that our processing of the config files match that of Liberty itself, I think it is misleading to provide hover support displaying variable/property reference values. Perhaps we can simply list which file(s) we find that var/prop defined in with clickable links to navigate to them instead? And if we find the var/prop nowhere in the project config files, then display a diagnostic? |
@evie-lau and I have discussed several strategies for tackling this feature. Firstly, we've decided for the MVP to build this feature into LCLS as a starting point. We reasoned it would be simpler to implement the logic in LCLS and then additionally provide xml support, versus managing the logic across both language servers. We built a proof of concept that confirms to us that the IDE features, such as diagnostic and hover, aren't negatively impacted by this redundancy in file watching. The implementation for completion would minimally require only a couple of things: LCLS would require new context awareness for completion triggered within ${}, and then a way to obtain the map of variables which we can obtain from ci.common. Hover has room for interpretation. As Cheryl has voiced, we cannot guarantee that the values we process matches Liberty's. On one end, we complete ci.common's processing to match Liberty's behavior and then maybe only provide support on built projects. LCLS will also have to implement tracking 'included' server configs to recognize enabled or disabled sources. On the other end, we do nothing to avoid displaying misinformation. Displaying a list of variables and their sources provides convenience, but ultimately leaves the responsibility of managing variables to the user. A concern all paths will have to consider is how often do we refresh our variables? Will a letter change make us reprocess everything? Hover and completion can be computed lazily, but if diagnostics track variables vigilantly we won't see a benefit. |
We're sticking through with the decision of providing full feature support for built servers while providing a message or diagnostic to warn users that they may not receive all features until they build their server. There may be an opportunity to associate a quick fix with this diagnostic to build the project for them, but would require a little more research. Today's discussion brought in LMP/LGP more attention. The main highlight centered around utilizing the |
2024-01-10 DXDI UPDATE It took me most of the call and the next day's to really catch up. I won't bother trying to summarize (since the last comment from @dshimo already did). Let me just tack on a few questions and observations
|
|
A few notes as we pick this back up:
|
When a property or variable is referenced in server.xml like ${xyz}, provide completion support for defined properties/variables. That should include any variable defined in server.xml, as well as the bootstrap.properties and server.env files. No hover support will be provided.
This is a future enhancement and not part of the MVP. Slide 28 of UFO.
The text was updated successfully, but these errors were encountered: