[Analysis API] optimize KotlinPackageProvider.getSubPackageFqNames

Previously, we queried heavy kotlin package provider two times which affected performance
Now it's being queries only a single time

Also, the commit introduces separation for KotlinPackageProvider between kotlin and platform-specific packages

^KTIJ-24640
This commit is contained in:
Ilya Kirillov
2023-02-24 13:50:27 +01:00
committed by Space Team
parent c940eb25b0
commit 4944b454c5
12 changed files with 177 additions and 42 deletions
@@ -74,6 +74,11 @@ public final class Name implements Comparable<Name> {
return true;
}
public static @Nullable Name identifierIfValid(@NotNull String name) {
if (!isValidIdentifier(name)) return null;
return identifier(name);
}
@NotNull
public static Name special(@NotNull String name) {
if (!name.startsWith("<")) {