use of org.eclipse.jdt.core.BufferChangedEvent in project che by eclipse.
the class DocumentAdapter method close.
/*
* @see IBuffer#close()
*/
public void close() {
if (isClosed())
return;
IDocument d = fDocument;
fDocument = new Document();
fIsClosed = true;
d.removeDocumentListener(this);
//
// if (fTextFileBuffer != null) {
// ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager();
// try {
// if (fFileStore != null)
// manager.disconnectFileStore(fFileStore, new NullProgressMonitor());
// else
// manager.disconnect(fPath, fLocationKind, new NullProgressMonitor());
// } catch (CoreException x) {
// // ignore
// }
// fTextFileBuffer = null;
// }
fireBufferChanged(new BufferChangedEvent(this, 0, 0, null));
fBufferListeners.clear();
}
use of org.eclipse.jdt.core.BufferChangedEvent in project eclipse.jdt.ls by eclipse.
the class DocumentAdapter method close.
@Override
public void close() {
synchronized (lock) {
if (fIsClosed) {
return;
}
fIsClosed = true;
fDocument.removeDocumentListener(this);
if (fTextFileBuffer != null) {
try {
ITextFileBufferManager manager = FileBuffers.getTextFileBufferManager();
manager.disconnect(fFile.getFullPath(), LocationKind.NORMALIZE, null);
} catch (CoreException x) {
// ignore
}
fTextFileBuffer = null;
}
fireBufferChanged(new BufferChangedEvent(this, 0, 0, null));
fBufferListeners.clear();
fDocument = null;
}
}
Aggregations