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
package org.eclipse.jdt.internal.ui.javaeditor.structureselection;
import java.util.Collection;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.util.Assert;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.ISourceRange;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.Block;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.eclipse.jdt.internal.corext.SourceRange;
import org.eclipse.jdt.internal.corext.dom.Selection;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor;
public abstract class StructureSelectionAction extends Action {