Bug 11882 structured selection: remembering history should stop on 'whole-cu-selected' case
credit goes to Erich for finding this one when you press alt+up many times you select the whole cu when you press it again a couple of times then it takes the same number of times to bring it down again with alt+down it should stop stacking ranges when the range covers the full cu
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/structureselection/StructureSelectionAction.java
public static final String NEXT= "SelectNextElement"; 
	public static final String PREVIOUS= "SelectPreviousElement"; 
	public static final String ENCLOSING= "SelectEnclosingElement"; 
	public static final String HISTORY= "RestoreLastSelection"; 
	private CompilationUnitEditor fEditor;
	private SelectionHistory fSelectionHistory;
	protected StructureSelectionAction(String text, CompilationUnitEditor editor, SelectionHistory history) {
		super(text);
		Assert.isNotNull(editor);
		Assert.isNotNull(history);
		fEditor= editor;
		fSelectionHistory= history;
	}
	
	/*
	 * This constructor is for testing purpose only.
	 */
	protected StructureSelectionAction() {
		super(""); 
	}
	
	/* (non-JavaDoc)
	 * Method declared in IAction.
	 */
	public final  void run() {
		ITextSelection selection= getTextSelection();
		fSelectionHistory.remember(new SourceRange(selection.getOffset(), selection.getLength()));
		ISourceRange newRange= getNewSelectionRange(createSourceRange(selection), getCompilationUnit());
		try {