Package org.eclipse.compare
Class CompareNavigator
- java.lang.Object
-
- org.eclipse.compare.CompareNavigator
-
- All Implemented Interfaces:
ICompareNavigator
public abstract class CompareNavigator extends Object implements ICompareNavigator
Supports cross-pane navigation through the differences of a compare container.Clients may subclass this class.
- Since:
- 3.3
- See Also:
INavigatable
-
-
Constructor Summary
Constructors Constructor Description CompareNavigator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract INavigatable[]
getNavigatables()
protected INavigatable
getNavigator(Object object)
Returns theINavigatable
for the given object if the object adapts toINavigatable
.boolean
hasChange(boolean next)
Returns whether a call toICompareNavigator.selectChange(boolean)
with the same parameter would succeed.boolean
selectChange(boolean next)
Starting from the current selectionselectChange
selects and reveals the next (previous) change.
-
-
-
Method Detail
-
selectChange
public boolean selectChange(boolean next)
Description copied from interface:ICompareNavigator
Starting from the current selectionselectChange
selects and reveals the next (previous) change. If the end (or beginning) is reached, the method returnstrue
.- Specified by:
selectChange
in interfaceICompareNavigator
- Parameters:
next
- iftrue
the next change is selected, otherwise the previous change- Returns:
- returns
true
if end (beginning) is reached,false
otherwise
-
getNavigatables
protected abstract INavigatable[] getNavigatables()
-
getNavigator
protected final INavigatable getNavigator(Object object)
Returns theINavigatable
for the given object if the object adapts toINavigatable
.- Parameters:
object
- the object- Returns:
- the
INavigatable
for the given object ornull
-
hasChange
public boolean hasChange(boolean next)
Returns whether a call toICompareNavigator.selectChange(boolean)
with the same parameter would succeed.- Parameters:
next
- iftrue
the next change is selected, otherwise the previous change- Returns:
- whether a call to
ICompareNavigator.selectChange(boolean)
with the same parameter would succeed. - Since:
- 3.3
-
-