Bug 5877 Rename package -> selection incorrect
1. select text in a .java file 2. rename the package of that file using the rename menu option 3. notice that the selection has moved Perhaps because selection index isn't updated when the .java file text changes to reflect the new package.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
interface ITextConverter {
		void customizeDocumentCommand(IDocument document, DocumentCommand command);
	};
	
	
	class AdaptedRulerLayout extends Layout {
		
		protected int fGap;
		protected AdaptedSourceViewer fAdaptedSourceViewer;
		
		
		protected AdaptedRulerLayout(int gap, AdaptedSourceViewer asv) {
			fGap= gap;
			fAdaptedSourceViewer= asv;
		}
		
		protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
			Control[] children= composite.getChildren();
			Point s= children[children.length - 1].computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache);
			if (fAdaptedSourceViewer.isVerticalRulerVisible())
				s.x += fAdaptedSourceViewer.getVerticalRuler().getWidth() + fGap;
			return s;
		}