Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.IDocumentExtension4.startRewriteSession()


     * Starts a rewrite session (keep things in a single undo/redo)
     */
    private DocumentRewriteSession startWrite(IDocument doc) {
        if (doc instanceof IDocumentExtension4) {
            IDocumentExtension4 d = (IDocumentExtension4) doc;
            return d.startRewriteSession(DocumentRewriteSessionType.UNRESTRICTED);
        }
        return null;
    }

    /**
 
View Full Code Here


          if (document instanceof IDocumentExtension4) {
            IDocumentExtension4 extension= (IDocumentExtension4) document;
            DocumentRewriteSessionType type= (selection.y == 0 && document.getLength() > 1000) || selection.y > 1000
              ? DocumentRewriteSessionType.SEQUENTIAL
              : DocumentRewriteSessionType.UNRESTRICTED_SMALL;
            rewriteSession= extension.startRewriteSession(type);
          } else {
            setRedraw(false);
            target.beginCompoundChange();
          }
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.