VirtualFile (PsiFile psiFile) { VirtualFile file = psiFile.getViewProvider().getVirtualFile(); if (file instanceof LightVirtualFile) { file = ((LightVirtualFile)file).getOriginalFile(); } return file; }