Package de.loskutov.anyedit.compare
Class FileStreamContent
- java.lang.Object
-
- org.eclipse.compare.BufferedContent
-
- org.eclipse.compare.ResourceNode
-
- de.loskutov.anyedit.compare.FileStreamContent
-
- All Implemented Interfaces:
StreamContent,org.eclipse.compare.IContentChangeNotifier,org.eclipse.compare.IEditableContent,org.eclipse.compare.IEditableContentExtension,org.eclipse.compare.IEncodedStreamContentAccessor,org.eclipse.compare.IModificationDate,org.eclipse.compare.IResourceProvider,org.eclipse.compare.IStreamContentAccessor,org.eclipse.compare.ITypedElement,org.eclipse.compare.structuremergeviewer.IStructureComparator,org.eclipse.core.runtime.IAdaptable
public class FileStreamContent extends org.eclipse.compare.ResourceNode implements StreamContent
Content for workspace files without document support.
-
-
Field Summary
Fields Modifier and Type Field Description private ContentWrappercontentprivate booleandirtyprivate EditableSharedDocumentAdaptersharedDocumentAdapter
-
Constructor Summary
Constructors Constructor Description FileStreamContent(ContentWrapper content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancommitChanges(org.eclipse.core.runtime.IProgressMonitor pm)voiddispose()java.lang.ObjectgetAdapter(java.lang.Class adapter)java.lang.StringgetFullName()private org.eclipse.compare.ISharedDocumentAdaptergetSharedDocumentAdapter()The code below is copy from org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement and is required to add full Java editor capabilities (content assist, navigation etc) to the compare editorvoidinit(AnyeditCompareInput input)booleanisDirty()booleanisDisposed()StreamContentrecreate()voidsetContent(byte[] contents)voidsetDirty(boolean dirty)-
Methods inherited from class org.eclipse.compare.ResourceNode
createChild, createStream, equals, getCharset, getChildren, getContents, getImage, getModificationDate, getName, getResource, getType, hashCode, isEditable, isReadOnly, replace, validateEdit
-
Methods inherited from class org.eclipse.compare.BufferedContent
addContentChangeListener, discardBuffer, fireContentChanged, getContent, removeContentChangeListener
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
dirty
private boolean dirty
-
content
private final ContentWrapper content
-
sharedDocumentAdapter
private EditableSharedDocumentAdapter sharedDocumentAdapter
-
-
Constructor Detail
-
FileStreamContent
public FileStreamContent(ContentWrapper content)
-
-
Method Detail
-
setContent
public void setContent(byte[] contents)
- Specified by:
setContentin interfaceorg.eclipse.compare.IEditableContent- Overrides:
setContentin classorg.eclipse.compare.BufferedContent
-
getFullName
public java.lang.String getFullName()
- Specified by:
getFullNamein interfaceStreamContent
-
isDirty
public boolean isDirty()
- Specified by:
isDirtyin interfaceStreamContent
-
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
-
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
-
getSharedDocumentAdapter
private org.eclipse.compare.ISharedDocumentAdapter getSharedDocumentAdapter()
The code below is copy from org.eclipse.team.internal.ui.synchronize.LocalResourceTypedElement and is required to add full Java editor capabilities (content assist, navigation etc) to the compare editor- Returns:
-
setDirty
public void setDirty(boolean dirty)
- Specified by:
setDirtyin interfaceStreamContent
-
-