|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for objects used as input to a two-way or three-way compare viewer. It defines API for accessing the three sides for the compare, and a name and image which is used when displaying the three way input in the UI, for example, in a title bar.
Note: at most two sides of an ICompareInput can be null, (as it is normal for additions or deletions) but not all three.
ICompareInput provides methods for registering ICompareInputChangeListeners that get informed if one (or more) of the three sides of an ICompareInput object changes its value.
For example when accepting an incoming addition the (non-null) left side of an ICompareInput is copied to the right side by means of method copy. This should trigger a call to compareInputChanged of registered ICompareInputChangeListeners.
Clients can implement this interface, or use the convenience implementation DiffNode.
Method Summary | |
void | addCompareInputChangeListener(ICompareInputChangeListener listener)
Registers the given listener for notification. |
void | copy(boolean leftToRight)
Copy one side (source) to the other side (destination) depending on the value of leftToRight. |
ITypedElement | getAncestor()
Returns the ancestor side of this input. |
Image | getImage()
Returns an image representing this input. |
int | getKind()
Returns the kind of difference between the three sides ancestor, left and right. |
ITypedElement | getLeft()
Returns the left side of this input. |
String | getName()
Returns name of input. |
ITypedElement | getRight()
Returns the right side of this input. |
void | removeCompareInputChangeListener(ICompareInputChangeListener listener)
Unregisters the given listener. |
Method Detail |
public String getName()
public Image getImage()
public int getKind()
public ITypedElement getAncestor()
public ITypedElement getLeft()
public ITypedElement getRight()
public void addCompareInputChangeListener(ICompareInputChangeListener listener)
public void removeCompareInputChangeListener(ICompareInputChangeListener listener)
public void copy(boolean leftToRight)
The implementation should handle the following cases:
|
Eclipse Platform Release 3.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.