Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.AnnotationModelEvent


  }

  public void addAnnotationModelListener(IAnnotationModelListener listener) {
    if (!annotationModelListeners.contains(listener)) {
      annotationModelListeners.add(listener);
      fireModelChanged(new AnnotationModelEvent(this, true));
    }
  }
View Full Code Here


      return;
    }

    // inform listeners about change
    if (fUpdateNeeded) {
      AnnotationModelEvent ame= new AnnotationModelEvent(this, false);
      for (Iterator it= fAdded.iterator(); it.hasNext(); ) {
        QuickDiffRangeDifference rd= (QuickDiffRangeDifference) it.next();
        ame.annotationAdded(rd.getDiffRegion(fDifferences, fLeftDocument));
      }
      for (Iterator it= fRemoved.iterator(); it.hasNext(); ) {
        QuickDiffRangeDifference rd= (QuickDiffRangeDifference) it.next();
        ame.annotationRemoved(rd.getDiffRegion(fDifferences, fLeftDocument));
      }
      for (Iterator it= fChanged.iterator(); it.hasNext(); ) {
        QuickDiffRangeDifference rd= (QuickDiffRangeDifference) it.next();
        ame.annotationChanged(rd.getDiffRegion(fDifferences, fLeftDocument));
      }
      fireModelChanged(ame);
      fUpdateNeeded= false;
    }
  }
View Full Code Here

  /**
   * Informs all annotation model listeners that this model has been changed.
   */
  protected void fireModelChanged() {
    fireModelChanged(new AnnotationModelEvent(this));
  }
View Full Code Here

          if (display != null) {
            display.asyncExec(new Runnable() {
              public void run() {
                try {
                  while (true) {
                    AnnotationModelEvent ame= null;
                    synchronized (fLock) {
                      if (fPendingRequests.size() == 0)
                        return;
                      ame= (AnnotationModelEvent) fPendingRequests.remove(0);
                    }
View Full Code Here

          if (display != null) {
            display.asyncExec(new Runnable() {
              public void run() {
                try {
                  while (true) {
                    AnnotationModelEvent ame= null;
                    synchronized (fLock) {
                      if (fPendingRequests.size() == 0)
                        return;
                      ame= (AnnotationModelEvent) fPendingRequests.remove(0);
                    }
View Full Code Here

    }
    return null;
  }

  private void clear() {
    AnnotationModelEvent event = new AnnotationModelEvent(this);
    clear(event);
    fireModelChanged(event);
  }
View Full Code Here

    }
    annotations.clear();
  }

  private void createAnnotations(final ISourceNode linecoverage) {
    AnnotationModelEvent event = new AnnotationModelEvent(this);
    clear(event);
    final int firstline = linecoverage.getFirstLine();
    final int lastline = Math.min(linecoverage.getLastLine(),
        document.getNumberOfLines());
    try {
      for (int l = firstline; l <= lastline; l++) {
        final ILine line = linecoverage.getLine(l);
        if (line.getStatus() != ICounter.EMPTY) {
          final IRegion region = document.getLineInformation(l - 1);
          final CoverageAnnotation ca = new CoverageAnnotation(
              region.getOffset(), region.getLength(), line);
          annotations.add(ca);
          event.annotationAdded(ca);
        }
      }
    } catch (BadLocationException ex) {
      EclEmmaUIPlugin.log(ex);
    }
View Full Code Here

  }

  public void addAnnotationModelListener(IAnnotationModelListener listener) {
    if (!annotationModelListeners.contains(listener)) {
      annotationModelListeners.add(listener);
      fireModelChanged(new AnnotationModelEvent(this, true));
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.AnnotationModelEvent

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.