Examples of replaceAnnotations()


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()

      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()

      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 (model instanceof IAnnotationModelExtension) {
      IAnnotationModelExtension modelExt = (IAnnotationModelExtension) model;
      Annotation[] oldAnnotations = fAnnotations
          .toArray(new Annotation[fAnnotations.size()]);

      modelExt.replaceAnnotations(oldAnnotations, Collections.EMPTY_MAP);
    } else {
      for (Iterator i = model.getAnnotationIterator(); i.hasNext();) {
        Annotation a = (Annotation) i.next();

        if (a.getType().equals(fAnnotationType)) {
View Full Code Here

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

        Annotation anno = new Annotation(fAnnotationType, false,
            pm.message);
        newAnnotations.put(anno, pm.pos);
        fAnnotations.add(anno);
      }
      modelExt.replaceAnnotations(oldAnnotations, newAnnotations);
    } else {
      for (Iterator i = model.getAnnotationIterator(); i.hasNext();) {
        Annotation a = (Annotation) i.next();

        if (a.getType().equals(fAnnotationType)) {
View Full Code Here

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

        }

        // Remove collected annotations.
        if (model instanceof IAnnotationModelExtension) {
            IAnnotationModelExtension extension = (IAnnotationModelExtension) model;
            extension.replaceAnnotations(
                annotations.toArray(new Annotation[annotations.size()]),
                Collections.emptyMap());
        } else {
            if (!errorPrinted) {
                log.error("AnnotationModel does not "
View Full Code Here

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

                // If model supports IAnnotationModelExtension we can
                // just update the existing annotation.
                if (newAnnotation != null
                    && model instanceof IAnnotationModelExtension) {
                    IAnnotationModelExtension extension = (IAnnotationModelExtension) model;
                    extension.replaceAnnotations(
                        new Annotation[] { oldAnnotation },
                        Collections.singletonMap(newAnnotation, position));
                    return;
                }
                model.removeAnnotation(annotation);
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.