DESCRIPTION

Bug 489382 - [Databinding] Provide a composite ISideEffect

Change-Id: Ia10cc2baf6f978a3d6a41e3a54338615236a5338
Also-By: Kelly Potter xxx@xxx.xxx
Signed-off-by: Krista Shepherd xxx@xxx.xxx


COMMENTS

author: Kelly Potter
date: 2016-04-14 01:47:53.000000000

Uploaded patch set 23.

-------------------------------------
author: Brenden Conley
date: 2016-04-14 01:48:00.000000000

Patch Set 23:

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

-------------------------------------
author: Brenden Conley
date: 2016-04-14 02:13:45.000000000

Patch Set 23: Verified+1

Build Successful 

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

-------------------------------------
author: Brock Pruitt
date: 2016-04-14 02:43:09.000000000

Patch Set 23:

(14 comments)

Line:28, bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetSideEffects.java -> Unnecessary blank line.

Line:47, bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/swt/WidgetSideEffects.java -> Better to break after =

Line:152, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/SideEffect.java -> Throw IllegalStateException is pauseDepth becomes negative.

Line:51, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/ICompositeSideEffect.java -> Didn't we decide to get rid of this interface?

Line:52, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/ICompositeSideEffect.java -> Remove this blank like to keep the style consistent with ISideEffect. 

Same in other files.

Line:156, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ISideEffect.java -> This increments -> Increments

Line:170, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ISideEffect.java -> This increments -> Increments

Line:202, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ISideEffect.java -> What is the use case for listening to dispose events on a side effect?

Line:26, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/sideeffect/SideEffectFactory.java -> Unnecessary blank line.

Line:27, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/sideeffect/CompositeSideEffect.java -> Remove blank line.

Line:29, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/sideeffect/CompositeSideEffect.java -> Didn't we decide to get rid of ICompositeSideEffect?

Line:31, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/sideeffect/CompositeSideEffect.java -> Make final.

Line:34, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/sideeffect/CompositeSideEffect.java -> Make final.

Line:108, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/sideeffect/CompositeSideEffect.java -> Throw IllegalStateException if pauseDepth becomes negative.

-------------------------------------
author: Kelly Potter
date: 2016-04-14 03:16:54.000000000

Patch Set 23:

(5 comments)

Line:152, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/SideEffect.java -> Good idea.

Line:51, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/ICompositeSideEffect.java -> Yep. It's on the TODO list.

Line:52, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/ICompositeSideEffect.java -> We should really add the line to ISideEffect. It's the one that's inconsistent with the rest of the files in this plugin.

Line:202, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/ISideEffect.java -> The driving use-case is to prevent leaks in CompositeSideEffect. Unless it gets some kind of notification, there's no way to free up the memory when a side-effect is disposed externally or via the consumeOnce method.

That's the only concrete use-case we have at the moment, but it seems important.

Line:29, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/sideeffect/CompositeSideEffect.java -> yes

-------------------------------------
author: Brock Pruitt
date: 2016-04-14 03:28:27.000000000

Patch Set 23:

(1 comment)

Line:52, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/ICompositeSideEffect.java -> This line serves no useful purpose. We should keep consistency with good examples not the bad ones.

-------------------------------------
author: Kelly Potter
date: 2016-04-14 14:42:44.000000000

Patch Set 23:

(1 comment)

Line:52, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/ICompositeSideEffect.java -> I can think of a bunch of reasons why the presence of whitespace here actually better... but I won't get into them. The trouble with trying to justify something like formatting style is that the main reason engineers tend to like one style versus another is aesthetic preference, but the reasons stated in such arguments are usually rationalizations meant to dress up their aesthetic preference as objective Leon Ochoaefits. Quite often the engineers are unaware that they're rationalizing which makes such arguments really frustrating even when well intentioned.

So let's not do that.

You prefer no line there and I prefer the line. In this case, the other maintainers of this library appear to share my own tastes so I'd say it's entirely appropriate to continue using this style.

-------------------------------------
author: Gerrit Code Review
date: 2016-04-20 22:10:47.000000000

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

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