Package org.eclipse.core.filebuffers

Examples of org.eclipse.core.filebuffers.ITextFileBufferManager.connect()


   */
  protected void createFileFromDocument(IProgressMonitor monitor, IFile file, IDocument document) throws CoreException {
    try {
      monitor.beginTask(EditorMessages.TextFileDocumentProvider_beginTask_saving, 2000);
      ITextFileBufferManager manager= FileBuffers.getTextFileBufferManager();
      manager.connect(file.getFullPath(), LocationKind.IFILE, monitor);
      ITextFileBuffer buffer= ITextFileBufferManager.DEFAULT.getTextFileBuffer(file.getFullPath(), LocationKind.IFILE);
      buffer.getDocument().set(document.get());
      buffer.commit(monitor, true);
      manager.disconnect(file.getFullPath(), LocationKind.IFILE, monitor);
    } finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.