public static String getDescriptor(SearchScope scope) {
    if (scope instanceof ProjectScopeImpl || scope == null) {
      return "";
    }
    else if (scope instanceof ModuleWithDependenciesScope) {
      return ((ModuleWithDependenciesScope)scope).getModule().getName();
    }
    else if (scope instanceof GlobalSearchScopesCore.DirectoryScope directoryScope) {
      final String url = directoryScope.getDirectory().getPresentableUrl();
      return directoryScope.isWithSubdirectories() ? "*" + url : url;
    }
    else {
      return scope.getDisplayName();
    }
  }
public static String getDescriptor(SearchScope scope)