use of org.jetbrains.plugins.groovy.lang.resolve.GrImportContributor in project intellij-community by JetBrains.
the class GroovyImportHelper method getImplicitlyImportedPackages.
public static LinkedHashSet<String> getImplicitlyImportedPackages(@NotNull GroovyFile file) {
final LinkedHashSet<String> result = new LinkedHashSet<>();
ContainerUtil.addAll(result, GroovyFileBase.IMPLICITLY_IMPORTED_PACKAGES);
for (GrImportContributor contributor : GrImportContributor.EP_NAME.getExtensions()) {
result.addAll(ContainerUtil.mapNotNull(contributor.getImports(file), i -> i.getType() == ImportType.STAR ? i.getName() : null));
}
return result;
}
Aggregations