DESCRIPTION

Bug 478611 - [DataBinding] Create snippets for the SideEffect class

Change-Id: Ia3dcf6a372f0a2c3a5ae81905bfd72c7a1b9856a
Signed-off-by: Krista Shepherd xxx@xxx.xxx

COMMENTS

author: Krista Shepherd
date: 2015-09-29 09:12:44.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2015-09-29 09:12:50.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/6840/

-------------------------------------
author: Brenden Conley
date: 2015-09-29 09:31:04.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/6840/ : SUCCESS

-------------------------------------
author: Kelly Potter
date: 2015-09-29 17:52:16.000000000

Patch Set 1:

(2 comments)

Line:40, examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/SnippetSideEffektTwoWayBinding.java -> SideEffect uses a c, not a k.

Line:133, examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/SnippetSideEffektTwoWayBinding.java -> This looks good, but we may need to fix the hashCode and equals methods on IObservableValue before this will work without creating an infinite cycle.

-------------------------------------
author: Krista Shepherd
date: 2015-09-29 21:49:21.000000000

Patch Set 1:

(1 comment)

I'll correct the typo now.
Please also see my inline comment on the other issue

Line:133, examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/SnippetSideEffektTwoWayBinding.java -> In this sample it works quite well, I thought using	ObservableTracker.setIgnore(true); in the Runnable does the trick. Or is this a false conclusion?

-------------------------------------
author: Kelly Potter
date: 2015-09-30 03:28:16.000000000

Patch Set 1:

(1 comment)

Line:133, examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/SnippetSideEffektTwoWayBinding.java -> It does work -- and it's supposed to - but it's a bit brittle due to a bug in many of the observable classes. They use newValue == oldValue to detect redundant changes rather than newValue.equals(oldValue), which is what they should be using. As a consequence, if you'd transformed the string in any way before passing it to summaryText.setText, there would be a big risk of infinite looping.

This isn't a bug in your example (your example is fine), but we may want to hold off on recommending the use of sideEffects for bidirectional bindings until we sort it out.

-------------------------------------
author: Gerrit Code Review
date: 2015-12-03 04:09:28.000000000

Change has been successfully merged into the git repository by Krista Shepherd

-------------------------------------
