public class DocumentContent extends DiffContent
Constructor and Description |
---|
DocumentContent(Document document) |
DocumentContent(Document document,
FileType type) |
DocumentContent(Project project,
Document document) |
DocumentContent(Project project,
Document document,
FileType type) |
Modifier and Type | Method and Description |
---|---|
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
|
fromDocument, fromFile, isBinary, isEmpty, setIsEmpty
public DocumentContent(Document document)
public Document getDocument()
DiffContent
getDocument
in class DiffContent
public Navigatable getOpenFileDescriptor(int offset)
DiffContent
getOpenFileDescriptor
in class DiffContent
offset
- in document returned by DiffContent.getDocument()
OpenFileDescriptor
to open this content in editorpublic VirtualFile getFile()
getFile
in class DiffContent
public FileType getContentType()
getContentType
in class DiffContent
public byte[] getBytes()
getBytes
in class DiffContent
DiffContent.getFile()
returns existing not directory filepublic LineSeparator getLineSeparator()
getLineSeparator
in class DiffContent