sdedic opened a new pull request #3735:
URL: https://github.com/apache/netbeans/pull/3735


   This PR adds support for `textDocument/prepareCallHierarchy`, 
`callHierarchy/incomingCalls` and `callHierarchy/outgoingCalls` messages (see 
[LSP Protocol Spec 
3.16](https://microsoft.github.io/language-server-protocol/specification#textDocument_prepareCallHierarchy)
 ).
   
   I decided to **reuse** `StructureElement` invented as a part of Outline 
support: elements reported by the Call Hierarchy have exactly the same meaning, 
plus the `uri`, which is implicit in the Outline. I have added `file` property 
to `StructureElement` and relevant `StructureProvider.Builder` method.
   
   In order to share code between Java Editor module (that implements Outline) 
and Java Refactoring module (which implements the Call Hierarchy, but does not 
export it through any API), I've introduced helper methods for LSP into 
`java.sourceui` module: `lsp.api` module represents an abstract UI, after all, 
so adapting Java-specific structures to abstract ones seemed reasonable. This 
API allows to move Java Element -> StructureElement conversion to 
`java.sourceui`, and can be called from both `java.editor` and 
`java.refactoring`.
   
   The other reason to choose `java.sourceui` for introducing the API is that 
the `ElementOpen` implementation is here, and can be adjusted to support 
StructureElement creation without exposing additional APIs.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to