@Nullable
  public static GlobPatternDescriptor convert(@NotNull NamedScopeDescriptor descriptor) {
    String pattern = descriptor.getPattern();
    List<String> globPatterns = new ArrayList<>();
    if (pattern != null) {
      String[] orPatterns = pattern.split(OR_SEPARATOR);
      for (String orPattern : orPatterns) {
        if (!StringUtil.isEmpty(orPattern)) {
          String filePattern = convertSinglePattern(orPattern.trim());
          if (filePattern == null) return null;
          globPatterns.add(filePattern);
        }
      }
    }
    if (globPatterns.size() == 0) {
      return null;
    }
    if (globPatterns.size() == 1) {
      return new GlobPatternDescriptor(globPatterns.get(0));
    }
    else {
      return new GlobPatternDescriptor("{" + StringUtil.join(globPatterns,",") + "}");
    }
  }
@Nullable
  public static GlobPatternDescriptor convert(@NotNull NamedScopeDescriptor descriptor)