VirtualFile (PsiFile psiFile) { if (psiFile == null) return null; psiFile = psiFile.getOriginalFile(); VirtualFile virtualFile = psiFile.getVirtualFile(); if (virtualFile instanceof LightVirtualFile) { virtualFile = ObjectUtils.chooseNotNull(psiFile.getUserData(MavenGroovyPomCompletionContributor.ORIGINAL_POM_FILE), virtualFile); } return virtualFile; }