1 /******************************************************************************* 2 * Copyright (c) 2003, 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.compare; 12 13 /** 14 * A <code>ICompareNavigator</code> is used to navigate through the individual 15 * differences of a <code>CompareEditorInput</code> or another type of Compare container. 16 * <p> 17 * You can retrieve an object implementing the <code>ICompareNavigator</code> from a 18 * <code>CompareEditorInput</code> by calling <code>getAdapter(ICompareNavigator)</code> 19 * on the <code>CompareEditorInput</code>. 20 * </p> 21 * <p> 22 * Although it is legal for clients to implement this interface, it is better 23 * to subclass {@link CompareNavigator}. 24 * 25 * @since 3.0 26 */ 27 public interface ICompareNavigator { 28 29 /** 30 * Starting from the current selection <code>selectChange</code> selects and reveals the next (previous) change. 31 * If the end (or beginning) is reached, the method returns <code>true</code>. 32 * 33 * @param next if <code>true</code> the next change is selected, otherwise the previous change 34 * @return returns <code>true</code> if end (beginning) is reached, <code>false</code> otherwise 35 */ 36 public boolean selectChange(boolean next); 37 38 } 39