DESCRIPTION

Bug 442278 - Use getStructuredSelection() from StructuredViewer in
platform.ui code

Change-Id: Ib98526447e36b2921619cdb023106aedd9327157
Signed-off-by: Zaid Mosley xxx@xxx.xxx

COMMENTS

author: Zaid Mosley
date: 2014-08-21 14:49:26.000000000

Uploaded patch set 1.

-------------------------------------
author: Kenley Mcconnell
date: 2014-08-21 15:19:59.000000000

Patch Set 1:

I assume you searched to make sure there are no tests that use these as data files? Plus given their names, they almost look like they might be produced by running the tests locally in workLeon Ochoach. If that is the case, better to put on 'ignore' list, rahter than just delete (but, I have no first hand knowledge of this code, just stating the ?obvious? general principle).

-------------------------------------
author: Brenden Conley
date: 2014-08-21 15:32:03.000000000

Patch Set 1:

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

-------------------------------------
author: Zaid Mosley
date: 2014-08-21 15:34:19.000000000

Patch Set 1:

David, I don't understand your comment. The change should have no impact on the behavior of the test I changed.

-------------------------------------
author: Zaid Mosley
date: 2014-08-21 15:35:00.000000000

Patch Set 1:

I'm only using the new method getStructuredSelection instead of getSelection and performing a cast. See http://blog.vogella.com/2014/08/21/eclipse-papercut-15-simplified-access-to-the-structured-selection-of-viewer/

-------------------------------------
author: Brenden Conley
date: 2014-08-21 15:41:57.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Krista Shepherd
date: 2014-08-22 09:09:01.000000000

Patch Set 1:

(1 comment)

It looks good to me, but I found a little enhancement in the Snippet053StartEditorWithContextMenu class. (See inline comment for further information)

Line:157, examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java -> As a TreeViewer, which is used here, will never return null it is needless to do a null-check. 
I would check if the selection is empty instead.

I know this comment does not really adress the issue concerning the usage of the new getStructuredSelection() method, but in my opinon this little enhancement is not worth for opening a new bug, right?

-------------------------------------
author: Zaid Mosley
date: 2014-08-22 09:29:40.000000000

Patch Set 1:

(1 comment)

Line:157, examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java -> We should avoid unrelated changes in one Gerrit review. Please upload a Gerrit change for https://bugs.eclipse.org/bugs/show_bug.cgi?id=442343

-------------------------------------
author: Krista Shepherd
date: 2014-08-22 09:36:05.000000000

Patch Set 1: Code-Review+1

(1 comment)

Line:157, examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet053StartEditorWithContextMenu.java -> Okay then I will apply a patch for your proposed bug report.

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