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
fCurrentTarget.fWidget.addModifyListener(fCaretListener);
		fCurrentTarget.fShell= fCurrentTarget.fWidget.getShell();
		if (fCurrentTarget.fShell == null)
			leave(ILinkedListener.EXIT_ALL);
		fCurrentTarget.fShell.addShellListener(fCloser);
		fAssistant.install(viewer);
	}
	private String getUniqueKey() {
		return "linked.annotationmodelkey."+toString(); 
	}
	private void disconnect() {
		Assert.isNotNull(fCurrentTarget);
		ITextViewer viewer= fCurrentTarget.getViewer();
		Assert.isNotNull(viewer);
		fAssistant.uninstall();
		StyledText text= fCurrentTarget.fWidget;
		fCurrentTarget.fWidget= null;
		
		Shell shell= fCurrentTarget.fShell;
		fCurrentTarget.fShell= null;
		
		if (shell != null && !shell.isDisposed())
			shell.removeShellListener(fCloser);
		
		if (text != null && !text.isDisposed()) {
			text.removeModifyListener(fCaretListener);
			text.removeVerifyListener(fCaretListener);
		}