This commit is contained in:
Eugene Vigdorchik
2006-04-28 12:00:20 +04:00
parent 33875925fa
commit dc4dcb92a9

View File

@@ -1035,31 +1035,14 @@ public final class PsiUtil {
myNextObtained = true;
return;
}
if (myCurrentOwner.hasModifierProperty(PsiModifier.STATIC)) {
if (myCurrentOwner.hasModifierProperty(PsiModifier.STATIC) || myCurrentOwner.getContainingClass() == null) {
myNext = null;
myNextObtained = true;
return;
}
final PsiClass containingClass = myCurrentOwner.getContainingClass();
if (containingClass == null) {
final PsiTypeParameterListOwner owner = PsiTreeUtil.getContextOfType(myCurrentOwner, PsiTypeParameterListOwner.class, true);
if (owner != null) {
myCurrentOwner = owner;
obtainCurrentParams(myCurrentOwner);
nextElement();
}
else {
myNext = null;
myNextObtained = true;
return;
}
}
else {
myCurrentOwner = containingClass;
obtainCurrentParams(myCurrentOwner);
nextElement();
}
myCurrentOwner = myCurrentOwner.getContainingClass();
obtainCurrentParams(myCurrentOwner);
nextElement();
}
}