NamedScope (@NotNull String name) { if (myProject.isDefault()) return null; final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject); if (ChangeListScope.ALL_CHANGED_FILES_SCOPE_NAME.equals(name)) { return new ChangeListScope(changeListManager); } if (ChangesUtil.hasMeaningfulChangelists(myProject)) { final LocalChangeList changeList = changeListManager.findChangeList(name); if (changeList != null) { return new ChangeListScope(changeListManager, changeList.getName()); } } return null; }