redhat-developer / vscode-java

Java Language Support for Visual Studio Code
Eclipse Public License 2.0
2.07k stars 430 forks source link

APIs for querying source tree for inheritance or implementation of interface X. #1609

Open anixon604 opened 4 years ago

anixon604 commented 4 years ago

Hi, I'm developing an extension and looking to include the feature of:

Are there APIs or functionalities included in vscode-java that could accomplish this task? Any help would be appreciated. Thanks

Environment
snjeza commented 4 years ago

@anixon604 you can review https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/ImplementationsHandler.java and/or https://github.com/eclipse/eclipse.jdt.core/blob/master/org.eclipse.jdt.core/model/org/eclipse/jdt/core/ITypeHierarchy.java

badsyntax commented 4 years ago

@snjeza is this exposed through the language server or extension apis?

snjeza commented 4 years ago

@badsyntax It is the Eclipse JDT API - https://www.eclipse.org/jdt/core/ that is a part of the Java LS - https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/META-INF/MANIFEST.MF#L15