mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-187611: add ability to compare scopes based on change lists
It is needed for filtering out automatically generated scopes in the Setting dialog. See the ScopeChooserConfigurable.isPredefinedScope method for details.
This commit is contained in:
@@ -21,4 +21,19 @@ public final class ChangeListScope extends FilteredNamedScope {
|
||||
public ChangeListScope(@NotNull ChangeList list) {
|
||||
super(list.getName(), AllIcons.Toolwindows.ToolWindowChanges, 0, getAfterRevisionsFiles(list.getChanges().stream()).collect(toList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getName().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (object == this) return true;
|
||||
if (object instanceof ChangeListScope) {
|
||||
ChangeListScope scope = (ChangeListScope)object;
|
||||
return getName().equals(scope.getName());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user