Bug 162630 - [DataBinding] Issues with IDiff
Summary: [DataBinding] Issues with IDiff
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M6   Edit
Assignee: Boris Bokowski CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on: 175840
Blocks: 171906
  Show dependency tree
 
Reported: 2006-10-27 17:02 EDT by Michael Valenta CLA
Modified: 2007-03-23 08:57 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Valenta CLA 2006-10-27 17:02:24 EDT
I was having a look at the databinding code and noticed there was an IDiff. The name of this implies comparison (e.g. Compare as a DiffNode and Team has an IDiff for decribing the difference between two elements or trees being compared. Perhaps IChange would be a better name.

I also noticed that the interface had no methods. Doesn't really seem like having it buys you much. Yes, you can only use IDiffs with the binding event but clients would still need to look for a specific type of diff.

Also, in talking to Boris, I think the intent is to not allow clients to implement the interface. The javadoc should spec this.
Comment 1 Peter Centgraf CLA 2007-02-27 18:07:02 EST
As of 3.3M5, it appears that this interface is not used anywhere.  The generic ChangeEvent does not provide a diff at all, and all of the subclasses use specialized variants like ListDiff.  I suggest that it be removed entirely to simplify the API.
Comment 2 Boris Bokowski CLA 2007-02-27 19:55:43 EST
It is only referenced from BindinEvent, which I would ike to remove too.
Comment 3 Boris Bokowski CLA 2007-02-28 09:53:47 EST
IDiff can be removed once BindingListener/BindingEvent has been removed (see bug 175840).
Comment 4 Peter Centgraf CLA 2007-02-28 11:18:10 EST
I would prefer not to lose IBindingListener, but I don't think it blocks removing IDiff.  The only difference IDiff makes (as opposed to typing the diff field as Object) is to prevent arbitrary data from being set in the field and to document the possible value types.  For consumers of the field's data, it does not provide anything that a Javadoc comment cannot.  For the framework, it provides a very minor safety check.

Note that the diff field itself can be valuable, since computing a ListDiff is expensive.  (I've never needed it myself, though.)  If you dislike untyped fields, it's probably better to keep the IDiff type than to lose IBindingListener or the diff field.
Comment 5 Mike Wilson CLA 2007-03-07 10:13:27 EST
+1
Comment 6 Boris Bokowski CLA 2007-03-13 00:22:34 EDT
Fixed by removing IDiff. Released >20070312.
Comment 7 Kim Horne CLA 2007-03-23 08:57:50 EDT
Verified in I20070322-1800