DESCRIPTION

Bug 459981 - Add a CachedCheckboxTreeViewer, which caches the checked
elements even if it is filtered 

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

COMMENTS

author: Krista Shepherd
date: 2015-02-16 09:52:43.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2015-02-16 10:04:51.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2015-02-16 10:25:12.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Zaid Mosley
date: 2015-02-16 17:01:40.000000000

Patch Set 2:

Andrey, can you review this one?

-------------------------------------
author: Jayvion Booth
date: 2015-02-16 21:18:03.000000000

Patch Set 2:

(8 comments)

I've commented on few smaller issues, the most interesting one is for me the API change on CheckboxTreeViewer.java.

Beside this if the proposed 2 classes should be made API too I personally would wish me test case(s) which can demonstrate how this API is supposed to work and especially provide a small snippet so that one can see how this looks like in real life.

Line:8, /COMMIT_MSG -> Trailing space.

Line:437, bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/CheckboxTreeViewer.java -> I'm not big expert but this is an API change - shouldn't we increment some versions, change pom's? What is the procedure?

Line:2, bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/viewer/CachedCheckboxTreeViewer.java -> 2015

Line:33, bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/viewer/CachedCheckboxTreeViewer.java -> Typo: did you mean ContainerCheckedTreeViewer?

Line:47, bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/viewer/CachedCheckboxTreeViewer.java -> Copy/paste from parent: should be CachedCheckboxTreeViewer

Line:58, bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/viewer/CachedCheckboxTreeViewer.java -> Call it paranoia, but I would always add listeners as a *last* step in constructor - otherwise it can happen that callbacks are running on a partly created object.

Line:177, bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/viewer/ContainerCheckedTreeViewer.java -> Can you please move the comment above down to the  if() blocks? I tried long to  understand why the "curr" element is not created yet :-)

Line:184, bundles/org.eclipse.e4.ui.dialogs/src/org/eclipse/e4/ui/dialogs/viewer/ContainerCheckedTreeViewer.java -> Not sure, but is it guaranteed that the children of checked node are checked too? Can't "curr" checked node be "grayed" at same time - means not all of the children are checked and so we have to check each child for "checked" state too?

-------------------------------------
author: Sebastian Porter
date: 2015-02-23 09:47:44.000000000

Patch Set 2: Code-Review-2

xxx@xxx.xxx This class is not intended to be subclassed by clients.
 */
public class CheckboxTreeViewer extends TreeViewer implements ICheckable {


If you really want to remove that restriction from CheckboxTreeViewer you'll first have to make a thorough review of the existing API and verify(make sure that it can safely be subclassed by clients.

-------------------------------------
author: Zaid Mosley
date: 2015-03-23 15:15:37.000000000

Patch Set 2:

Dani, we are already subclasses it in platform.ui. See ContainerCheckedTreeViewer. Also other plug-ins are subclassing it, see CachedCheckboxTreeViewer from EGit.

-------------------------------------
author: Sebastian Porter
date: 2015-04-13 13:43:04.000000000

Patch Set 2:

Just because some violate a contract/law doesn't give you the right the to the same.

-------------------------------------
author: Sebastian Porter
date: 2015-04-13 13:44:01.000000000

Patch Set 2:

> Just because some violate a contract/law doesn't give you the right the to the same.

Just because some violate a contract/law doesn't give you the right to do the same.

-------------------------------------
author: Zaid Mosley
date: 2015-04-13 14:17:52.000000000

Patch Set 2:

> Just because some violate a contract/law doesn't give you the right to do the same.

There seems to be a need for this extensions. AFAIK we in platform.ui allow the extension of our internal stuff and if enough people start using it, we think about releasing it as API.

-------------------------------------
author: Sebastian Porter
date: 2015-04-13 16:45:53.000000000

Patch Set 2:

> AFAIK we in platform.ui allow the extension of our internal stuff 

This patch is not *internal* but adds API ;-).

-------------------------------------
author: Zaid Mosley
date: 2015-04-13 19:09:40.000000000

Patch Set 2:

Bug is not targeted anymore for 4.5, so lets discuss this bug in 4.6.

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