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
* <p>
	 * The format element action works as follows:
	 * <ul>
	 * <li>If there is no selection and the caret is positioned on a Java element,
	 * only this element is formatted. If the element has some accompanying comment,
	 * then the comment is formatted as well.</li>
	 * <li>If the selection spans one or more partitions of the document, then all
	 * partitions covered by the selection are entirely formatted.</li>
	 * <p>
	 * Partitions at the end of the selection are not completed, except for comments.
	 * 
	 * @since 3.0
	 */
	protected class FormatElementAction extends Action {
		/*
		 * @see org.eclipse.jface.action.IAction#run()
		 */
		public void run() {
			final JavaSourceViewer viewer= (JavaSourceViewer) getSourceViewer();
			if (viewer.isEditable()) {
				final Point selection= viewer.rememberSelection();
				try {
					viewer.setRedraw(false);
					final String type= TextUtilities.getContentType(viewer.getDocument(), IJavaPartitions.JAVA_PARTITIONING, selection.x, true);
					if (type.equals(IDocument.DEFAULT_CONTENT_TYPE) && selection.y == 0) {
						try {
							final IJavaElement element= getElementAt(selection.x, true);
							if (element != null && element.exists()) {
								final int kind= element.getElementType();
								if (kind == IJavaElement.TYPE || kind == IJavaElement.METHOD || kind == IJavaElement.INITIALIZER) {