DESCRIPTION

Bug 446616 - Abstract SelectionDialog should be available in JFace

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

COMMENTS

author: Krista Shepherd
date: 2015-02-18 11:22:00.000000000

Uploaded patch set 12.

-------------------------------------
author: Brenden Conley
date: 2015-02-18 11:22:07.000000000

Patch Set 12:

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

-------------------------------------
author: Zaid Mosley
date: 2015-02-18 11:36:57.000000000

Patch Set 12:

(3 comments)

Sorry, if we discussed that before, but for this new dialog, maybe we should only supports lists as input?

Line:2, bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/SelectionDialog.java -> 2015, this review took a bit longer than expected. :-)

Line:132, bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/SelectionDialog.java -> Not sure if we discussed that already but I think with a new dialog we may also choose to supports only lists instead of Arrays and lists. 

Can you explain (again) why you want to support both?

Line:183, bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/SelectionDialog.java -> Same as above, maybe we should only support Lists?

-------------------------------------
author: Brenden Conley
date: 2015-02-18 11:40:27.000000000

Patch Set 12: Verified+1

Build Successful 

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

-------------------------------------
author: Sebastian Porter
date: 2015-02-18 11:52:58.000000000

Patch Set 12: Code-Review-2

It's always painful if the same type comes in from two bundles. If we really need such a dialog we must think of a better name. Speaking of "need", our rule is always that we also use the new API somewhere in the SDK.

Replacing the dialog in the IDE bundle does not count to justify the need for the new class. Those changes should be removed.

-------------------------------------
author: Zaid Mosley
date: 2015-02-18 11:56:13.000000000

Patch Set 12:

Dani, the "need" comes from the RCP side. Customers which implement the RCP application based on Eclipse 4 cannot access the existing SelectionDialog.

-------------------------------------
author: Sebastian Porter
date: 2015-02-18 11:57:44.000000000

Patch Set 12:

Yes, I know. I think we have some RCP / e4 examples. Those would have to be updated to use the new class.

-------------------------------------
author: Zaid Mosley
date: 2015-02-18 11:58:24.000000000

Patch Set 12:

>  Those would have to be updated to use the new class.

Good suggestion. Can you also recommend a new name for the new class?

-------------------------------------
author: Sebastian Porter
date: 2015-02-18 12:02:54.000000000

Patch Set 12:

Depending on what it allows to select form, this could become part of the name. Another solution would be to just name it AbstractSelectionDialog ;-).

-------------------------------------
author: Zaid Mosley
date: 2015-02-18 12:12:13.000000000

Patch Set 12:

+1 for AbstractSelectionDialog

I think it also makes sense to use this dialog in the IDE, I don't understand the reason why Nevaeh Wu should not use it in the IDE code.

-------------------------------------
author: Krista Shepherd
date: 2015-02-18 12:13:44.000000000

Patch Set 12:

(2 comments)

Okay then I'll rename the Dialog to AbstractSelectionDialog and update the E4 examples, so that they use the new AbstractSelectionDialog.

@Lars Please see inline comments

Line:132, bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/SelectionDialog.java -> The reason for this is the fact, that a client should not be forced to create a new list, even if only one object is passed. So the varargs allow something like this: 

setInitialSelection({singleObjectWhichIsNotAList});

Internally we already use a collection.

Line:183, bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/SelectionDialog.java -> See replay from above.

-------------------------------------
author: Zaid Mosley
date: 2015-02-18 12:30:15.000000000

Patch Set 12:

Thanks Nevaeh Wu, I forgot about the single object argument. The dialog is fine for me as it is.

-------------------------------------
author: Sebastian Porter
date: 2015-02-18 12:42:02.000000000

Patch Set 12:

>  I don't understand the reason why Nevaeh Wu should not use it in the IDE code.

Because those changes look completely random and without cause.

-------------------------------------
author: Zaid Mosley
date: 2015-02-18 12:46:16.000000000

Patch Set 12:

> Because those changes look completely random and without cause.

OK. IMHO the goal would be to prefer the usage of this dialog also in the IDE but this can be discussed via a separate bug.

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