public class VirtualFileDiffElement extends DiffElement<VirtualFile>
EMPTY_ARRAY
Constructor and Description |
---|
VirtualFileDiffElement(VirtualFile file) |
Modifier and Type | Method and Description |
---|---|
VirtualFileDiffElement |
copyTo(DiffElement<VirtualFile> container,
java.lang.String relativePath)
Copies element to the container.
|
static VirtualFileDiffElement |
createElement(VirtualFile file) |
boolean |
delete()
Deletes element
|
java.nio.charset.Charset |
getCharset() |
VirtualFileDiffElement[] |
getChildren() |
protected FileChooserDescriptor |
getChooserDescriptor() |
byte [] |
getContent()
Returns content data as byte array.
|
java.io.InputStream |
getContentStream() |
java.util.concurrent.Callable<DiffElement<VirtualFile>> |
getElementChooser(Project project) |
FileType |
getFileType() |
javax.swing.Icon |
getIcon() |
java.lang.String |
getName() |
Navigatable |
getNavigatable(Project project) |
java.lang.String |
getPath() |
java.lang.String |
getPresentablePath() |
long |
getSize() |
long |
getTimeStamp() |
VirtualFile |
getValue() |
boolean |
isContainer() |
boolean |
isOperationsEnabled()
Defines is it possible to perform such operations as copy or delete through Diff Panel
|
void |
refresh(boolean userInitiated) |
static void |
refreshFile(boolean userInitiated,
VirtualFile virtualFile) |
createDiffContent, getPresentableName, getSeparator
public VirtualFileDiffElement(VirtualFile file)
public java.lang.String getPath()
getPath
in class DiffElement<VirtualFile>
public java.lang.String getName()
getName
in class DiffElement<VirtualFile>
public java.lang.String getPresentablePath()
getPresentablePath
in class DiffElement<VirtualFile>
public long getSize()
getSize
in class DiffElement<VirtualFile>
public long getTimeStamp()
getTimeStamp
in class DiffElement<VirtualFile>
public boolean isContainer()
isContainer
in class DiffElement<VirtualFile>
public Navigatable getNavigatable(Project project)
getNavigatable
in class DiffElement<VirtualFile>
public VirtualFileDiffElement[] getChildren()
getChildren
in class DiffElement<VirtualFile>
public byte [] getContent() throws java.io.IOException
DiffElement
getContent
in class DiffElement<VirtualFile>
java.io.IOException
- when readingpublic java.io.InputStream getContentStream() throws java.io.IOException
getContentStream
in class DiffElement<VirtualFile>
java.io.IOException
public VirtualFile getValue()
getValue
in class DiffElement<VirtualFile>
public javax.swing.Icon getIcon()
getIcon
in class DiffElement<VirtualFile>
public java.util.concurrent.Callable<DiffElement<VirtualFile>> getElementChooser(Project project)
getElementChooser
in class DiffElement<VirtualFile>
public static VirtualFileDiffElement createElement(VirtualFile file)
protected FileChooserDescriptor getChooserDescriptor()
public boolean isOperationsEnabled()
DiffElement
isOperationsEnabled
in class DiffElement<VirtualFile>
true
if copy, delete, etc operations are allowed,
false
otherwisepublic java.nio.charset.Charset getCharset()
getCharset
in class DiffElement<VirtualFile>
public FileType getFileType()
getFileType
in class DiffElement<VirtualFile>
public VirtualFileDiffElement copyTo(DiffElement<VirtualFile> container, java.lang.String relativePath)
DiffElement
copyTo
in class DiffElement<VirtualFile>
container
- file directory or other containerrelativePath
- relative path from roottrue
if coping was completed successfully,
false
otherwisepublic boolean delete()
DiffElement
delete
in class DiffElement<VirtualFile>
true
if deletion was completed successfully,
false
otherwisepublic void refresh(boolean userInitiated)
refresh
in class DiffElement<VirtualFile>
public static void refreshFile(boolean userInitiated, VirtualFile virtualFile)