Implement CommitFileRevision.equals() and hashCode() so editors can be reused
commit180f41228f53959114b06b0c2ef309d1231c1479
authorRemy Suen <remysuen@ca.ibm.com>
Fri, 23 Apr 2010 00:40:00 +0000 (22 20:40 -0400)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 3 Jun 2010 22:10:26 +0000 (4 00:10 +0200)
tree1cb67d6553888b41749e5acfb9d056f5b39ec81c
parentd026338aad11b4ac718be72b3d0eee4f06b6a689
Implement CommitFileRevision.equals() and hashCode() so editors can be reused

When editors are asked to be opened in the Eclipse workbench, the
default behaviour is to simply activate an existing editor if an
existing editor shares the input with the input that is to be
opened. The contract for comparing editor inputs is via the
equals(Object) method. For a FileRevisionEditorInput, this
is implemented by checking the equality between the two inputs'
underlying file revisions. As such, CommitFileRevision should
implement equals(Object) (and hashCode() for consistency) so that
the same editor can be reused instead of having multiple editors
open on a given revision.

Change-Id: I2abeef934b21986979f84f9836e0bf2b44eff41f
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/CommitFileRevision.java