Bug 52476 [painting] redraw behavior
build M7 Annotated method AnnotationPainter.handleDrawRequest with a repaint counter. 1) Open TestCase.java 2) add line >String s= < to tearDown method, set caret at end of line 3) spell checking enabled, otherwise default settings 3) type a single space -> 1 immediate repaint, 3 after timeout 4) type " -> auto inserted closing " + linked mode -> 10 immediate repaints, 3 after timeout
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/link/LinkedUIControl.java
((ITextViewerExtension) fTargets[i].getViewer()).removeVerifyKeyListener(fCurrentTarget.fKeyListener);
				fCurrentTarget.fKeyListener= null;
			}
		}
		
		for (int i= 0; i < fTargets.length; i++) {
			
			if (fTargets[i].fAnnotationModel != null) {
				fTargets[i].fAnnotationModel.removeAllAnnotations();
				fTargets[i].fAnnotationModel= null;
			}
			
			ITextViewer vi= fTargets[i].getViewer();
			if (vi instanceof ISourceViewer) {
				ISourceViewer sv= (ISourceViewer) vi;
				IAnnotationModel model= sv.getAnnotationModel();
				
				if (model instanceof IAnnotationModelExtension) {
					IAnnotationModelExtension ext= (IAnnotationModelExtension) model;
					ext.removeAnnotationModel(getUniqueKey());
				}
				
			}
		}
		
		if (fExitPosition != null)
			fExitPosition.getDocument().removePosition(fExitPosition);
		if ((flags & ILinkedListener.UPDATE_CARET) != 0 && fExitPosition != null && fFramePosition != fExitPosition && !fExitPosition.isDeleted())
			switchPosition(fExitPosition, true, false);
		for (int i= 0; i < fTargets.length; i++) {