Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.DocumentEvent


            if (fProgressMonitor != null && fThread.isActive()) {
                fProgressMonitor.setCanceled(true);
            }

            if (fIsIncrementalReconciler) {
                final DocumentEvent e = new DocumentEvent(fDocument, 0,
                        fDocument.getLength(), fDocument.get());
                createDirtyRegion(e);
            }

            startReconciling();
View Full Code Here


  /**
   * Notifies listener about a document change.
   */
  public void fireDocumentChanged() {
    DocumentEvent ev = new DocumentEvent();
    ev.fDocument = this;
    fireDocumentChanged(ev);
  }
View Full Code Here

  /**
   * Notifies listener about a document change.
   */
  private void fireDocumentChanged() {
    DocumentEvent ev = new DocumentEvent();
    ev.fDocument = this;
    fireDocumentChanged(ev);
  }
View Full Code Here

        }

        // re-inject events accumulated in the meantime.
        try {
          do {
            DocumentEvent event;
            synchronized (DocumentLineDiffer.this) {
              if (isCanceled(monitor))
                return Status.CANCEL_STATUS;

              if (fStoredEvents.isEmpty()) {
                // we are back in sync with the life documents
                fInitializationJob= null;
                fState= SYNCHRONIZED;
                fLastDifference= null;

                // replace the private documents with the actual
                leftEquivalent.setDocument(left);
                rightEquivalent.setDocument(right);

                break;
              }

              event= (DocumentEvent) fStoredEvents.remove(0);
            }
           
            // access documents non synchronized:
            IDocument copy= null;
            if (event.fDocument == right)
              copy= actual;
            else if (event.fDocument == left)
              copy= reference;
            else
              Assert.isTrue(false);
           
            // copy the event to inject it into our diff copies
            // don't modify the original event! See https://bugs.eclipse.org/bugs/show_bug.cgi?id=134227
            event= new DocumentEvent(copy, event.fOffset, event.fLength, event.fText);
            handleAboutToBeChanged(event);
           
            // inject the event into our private copy
            actual.replace(event.fOffset, event.fLength, event.fText);
           
View Full Code Here

 
  /**
   * Notifies listener about a document change.
   */
  private void fireDocumentChanged() {
    DocumentEvent ev = new DocumentEvent();
    ev.fDocument = this;
    fireDocumentChanged(ev);
  }
View Full Code Here

            damage= new Region(0, document.getLength());
           } else {
            IRegion region= widgetRegion2ModelRegion(e);
            try {
              String text= document.get(region.getOffset(), region.getLength());
              DocumentEvent de= new DocumentEvent(document, region.getOffset(), region.getLength(), text);
              damage= getDamage(de, false);
            } catch (BadLocationException x) {
              /* ignored in platform PresentationReconciler, too */
            }
           }
         }
       } else  {
         DocumentEvent de= e.getDocumentEvent();
         document= de.getDocument();
         damage= getDamage(de, true);
       }
      if(_trace && _traceTime) {
        System.out.println(TRACE_PREFIX + "calculated simple text damage at " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$
        System.out.flush();
View Full Code Here

  /**
   * Notifies listener about a document change.
   */
  private void fireDocumentChanged() {
    DocumentEvent ev = new DocumentEvent();
    ev.fDocument = this;
    fireDocumentChanged(ev);
  }
View Full Code Here

            damage= new Region(0, document.getLength());
           } else {
            IRegion region= widgetRegion2ModelRegion(e);
            try {
              String text= document.get(region.getOffset(), region.getLength());
              DocumentEvent de= new DocumentEvent(document, region.getOffset(), region.getLength(), text);
              damage= getDamage(de, false);
            } catch (BadLocationException x) {
            }
           }
         }
       } else  {
         DocumentEvent de= e.getDocumentEvent();
         document= de.getDocument();
         damage= getDamage(de, true);
       }

      if (damage != null && document != null)
        processDamage(damage, document);
View Full Code Here

      if (fThread.isActive())
        fProgressMonitor.setCanceled(true);
     
      if (fIsIncrementalReconciler) {
        DocumentEvent e= new DocumentEvent(fDocument, 0, fDocument.getLength(), fDocument.get());
        createDirtyRegion(e);
      }

      startReconciling();
    }
View Full Code Here

        if (fIsIncrementalReconciler) {
          synchronized (fDirtyRegionQueue) {
            fDirtyRegionQueue.purgeQueue();
          }
          if (fDocument != null && fDocument.getLength() > 0 && fThread.isDirty() && fThread.isAlive()) {
            DocumentEvent e= new DocumentEvent(fDocument, 0, fDocument.getLength(), ""); //$NON-NLS-1$
            createDirtyRegion(e);
            fThread.reset();
            fThread.suspendCallerWhileDirty();
          }
        }
View Full Code Here

TOP

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

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.