MavenProject (PsiElement element) { VirtualFile virtualFile = MavenDomUtil.getVirtualFile(element); if (virtualFile == null) return null; MavenProjectsManager manager = MavenProjectsManager.getInstance(element.getProject()); return manager.findProject(virtualFile); }