MavenId (PsiFile psiFile) { MavenDomProjectModel model = getMavenDomModel(psiFile, MavenDomProjectModel.class); if (model == null) { return new MavenId(null, null, null); } String groupId = model.getGroupId().getStringValue(); String artifactId = model.getArtifactId().getStringValue(); String version = model.getVersion().getStringValue(); if (groupId == null) { groupId = model.getMavenParent().getGroupId().getStringValue(); } if (version == null) { version = model.getMavenParent().getVersion().getStringValue(); } return new MavenId(groupId, artifactId, version); }