@Nullable
public static ClSyntheticNamespace getNamespace(@NotNull String fqn, @NotNull final Project project) {
final Collection<ClNs> nsWithPrefix = StubIndex.getInstance().get(ClojureNsNameIndex.KEY, fqn, project, GlobalSearchScope.allScope(project));
if (!nsWithPrefix.isEmpty()) {
final ClNs ns = nsWithPrefix.iterator().next();
final String nsName = ns.getName();
assert nsName != null;
final String synthName = nsName.equals(fqn) ? nsName : fqn;
final String refName = StringUtil.getShortName(synthName);
ClNs navigationElement = null;
for (ClNs clNs : nsWithPrefix) {
if (fqn.equals(clNs.getName())) {
navigationElement = clNs;
}
}