Bug 26306 Quick assist offers rename on expression
Build I20021113 - open TestCase.toString - select name()+"("+getClass().getName()+")" - open quick assist ==> offers rename (surprisingly) and not new local
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionAssistant.java
if (newOffset <= initalOffset && invocationOffset >= initalOffset)
			return newOffset;
		if (newOffset <= initalOffset && invocationOffset < initalOffset)
			return Math.max(invocationOffset, newOffset);;
		if (invocationOffset <= initalOffset)
			return invocationOffset;
		
		return Math.max(invocationOffset, newOffset);
	}
	/* 
	 * @see org.eclipse.jface.text.contentassist.ContentAssistant#possibleCompletionsClosed()
	 */
	protected void possibleCompletionsClosed() {
		super.possibleCompletionsClosed();
		restorePosition();
	}
	private void storePosition() {
		int initalOffset= fViewer.getSelectedRange().x;
		int length= fViewer.getSelectedRange().y;
		fPosition= new Position(initalOffset, length);
	}
	private void restorePosition() {
		if (fPosition != null && !fPosition.isDeleted()) {
			fViewer.setSelectedRange(fPosition.offset, fPosition.length);
			fViewer.revealRange(fPosition.offset, fPosition.length);
		}
		fPosition= null;
	}
}