Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.IAnnotationModel.removeAnnotation()


            .hasNext();) {
            Annotation annotation = it.next();
            if (annotation instanceof ViewportAnnotation) {
                if (((ViewportAnnotation) annotation).getSource()
                    .equals(source))
                    model.removeAnnotation(annotation);
            }
        }

        IDocument document = viewer.getDocument();
        try {
View Full Code Here


        if (sma != null) {
          // gray out the marker annotation
          sma.setGrayed(true);
        }
        // remove the temp one
        annotationModel.removeAnnotation(annotationsToRemove[i]);

      }
    }

    if (DEBUG) {
View Full Code Here

      }
    }
    if (!oldAnnotations.isEmpty()) {
      int size = oldAnnotations.size();
      for (int i = 0; i < size; i++) {
        annotationModel.removeAnnotation((Annotation) oldAnnotations.get(i));
      }
    }
  }

  /*
 
View Full Code Here

  }

  private void removeAnnotations(Collection<Annotation> annotations) {
    IAnnotationModel model = getDocumentProvider().getAnnotationModel(getEditorInput());
    for (Annotation annotation : annotations) {
      model.removeAnnotation(annotation);
    }
  }

  private void addAnnotations(Map<Annotation, Position> annotationToPositionMap) {
    IAnnotationModel model = getDocumentProvider().getAnnotationModel(getEditorInput());
View Full Code Here

        }
        if (doRemove) {
          if (supportsBatchReplace)
            toBeRemovedAnnotations.add(annotation);
          else
            model.removeAnnotation(annotation);
        }
      }
    }

    if (supportsBatchReplace && !toBeRemovedAnnotations.isEmpty()) {
View Full Code Here

        }
        if (doRemove) {
          if (supportsBatchReplace)
            toBeRemovedAnnotations.add(annotation);
          else
            model.removeAnnotation(annotation);
        }
      }
    }

    if (supportsBatchReplace && !toBeRemovedAnnotations.isEmpty()) {
View Full Code Here

    if(!isAnnotationDisplayed) {
      return;
    }
    final IAnnotationModel model = viewer.getAnnotationModel();
    if(model != null) {
      model.removeAnnotation(annotation);
      isAnnotationDisplayed = false;
    }
  }
 
  void displayHighlight(SourceViewer viewer) {
View Full Code Here

                        && pos.offset <= selectionOffset + length) {
                    Position newPos = new Position(pos.offset-selectionOffset,pos.length);
                   
                    annotationList.add(new AnnotationPosition(annotation,newPos));
                    // Remove the annotation for now.
                    aModel.removeAnnotation(annotation);
                }
                // The annotation starts in the selection, but doesn't end in it.
                else if(pos.offset >= selectionOffset
                        && pos.offset <= selectionOffset + length
                        && pos.offset + pos.length > selectionOffset + length) {
View Full Code Here

                }
                // The annotation starts in the selection, but doesn't end in it.
                else if(pos.offset >= selectionOffset
                        && pos.offset <= selectionOffset + length
                        && pos.offset + pos.length > selectionOffset + length) {
                    aModel.removeAnnotation(annotation);
                }
                // The annotation ends in the selection, but doesn't start in it
                else if (pos.offset + pos.length >= selectionOffset
                        && pos.offset + pos.length <= selectionOffset + length) {
                    aModel.removeAnnotation(annotation);
View Full Code Here

                    aModel.removeAnnotation(annotation);
                }
                // The annotation ends in the selection, but doesn't start in it
                else if (pos.offset + pos.length >= selectionOffset
                        && pos.offset + pos.length <= selectionOffset + length) {
                    aModel.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.