public class FileContent extends DiffContent
| Constructor and Description |
|---|
FileContent(Project project,
VirtualFile file) |
| Modifier and Type | Method and Description |
|---|---|
static FileContent |
createFromTempFile(Project project,
java.lang.String name,
java.lang.String ext,
byte [] content) |
byte[] |
getBytes() |
FileType |
getContentType() |
Document |
getDocument()
Represents this content as Document
null means content has no text representation
|
VirtualFile |
getFile() |
LineSeparator |
getLineSeparator() |
Navigatable |
getOpenFileDescriptor(int offset)
Provides a way to open given text place in editor
null means given offset can't be opened in editor
|
boolean |
isBinary()
Means this content represents binary data.
|
fromDocument, fromFile, isEmpty, setIsEmptypublic FileContent(Project project, VirtualFile file)
public Document getDocument()
DiffContentgetDocument in class DiffContentpublic Navigatable getOpenFileDescriptor(int offset)
DiffContentgetOpenFileDescriptor in class DiffContentoffset - in document returned by DiffContent.getDocument()OpenFileDescriptor to open this content in editorpublic VirtualFile getFile()
getFile in class DiffContentpublic FileType getContentType()
getContentType in class DiffContentpublic byte[] getBytes()
throws java.io.IOException
getBytes in class DiffContentDiffContent.getFile() returns existing not directory filejava.io.IOExceptionpublic boolean isBinary()
DiffContentisBinary in class DiffContentpublic static FileContent createFromTempFile(Project project, java.lang.String name, java.lang.String ext, byte [] content) throws java.io.IOException
java.io.IOExceptionpublic LineSeparator getLineSeparator()
getLineSeparator in class DiffContent