boolean (MavenId id, MavenIndicesManager manager, ConvertContext context) { if (StringUtil.isEmpty(id.getGroupId()) || StringUtil.isEmpty(id.getArtifactId())) return false; MavenProjectsManager projectsManager = MavenProjectsManager.getInstance(context.getProject()); if (StringUtil.isNotEmpty(id.getVersion())) { if (projectsManager.findProject(id) != null) return true; } else { for (MavenProject project : projectsManager.getProjects()) { MavenId mavenId = project.getMavenId(); if (id.getGroupId().equals(mavenId.getGroupId()) && id.getArtifactId().equals(mavenId.getArtifactId())) return true; } } // Check if artifact was found on importing. VirtualFile projectFile = getMavenProjectFile(context); MavenProject mavenProject = projectFile == null ? null : projectsManager.findProject(projectFile); if (mavenProject != null) { for (MavenArtifact artifact : mavenProject.findDependencies(id.getGroupId(), id.getArtifactId())) { if (MavenArtifactUtilKt.resolved(artifact)) { return true; } } } return manager.hasLocalArtifactId(id.getGroupId(), id.getArtifactId()); }