Package org.eclipse.compare
Interface INavigatable
public interface INavigatable
Interface that allow clients to navigate through the changes shown in a compare pane.
This interface may be implemented by clients.
- Since:
- 3.3
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intChange flag used to navigate to the first change.static final intChange flag used to navigate to the last change.static final StringProperty key that can be used to associate an instance of this interface with an SWT widget usingWidget.setData(String, Object).static final intChange flag used to navigate to the next change.static final intChange flag used to navigate to the previous change. -
Method Summary
Modifier and TypeMethodDescriptiongetInput()Return the input of the compare pane being navigated ornullif the pane does not have an input.booleanhasChange(int changeFlag) Return whether a call toselectChange(int)with the same parameter would succeed.booleanRequest that the currently selected change be opened.booleanselectChange(int changeFlag) Starting from the current selectionselectChangeselects and reveals the specified change.
-
Field Details
-
NAVIGATOR_PROPERTY
Property key that can be used to associate an instance of this interface with an SWT widget usingWidget.setData(String, Object).- See Also:
-
NEXT_CHANGE
static final int NEXT_CHANGEChange flag used to navigate to the next change.- See Also:
-
PREVIOUS_CHANGE
static final int PREVIOUS_CHANGEChange flag used to navigate to the previous change.- See Also:
-
FIRST_CHANGE
static final int FIRST_CHANGEChange flag used to navigate to the first change.- See Also:
-
LAST_CHANGE
static final int LAST_CHANGEChange flag used to navigate to the last change.- See Also:
-
-
Method Details
-
getInput
Object getInput()Return the input of the compare pane being navigated ornullif the pane does not have an input.- Returns:
- the input of the compare pane being navigated or
null
-
selectChange
boolean selectChange(int changeFlag) Starting from the current selectionselectChangeselects and reveals the specified change. If the end (or beginning) is reached, the method returnstrue.- Parameters:
changeFlag- the change to be selected. One ofNEXT_CHANGE,PREVIOUS_CHANGE,FIRST_CHANGEorLAST_CHANGE.- Returns:
- returns
trueif end (beginning) is reached,falseotherwise
-
hasChange
boolean hasChange(int changeFlag) Return whether a call toselectChange(int)with the same parameter would succeed.- Parameters:
changeFlag- the change to be selected. One ofNEXT_CHANGEorPREVIOUS_CHANGE- Returns:
- whether a call to
selectChange(int)with the same parameter would succeed.
-
openSelectedChange
boolean openSelectedChange()Request that the currently selected change be opened. Returntrueif the request resulted in the change being opened andfalseif the currently selected change could not be opened.- Returns:
- whether the selected change was opened.
-