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
/*
		 * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
		 */
		public void selectionChanged(SelectionChangedEvent event) {
			ISelection selection= event.getSelection();
			if (selection instanceof ITextSelection) {
				ITextSelection textsel= (ITextSelection) selection;
				if (event.getSelectionProvider() instanceof ITextViewer) {
					IDocument doc= ((ITextViewer) event.getSelectionProvider()).getDocument();
					if (doc != null) {
						int offset= textsel.getOffset();
						int length= textsel.getLength();
						if (offset >= 0 && length >= 0) {
							LinkedPosition find= new LinkedPosition(doc, offset, length, LinkedPositionGroup.NO_STOP);
							LinkedPosition pos= fEnvironment.findPosition(find);
							if (pos == null && fExitPosition != null && fExitPosition.includes(find))
								pos= fExitPosition;
								
							if (pos != null)
								switchPosition(pos, false, false);
						}
					}
				}
			}
		}
	}