private static @Nullable Collection<FileType> getAssociatedFileTypes(@NotNull FileBasedIndex.InputFilter inputFilter) {
    Set<FileType> addedTypes;
    if (inputFilter instanceof FileBasedIndex.FileTypeSpecificInputFilter) {
      addedTypes = new HashSet<>();
      ((FileBasedIndex.FileTypeSpecificInputFilter)inputFilter).registerFileTypesUsedForIndexing(type -> {
        if (type != null) addedTypes.add(type);
      });
    }
    else {
      addedTypes = null;
    }
    return addedTypes;
  }
private static @Nullable Collection<FileType> getAssociatedFileTypes(@NotNull FileBasedIndex.InputFilter inputFilter)