KT-3620 Don't auto-import js.* and remove in optimize imports

KT-3620 Fixed
This commit is contained in:
Nikolay Krasko
2013-05-15 14:03:17 +04:00
parent f33792a567
commit ddb7b54eee
9 changed files with 76 additions and 52 deletions
@@ -143,6 +143,16 @@ public final class QualifiedNamesUtil {
return isImported(alreadyImported, newImport.fqnPart());
}
public static boolean isImported(@NotNull Iterable<ImportPath> imports, @NotNull ImportPath newImport) {
for (ImportPath alreadyImported : imports) {
if (isImported(alreadyImported, newImport)) {
return true;
}
}
return false;
}
public static boolean isValidJavaFqName(@Nullable String qualifiedName) {
if (qualifiedName == null) return false;