Class EmbeddedEditorBuffer
- java.lang.Object
-
- com._1c.g5.ides.ui.texteditor.xtext.embedded.EmbeddedEditorBuffer
-
- All Implemented Interfaces:
AutoCloseable
,org.eclipse.handly.buffer.IBuffer
,org.eclipse.handly.snapshot.ISnapshotProvider
,org.eclipse.handly.util.IReferenceCountable
public class EmbeddedEditorBuffer extends Object implements org.eclipse.handly.buffer.IBuffer
ImplementsIBuffer
on top of a Xtext EmbeddedEditor, that works only with document.
-
-
Constructor Summary
Constructors Constructor Description EmbeddedEditorBuffer(org.eclipse.jface.text.IDocument document)
Creates a new buffer instance based on given document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRef()
org.eclipse.handly.buffer.IBufferChange
applyChange(org.eclipse.handly.buffer.IBufferChange change, org.eclipse.core.runtime.IProgressMonitor pm)
org.eclipse.jface.text.IDocument
getDocument()
org.eclipse.handly.snapshot.ISnapshot
getSnapshot()
boolean
isDirty()
void
release()
void
save(org.eclipse.handly.context.IContext context, org.eclipse.core.runtime.IProgressMonitor pm)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
EmbeddedEditorBuffer
public EmbeddedEditorBuffer(org.eclipse.jface.text.IDocument document) throws org.eclipse.core.runtime.CoreException
Creates a new buffer instance based on given document.It is the client responsibility to
release
the created buffer after it is no longer needed.- Parameters:
document
- notnull
- Throws:
org.eclipse.core.runtime.CoreException
-
-
Method Detail
-
getDocument
public org.eclipse.jface.text.IDocument getDocument()
- Specified by:
getDocument
in interfaceorg.eclipse.handly.buffer.IBuffer
-
getSnapshot
public org.eclipse.handly.snapshot.ISnapshot getSnapshot()
- Specified by:
getSnapshot
in interfaceorg.eclipse.handly.buffer.IBuffer
- Specified by:
getSnapshot
in interfaceorg.eclipse.handly.snapshot.ISnapshotProvider
-
applyChange
public org.eclipse.handly.buffer.IBufferChange applyChange(org.eclipse.handly.buffer.IBufferChange change, org.eclipse.core.runtime.IProgressMonitor pm) throws org.eclipse.core.runtime.CoreException
- Specified by:
applyChange
in interfaceorg.eclipse.handly.buffer.IBuffer
- Throws:
org.eclipse.core.runtime.CoreException
-
isDirty
public boolean isDirty()
- Specified by:
isDirty
in interfaceorg.eclipse.handly.buffer.IBuffer
-
save
public void save(org.eclipse.handly.context.IContext context, org.eclipse.core.runtime.IProgressMonitor pm) throws org.eclipse.core.runtime.CoreException
- Specified by:
save
in interfaceorg.eclipse.handly.buffer.IBuffer
- Throws:
org.eclipse.core.runtime.CoreException
-
addRef
public void addRef()
- Specified by:
addRef
in interfaceorg.eclipse.handly.buffer.IBuffer
- Specified by:
addRef
in interfaceorg.eclipse.handly.util.IReferenceCountable
- Specified by:
addRef
in interfaceorg.eclipse.handly.snapshot.ISnapshotProvider
-
release
public void release()
- Specified by:
release
in interfaceorg.eclipse.handly.buffer.IBuffer
- Specified by:
release
in interfaceorg.eclipse.handly.util.IReferenceCountable
- Specified by:
release
in interfaceorg.eclipse.handly.snapshot.ISnapshotProvider
-
-