[diff] IDEA-100386 Detect file type for temporary files built for diff

Otherwise non-binary files without file type associated with them are treated as binary, because file type is not detected for this manually constructed temporary VirtualFiles.
This commit is contained in:
Kirill Likhodedov
2013-02-07 19:39:32 +04:00
parent fa0a5e7453
commit e9b71ca2bb
@@ -96,6 +96,9 @@ public class FileContent extends DiffContent {
fileContent.setIsEmpty(true);
fileContent.myTypeForEmpty = FileTypeManager.getInstance().getFileTypeByFileName(name + "." + ext);
}
else {
FileTypeManager.getInstance().detectFileTypeFromContent(file);
}
return fileContent;
}
throw new IOException("Can not create temp file for revision content");