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!

1 comment

    VirtualFile file = yourPsiClass.getContainingFile().getOriginalFile().getVirtualFile();
    if (file != null && file.isInLocalFileSystem()) {
      return file.getCanonicalPath();
    }

0

Please sign in to leave a comment.