Examples of replaceAnnotations()


Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

      IAnnotationModelExtension modelExtension = (IAnnotationModelExtension) annotationModel;
      Map annotationsToAddMap = new HashMap();
      for (int i = 0; i < annotationsToAdd.length; i++) {
        annotationsToAddMap.put(annotationsToAdd[i], ((TemporaryAnnotation) annotationsToAdd[i]).getPosition());
      }
      modelExtension.replaceAnnotations(annotationsToRemove, annotationsToAddMap);
    }

    else {
      for (int j = 0; j < annotationsToAdd.length; j++) {
        annotationModel.addAnnotation(annotationsToAdd[j], ((TemporaryAnnotation) annotationsToAdd[j]).getPosition());
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

      IAnnotationModelExtension modelExtension = (IAnnotationModelExtension) annotationModel;
      Map annotationsToAddMap = new HashMap();
      for (int i = 0; i < annotationsToAdd.length; i++) {
        annotationsToAddMap.put(annotationsToAdd[i], ((TemporaryAnnotation) annotationsToAdd[i]).getPosition());
      }
      modelExtension.replaceAnnotations(annotationsToRemove, annotationsToAddMap);
    }

    else {
      for (int j = 0; j < annotationsToAdd.length; j++) {
        annotationModel.addAnnotation(annotationsToAdd[j], ((TemporaryAnnotation) annotationsToAdd[j]).getPosition());
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

      for (AnnotationFS annotation : annotations) {
        addAnnotationMap.put(new EclipseAnnotationPeer(annotation), new Position(annotation.getBegin(),
                annotation.getEnd() - annotation.getBegin()));
      }
     
      annotationModel.replaceAnnotations(null, addAnnotationMap);
    }

    /**
     * Removes a collection of annotations.
     *
 
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

      int removeAnnotationsIndex = 0;
      for (AnnotationFS annotation : deletedAnnotations) {
        removeAnnotations[removeAnnotationsIndex++] = new EclipseAnnotationPeer(annotation);
      }
     
      annotationModel.replaceAnnotations(removeAnnotations, null);
    }

    /**
     *
     * @param annotations
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

    if (bags != null && bags.size() > 0) {
      Annotation[] deletions= new Annotation[bags.size()];
      bags.toArray(deletions);
      if (!isCanceled(monitor))
        extension.replaceAnnotations(deletions, null);
    }
  }

  private void createSummaries(IProgressMonitor monitor) {
    ProjectionAnnotationModel model= fProjectionViewer.getProjectionAnnotationModel();
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

    if (additions.size() > 0) {
      if (fAnnotationModel instanceof IAnnotationModelExtension) {
        IAnnotationModelExtension extension= (IAnnotationModelExtension) fAnnotationModel;
        if (!isCanceled(monitor))
          extension.replaceAnnotations(null, additions);
      } else {
        Iterator e1= additions.keySet().iterator();
        while (e1.hasNext()) {
          AnnotationBag bag= (AnnotationBag) e1.next();
          Position position= (Position) additions.get(bag);
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

      }
    }

    if (fAnnotationModel instanceof IAnnotationModelExtension) {
      IAnnotationModelExtension ext= (IAnnotationModelExtension) fAnnotationModel;
      ext.replaceAnnotations((Annotation[]) fAnnotations.toArray(new Annotation[fAnnotations.size()]), added);
    } else {
      for (Iterator it= fAnnotations.iterator(); it.hasNext();) {
        Annotation annotation= (Annotation) it.next();
        fAnnotationModel.removeAnnotation(annotation);
      }
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

                MarkerAnnotation newAnnotation = new MarkerAnnotation(m);
                annotationsToAdd.put(newAnnotation, pos);
            }

            //update all in a single step
            modelExtension.replaceAnnotations(existing.toArray(new Annotation[0]), annotationsToAdd);
        }
    }

    public void onSave(PyEdit edit, IProgressMonitor monitor) {
    }
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

            thread.setPriority(Thread.NORM_PRIORITY);

            synchronized (getLockObject(annotationModel)) {
                //replace them
                IAnnotationModelExtension ext = (IAnnotationModelExtension) annotationModel;
                ext.replaceAnnotations(toRemove.toArray(new Annotation[0]), toAddAsMap);
            }

        } finally {
            thread.setPriority(initiaThreadlPriority);
        }
View Full Code Here

Examples of org.eclipse.jface.text.source.IAnnotationModelExtension.replaceAnnotations()

    if (bags != null && bags.size() > 0) {
      Annotation[] deletions= new Annotation[bags.size()];
      bags.toArray(deletions);
      if (!isCanceled(monitor))
        extension.replaceAnnotations(deletions, null);
    }
  }

  private void createSummaries(IProgressMonitor monitor, IAnnotationModel visualAnnotationModel) {
    ProjectionAnnotationModel model= fProjectionViewer.getProjectionAnnotationModel();
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.