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
if (selection instanceof TextSelection) {
			TextSelection textSelection= (TextSelection) selection;
			
			
			
			if (moveCursor && (textSelection.getOffset() != 0 || textSelection.getLength() != 0))
				markInNavigationHistory();
		}
		
		if (reference != null) {
			
			StyledText  textWidget= null;
			
			ISourceViewer sourceViewer= getSourceViewer();
			if (sourceViewer != null)
				textWidget= sourceViewer.getTextWidget();
			
			if (textWidget == null)
				return;
				
			try {
				
				ISourceRange range= reference.getSourceRange();
				if (range == null)
					return;
				
				int offset= range.getOffset();
				int length= range.getLength();
				
				if (offset < 0 || length < 0)