Bug 26271 Link-Like navigation: Pixel not removed
20021113 1. Create class public class A { private void fill(StringBuffer buffer, String s) { buffer.append(s); } } 2. CTRL pressed all the time 3. move the mouse over 'append' 4. While still presing CTRL go over 's' (same line) 5. You can see that there is still a blue pixel under 'append'
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
IJavaElement[] elements= ((ICodeAssist) input).codeSelect(offset, 0);
				if (elements == null || elements.length == 0)
					return null;
					
				return selectWord(viewer.getDocument(), offset);
					
			} catch (JavaModelException e) {
				return null;	
			}
		}
		private int getCurrentTextOffset(ISourceViewer viewer) {
			try {					
				StyledText text= viewer.getTextWidget();			
				if (text == null || text.isDisposed())
					return -1;
				Display display= text.getDisplay();				
				Point absolutePosition= display.getCursorLocation();
				Point relativePosition= text.toControl(absolutePosition);
				
				return text.getOffsetAtLocation(relativePosition) + viewer.getVisibleRegion().getOffset();
			} catch (IllegalArgumentException e) {
				return -1;
			}			
		}
		private void highlightRegion(ISourceViewer viewer, IRegion region) {
			if (region.equals(fActiveRegion))
				return;
			repairRepresentation();
			StyledText text= viewer.getTextWidget();
			if (text == null || text.isDisposed())