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
else
				return null;
		else
			return new Region(fFramePosition.getOffset(), fFramePosition.getLength());
	}
	private void rememberSelection(VerifyEvent event) {
		
		if (event.getSource() != fCurrentTarget.fWidget)
			return;
		Point selection= fCurrentTarget.getViewer().getSelectedRange();
		fCaretPosition.offset= selection.x + selection.y;
		fCaretPosition.length= 0;
		fCaretPosition.isDeleted= false;
		try {
			IDocument document= fCurrentTarget.getViewer().getDocument();
			boolean installCat= true;
			String[] cats= document.getPositionCategories();
			for (int i= 0; i < cats.length; i++) {
				if (getCategory().equals(cats[i]))
					installCat= false;
			}
			if (installCat) {
				document.addPositionCategory(getCategory());
				document.addPositionUpdater(fPositionUpdater);
			}
			if (document.getPositions(getCategory()).length != 0)
				document.removePosition(getCategory(), fCaretPosition);
			document.addPosition(getCategory(), fCaretPosition);
		} catch (BadLocationException e) {