String (@Nullable MavenDomDependency dependency) { if (dependency != null) { MavenDomProjectModel model = dependency.getParentOfType(MavenDomProjectModel.class, false); if (model != null) { String name = model.getName().getStringValue(); return StringUtil.isEmptyOrSpaces(name) ? model.getArtifactId().getStringValue() : name; } } return null; }