boolean addFiles(@NotNull Map<? extends VirtualFile, FileType> files) {
    List<VirtualFile> changedFiles = new SmartList<>();
    for (Map.Entry<? extends VirtualFile, FileType> entry : files.entrySet()) {
      VirtualFile file = entry.getKey();
      if (!(file instanceof VirtualFileWithId)) {
        //@formatter:off
        throw new IllegalArgumentException("file must be instanceof VirtualFileWithId but got: " + file + " (" + file.getClass() + ")");
      }
      if (file.isDirectory()) {
        //@formatter:off
        throw new IllegalArgumentException("file must not be directory but got: " + file + "; File.isDirectory():" + new File(file.getPath()).isDirectory());
      }

      String value = entry.getValue().getName();
      String prevValue = myMap.put(file, value);

      if (!value.equals(prevValue)) {
        changedFiles.add(file);
      }
    }

    boolean isAdded = !changedFiles.isEmpty();
    if (isAdded) {
      onFileSettingsChanged(changedFiles);
    }
    return isAdded;
  }
boolean addFiles(@NotNull Map<? extends VirtualFile, FileType> files)