@NotNull public GlobalSearchScope intersectWith(@NotNull final GlobalSearchScope scope) { if (scope.isSearchOutsideRootModel()) { return super.intersectWith(scope); } return scope; }
@NotNull public GlobalSearchScope uniteWith(@NotNull final GlobalSearchScope scope) { if (scope.isSearchOutsideRootModel()) { return super.uniteWith(scope); } return this; }