@RequiresEdt
  @ApiStatus.Internal
  @Override
  public boolean addFile(@NotNull VirtualFile file, @NotNull FileType type) {
    if (!isOverridable(file.getFileType()) || !isOverridable(type) || !(file instanceof VirtualFileWithId)) {
      //@formatter:off
      throw new IllegalArgumentException("Cannot override filetype for file " + file + " from " + file.getFileType() + " to " + type + " because the " + (isOverridable(type) ? "former" : "latter") + " is not overridable");
    }
    return super.addFile(file, type);
  }
@RequiresEdt
  @ApiStatus.Internal
  @Override
  public boolean addFile(@NotNull VirtualFile file, @NotNull FileType type)