Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.RewriteSessionEditProcessor


      try {
        document = aquireDocument(cu, new SubProgressMonitor(monitor, 1));
        if (save) {
          commitDocument(cu, document, edit, new SubProgressMonitor(monitor, 1));
        } else {
          new RewriteSessionEditProcessor(document, edit, TextEdit.UPDATE_REGIONS).performEdits();
        }
      } catch (BadLocationException e) {
        VisualSwingPlugin.getLogger().error(e);
      } finally {
        releaseDocument(cu, document, new SubProgressMonitor(monitor, 1));
View Full Code Here


      if (file.exists()) {
        IStatus status = makeCommittable(new IResource[] { file }, null);
        if (!status.isOK()) {
          throw new CoreException(status);
        }
        new RewriteSessionEditProcessor(document, edit, TextEdit.UPDATE_REGIONS).performEdits(); // apply
        ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager();
        bufferManager.getTextFileBuffer(file.getFullPath(), LocationKind.IFILE).commit(monitor, true);
        return;
      }
    }
    new RewriteSessionEditProcessor(document, edit, TextEdit.UPDATE_REGIONS).performEdits();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.RewriteSessionEditProcessor

Copyright © 2018 www.massapicom. 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.