model.removeAllAnnotations(); model.replaceAnnotations(null, additions);
List removals= new LinkedList(); Iterator existing= model.getAnnotationIterator(); while (existing.hasNext()) removals.add(existing.next()); model.replaceAnnotations((Annotation[]) removals.toArray(new Annotation[removals.size()]), additions);
	public void initialize() {		if (!isInstalled())			return;		initializePreferences();		try {			IDocumentProvider provider= fEditor.getDocumentProvider();			fCachedDocument= provider.getDocument(fEditor.getEditorInput());			fAllowCollapsing= true;			fFirstType= null;			fHasHeaderComment= false;			if (fEditor instanceof CompilationUnitEditor) {				IWorkingCopyManager manager= JavaPlugin.getDefault().getWorkingCopyManager();				fInput= manager.getWorkingCopy(fEditor.getEditorInput());			} else if (fEditor instanceof ClassFileEditor) {				IClassFileEditorInput editorInput= (IClassFileEditorInput) fEditor.getEditorInput();				fInput= editorInput.getClassFile();			}			if (fInput != null) {				ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class);				if (model != null) {					if (fInput instanceof ICompilationUnit) {						ICompilationUnit unit= (ICompilationUnit) fInput;						synchronized (unit) {							try {								unit.reconcile(ICompilationUnit.NO_AST, false, null, null);							} catch (JavaModelException x) {							}						}					}					Map additions= computeAdditions((IParent) fInput);					model.removeAllAnnotations();					model.replaceAnnotations(null, additions);				}			}		} finally {			fCachedDocument= null;			fAllowCollapsing= false;			fFirstType= null;			fHasHeaderComment= false;		}	}