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 ContentWrapper
content
private boolean
dirty
private EditableSharedDocumentAdapter
sharedDocumentAdapter
-
Constructor Summary
Constructors Constructor Description FileStreamContent(ContentWrapper content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
commitChanges(org.eclipse.core.runtime.IProgressMonitor pm)
void
dispose()
java.lang.Object
getAdapter(java.lang.Class adapter)
java.lang.String
getFullName()
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 editorvoid
init(AnyeditCompareInput input)
boolean
isDirty()
boolean
isDisposed()
StreamContent
recreate()
void
setContent(byte[] contents)
void
setDirty(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:
setContent
in interfaceorg.eclipse.compare.IEditableContent
- Overrides:
setContent
in classorg.eclipse.compare.BufferedContent
-
getFullName
public java.lang.String getFullName()
- Specified by:
getFullName
in interfaceStreamContent
-
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interfaceStreamContent
-
commitChanges
public boolean commitChanges(org.eclipse.core.runtime.IProgressMonitor pm) throws org.eclipse.core.runtime.CoreException
- Specified by:
commitChanges
in interfaceStreamContent
- Throws:
org.eclipse.core.runtime.CoreException
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceStreamContent
-
isDisposed
public boolean isDisposed()
- Specified by:
isDisposed
in interfaceStreamContent
-
init
public void init(AnyeditCompareInput input)
- Specified by:
init
in interfaceStreamContent
-
recreate
public StreamContent recreate()
- Specified by:
recreate
in interfaceStreamContent
-
getAdapter
public java.lang.Object getAdapter(java.lang.Class adapter)
- Specified by:
getAdapter
in 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:
setDirty
in interfaceStreamContent
-
-