}
List<NamedScope> allScopes = new ArrayList<NamedScope>(scopes.values());
for (int i = 0; i < allScopes.size(); i++)
{
final NamedScope scope = allScopes.get(i);
String name = scope.getName();
if (name.equals(getSubId()))
{
allScopes.set(i, allScopes.get(0));
allScopes.set(0, scope);
break;
}
}
for (NamedScope scope : allScopes)
{
String name = scope.getName();
PackageSet packageSet = scope.getValue();
if (packageSet == null)
{
continue;
}
if (changeView(packageSet, ((PsiElement) element), psiFile, name, requestFocus))