Organize hover responses in a predictable way for ease of use #390
Description
I have a file called microprofile-config.properties
and it contains
injected.value2=Injected value2
value=lookup value
com.example.demo.client.Service/mp-rest/url=http://localhost:9081/data/client/service
serviceb.url=http://localhost:9081/data/protected
When I hover over the word "Service" I can get two different results in the IDE. Two different language servers respond and it seems random which result is displayed first. Sometimes an empty page is displayed as page 1 and other content on page 2.
Sometimes the page with all the content is first and the blank one is second.
I think the responses should be sorted in some deterministic way so the user can rely on seeing things a certain way. Even if it is as simple as alphabetical order by name of language server it should be consistent over a reasonable period of time. Obviously as language servers start and stop the order could change but it should be consistent while a certain collection of LS are running.
Also, one language server responded with
[Trace - 16:48:07] Received response 'textDocument/hover - (9)' in 6ms.
Result: {
"contents": {
"kind": "plaintext",
"value": ""
}
}
Fixed I think we should check value
for null or empty string and not even return a message in that case.