Package de.loskutov.anyedit.compare
Class ExternalFileStreamContent
- java.lang.Object
-
- org.eclipse.compare.BufferedContent
-
- de.loskutov.anyedit.compare.ExternalFileStreamContent
-
- All Implemented Interfaces:
StreamContent,org.eclipse.compare.IContentChangeNotifier,org.eclipse.compare.IEditableContent,org.eclipse.compare.IEditableContentExtension,org.eclipse.compare.IModificationDate,org.eclipse.compare.IStreamContentAccessor,org.eclipse.compare.ITypedElement,org.eclipse.compare.structuremergeviewer.IStructureComparator,org.eclipse.core.runtime.IAdaptable
public class ExternalFileStreamContent extends org.eclipse.compare.BufferedContent implements StreamContent, org.eclipse.compare.IEditableContent, org.eclipse.compare.IModificationDate, org.eclipse.compare.IEditableContentExtension
Content for external files without document support.
-
-
Field Summary
Fields Modifier and Type Field Description private ContentWrappercontentprotected booleandirty
-
Constructor Summary
Constructors Constructor Description ExternalFileStreamContent(ContentWrapper content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancommitChanges(org.eclipse.core.runtime.IProgressMonitor pm)protected java.io.InputStreamcreateStream()voiddispose()java.lang.ObjectgetAdapter(java.lang.Class adapter)java.lang.Object[]getChildren()java.lang.StringgetFullName()org.eclipse.swt.graphics.ImagegetImage()longgetModificationDate()java.lang.StringgetName()java.lang.StringgetType()voidinit(AnyeditCompareInput input)booleanisDirty()booleanisDisposed()booleanisEditable()booleanisReadOnly()StreamContentrecreate()org.eclipse.compare.ITypedElementreplace(org.eclipse.compare.ITypedElement dest, org.eclipse.compare.ITypedElement src)voidsetContent(byte[] contents)voidsetDirty(boolean dirty)org.eclipse.core.runtime.IStatusvalidateEdit(org.eclipse.swt.widgets.Shell shell)-
Methods inherited from class org.eclipse.compare.BufferedContent
addContentChangeListener, discardBuffer, fireContentChanged, getContent, getContents, removeContentChangeListener
-
-
-
-
Field Detail
-
dirty
protected boolean dirty
-
content
private final ContentWrapper content
-
-
Constructor Detail
-
ExternalFileStreamContent
public ExternalFileStreamContent(ContentWrapper content)
-
-
Method Detail
-
setContent
public void setContent(byte[] contents)
- Specified by:
setContentin interfaceorg.eclipse.compare.IEditableContent- Overrides:
setContentin classorg.eclipse.compare.BufferedContent
-
getImage
public org.eclipse.swt.graphics.Image getImage()
- Specified by:
getImagein interfaceorg.eclipse.compare.ITypedElement
-
commitChanges
public boolean commitChanges(org.eclipse.core.runtime.IProgressMonitor pm) throws org.eclipse.core.runtime.CoreException- Specified by:
commitChangesin interfaceStreamContent- Throws:
org.eclipse.core.runtime.CoreException
-
createStream
protected java.io.InputStream createStream() throws org.eclipse.core.runtime.CoreException- Specified by:
createStreamin classorg.eclipse.compare.BufferedContent- Throws:
org.eclipse.core.runtime.CoreException
-
isDirty
public boolean isDirty()
- Specified by:
isDirtyin interfaceStreamContent
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.eclipse.compare.ITypedElement
-
getFullName
public java.lang.String getFullName()
- Specified by:
getFullNamein interfaceStreamContent
-
getType
public java.lang.String getType()
- Specified by:
getTypein interfaceorg.eclipse.compare.ITypedElement
-
getChildren
public java.lang.Object[] getChildren()
- Specified by:
getChildrenin interfaceorg.eclipse.compare.structuremergeviewer.IStructureComparator
-
isEditable
public boolean isEditable()
- Specified by:
isEditablein interfaceorg.eclipse.compare.IEditableContent
-
replace
public org.eclipse.compare.ITypedElement replace(org.eclipse.compare.ITypedElement dest, org.eclipse.compare.ITypedElement src)- Specified by:
replacein interfaceorg.eclipse.compare.IEditableContent
-
getModificationDate
public long getModificationDate()
- Specified by:
getModificationDatein interfaceorg.eclipse.compare.IModificationDate
-
isReadOnly
public boolean isReadOnly()
- Specified by:
isReadOnlyin interfaceorg.eclipse.compare.IEditableContentExtension
-
validateEdit
public org.eclipse.core.runtime.IStatus validateEdit(org.eclipse.swt.widgets.Shell shell)
- Specified by:
validateEditin interfaceorg.eclipse.compare.IEditableContentExtension
-
dispose
public void dispose()
- Specified by:
disposein interfaceStreamContent
-
isDisposed
public boolean isDisposed()
- Specified by:
isDisposedin interfaceStreamContent
-
init
public void init(AnyeditCompareInput input)
- Specified by:
initin interfaceStreamContent
-
recreate
public StreamContent recreate()
- Specified by:
recreatein interfaceStreamContent
-
getAdapter
public java.lang.Object getAdapter(java.lang.Class adapter)
- Specified by:
getAdapterin interfaceorg.eclipse.core.runtime.IAdaptable
-
setDirty
public void setDirty(boolean dirty)
- Specified by:
setDirtyin interfaceStreamContent
-
-