Bug 45444 Open declaration on local variable doesn't select variable name
Build 20031023 1. Create the following cu: public class X { void foo() { int var = 1; var++; } } 2. Select 'var' in the 'var++;' statement 3. F3 Observe: The cursor goes to the begining of the 'int var = 1;' statement. I would expect that 'var' is selected in this statement.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
final StyledText text= viewer.getTextWidget();
			if (text != null && !text.isDisposed()) {
				
				final Point selection= text.getSelection();
				final int caret= text.getCaretOffset();
				final int offset= modelOffset2WidgetOffset(viewer, position);
				
				if (caret == selection.x)
					text.setSelectionRange(selection.y, offset - selection.y);
				else
					text.setSelectionRange(selection.x, offset - selection.x);		
			}
		}
	}
	/**
	 * Quick format action to format the enclosing java element.
	 * <p>
	 * The quick format 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 QuickFormatAction extends Action {