boolean (@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); }