boolean (Object o) { if (this == o) return true; if (!(o instanceof LocalSearchScope)) return false; LocalSearchScope other = (LocalSearchScope)o; if (other.myIgnoreInjectedPsi != myIgnoreInjectedPsi) return false; if (other.myScope.length != myScope.length) return false; if (!Comparing.strEqual(myDisplayName, other.myDisplayName)) { return false; // scopes like "Current file" and "Changed files" should be different even if empty } for (PsiElement scopeElement : myScope) { for (PsiElement thatScopeElement : other.myScope) { if (!Comparing.equal(scopeElement, thatScopeElement)) return false; } } return true; }