PsiElement (@SystemIndependent String fileRelativePath, String propertyValue) { VirtualFile baseDir = VfsUtil.findFile(MavenUtil.getBaseDir(myMavenProject.getDirectoryFile()), false); if (baseDir != null) { VirtualFile mavenConfigFile = baseDir.findFileByRelativePath(fileRelativePath); if (mavenConfigFile != null) { PsiFile psiFile = PsiManager.getInstance(myProject).findFile(mavenConfigFile); if (psiFile != null && psiFile.getChildren().length > 0) { return new MavenPsiElementWrapper(psiFile.getFirstChild(), psiFile) { @Override public String getName() { return propertyValue; } }; } } } return myElement; }