Absolute Path of PsiClass
How would I go about finding the absolute path of a PsiClass? I see that there is a getContainingFile method, but I'm not seeing any way to get an absolute path. I'm sure I'm just missing something veyr simple.
Thanks!
Please sign in to leave a comment.
VirtualFile file = yourPsiClass.getContainingFile().getOriginalFile().getVirtualFile();
if (file != null && file.isInLocalFileSystem()) {
return file.getCanonicalPath();
}