use of com.intellij.openapi.diff.MergeRequest in project intellij-community by JetBrains.
the class ExternalToolContentExternalizer method getContentFile.
public File getContentFile() throws IOException {
String extension = chooseExtension();
String name = chooseName();
if (name.length() <= 3)
name = "___" + name;
File tempFile;
try {
tempFile = FileUtil.createTempFile(name, extension);
} catch (IOException e) {
tempFile = FileUtil.createTempFile(STD_PREFIX, extension);
}
final DiffContent content = getContent();
byte[] bytes = myRequest instanceof MergeRequest ? content.getDocument().getText().getBytes() : content.getBytes();
FileUtil.writeToFile(tempFile, bytes);
return tempFile;
}
Aggregations