How to find the project library that a PsiClass is provided from.

Answered

For a plugin i'm working on i want to find the project library which provides the given PsiClass. Is there a API to find this information ?

1 comment
Comment actions Permalink

com.intellij.openapi.roots.ProjectFileIndex offers this information when you query psiClass#getContainingFile#getVirtualFile, see utility method com.intellij.openapi.roots.libraries.LibraryUtil#findLibraryEntry for sample usage.

0

Please sign in to leave a comment.