Bug 77598 [nls tooling] NLS hovers / Ctrl+Click not consistent for duplicate keys
20041103 With the following files, the key A.0 is duplicate. - Ctrl + Click: Junps to 'hello' - Hover over "A.0" in class A: shows 'world' public class A { String h= Messages.getString("A.0"); //$NON-NLS-1$ } messages.properties: A.0=hello A.0=world
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
return widgetOffset + viewer.getVisibleRegion().getOffset();
				}
			} catch (IllegalArgumentException e) {
				return -1;
			}			
		}
		public void applyTextPresentation(TextPresentation textPresentation) {
			if (fActiveRegion == null)
				return;
			IRegion region= textPresentation.getExtent();
			if (fActiveRegion.getOffset() + fActiveRegion.getLength() >= region.getOffset() && region.getOffset() + region.getLength() > fActiveRegion.getOffset())
				textPresentation.mergeStyleRange(new StyleRange(fActiveRegion.getOffset(), fActiveRegion.getLength(), fColor, null));
		}
		
		private void highlightRegion(ISourceViewer viewer, IRegion region) {
			if (region.equals(fActiveRegion))
				return;
			repairRepresentation();
			
			StyledText text= viewer.getTextWidget();
			if (text == null || text.isDisposed())
				return;
			
			
			int offset= 0;
			int length= 0;
			if (viewer instanceof ITextViewerExtension5) {
				ITextViewerExtension5 extension= (ITextViewerExtension5) viewer;
				IRegion widgetRange= extension.modelRange2WidgetRange(region);
				if (widgetRange == null)