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
private Color getColor(String key) {
		RGB rgb= PreferenceConverter.getColor(getPreferenceStore(), key);
		return getColor(rgb);
	}
	
	private Color getColor(RGB rgb) {
		JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
		return textTools.getColorManager().getColor(rgb);
	}
	
	/*
	 * @see AbstractTextEditor#dispose()
	 */
	public void dispose() {
		if (fPropertyChangeListener != null) {
			Preferences preferences= JavaCore.getPlugin().getPluginPreferences();
			preferences.removePropertyChangeListener(fPropertyChangeListener);
			fPropertyChangeListener= null;
		}
		
		if (fJavaEditorErrorTickUpdater != null) {
			fJavaEditorErrorTickUpdater.dispose();
			fJavaEditorErrorTickUpdater= null;
		}
		
		if (fSelectionHistory != null)
			fSelectionHistory.dispose();
		
		stopBracketHighlighting();