@NotNull
  ResolveConflictResult warnAndResolveConflict(@NotNull FileNameMatcher matcher,
                                               @Nullable FileTypeManagerImpl.FileTypeWithDescriptor oldFtd,
                                               @NotNull FileTypeManagerImpl.FileTypeWithDescriptor newFtd) {
    FileType oldFileType = oldFtd == null ? null : oldFtd.fileType();
    FileType newFileType = newFtd.fileType();
    if (oldFileType == null || oldFileType.equals(newFileType) || oldFileType instanceof AbstractFileType) {
      // no conflict really
      return new ResolveConflictResult(ObjectUtils.notNull(oldFtd, newFtd), "", "", true);
    }

    ResolveConflictResult result = resolveConflict(matcher, oldFtd, newFtd);
    // notify about only real conflicts between two same-league plugins
    if (!result.approved) {
      if (oldFtd.fileType().equals(newFileType)) {
        throw new IllegalArgumentException("expected different file types but got "+result.resolved);
      }

      showConflictNotification(null, matcher, oldFtd, result);
    }
    return result;
  }
@NotNull
  ResolveConflictResult warnAndResolveConflict(@NotNull FileNameMatcher matcher,
                                               @Nullable FileTypeManagerImpl.FileTypeWithDescriptor oldFtd,
                                               @NotNull FileTypeManagerImpl.FileTypeWithDescriptor newFtd)