Determining whether a PsiClass is from a library or not.
What's the best way to determine whether a given PsiClass comes from a library or is a source path? I had thought that it was PsiClass.isPhysical(), but evidently that doesn't do what I thought.
--Dave Griffith
Please sign in to leave a comment.
Dave Griffith wrote:
Use getContainingFile().getVirtualFile() to arrive at a virtual file
the class is in. Henceforth the power of ProjectFileIndex and
ModuleFileIndex is at your disposal.
Friendly,
Dmitry
--
Dmitry Lomov
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"