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.


1 comment
Comment actions Permalink

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


Please sign in to leave a comment.