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
if (position != null) {
				ITextViewerExtension extension= (ITextViewerExtension) fCurrentTarget.getViewer();
				IRewriteTarget target= extension.getRewriteTarget();
				
				if (!position.equals(fPreviousPosition) && fHasOpenCompoundChange) {
					target.endCompoundChange();
					fHasOpenCompoundChange= false;
				}
				
				if (!fHasOpenCompoundChange) {
					target.beginCompoundChange();
					fHasOpenCompoundChange= true;
				}
			}
			fPreviousPosition= position;
			return fPreviousPosition != null;
		}
		/**
		 * @param enabled the new enabled state
		 */
		public void setEnabled(boolean enabled) {
			fIsEnabled= enabled;
		}
	}
	/**
	 * Installed as post selection listener on the watched viewer. Updates the
	 * linked position after cursor movement, even to positions not in the
	 * iteration list.
	 */
	private class MySelectionListener implements ISelectionChangedListener {