Bug 443717 - [Viewers] Add JFace snippet for a sorted TreeViewer

Fixed a bug where the table elements would no longer appear after
changing sorting methods.

Change-Id: I95ff13fedb0a77928c8ec022616b3f76b6ad97ed
Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
diff --git a/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet067TreeViewerSorted.java b/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet067TreeViewerSorted.java
index f39233c..bfb6107 100644
--- a/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet067TreeViewerSorted.java
+++ b/examples/org.eclipse.jface.snippets/Eclipse JFace Snippets/org/eclipse/jface/snippets/viewers/Snippet067TreeViewerSorted.java
@@ -145,6 +145,8 @@
 					v.setLabelProvider(new MyLabelProvider());
 				}
 				v.update(v, null);
+				shell.layout(true, true);
+
 			}
 		});
 
@@ -161,9 +163,9 @@
 		legendComposite.setLayout(new FillLayout());
 		legendV.setLabelProvider(new LegendLabelProvider());
 		legendV.setContentProvider(ArrayContentProvider.getInstance());
-		final String[] test_input = { "Population > 1,000,000", "Population > 500,000", "Population > 250,000",
+		final String[] legendCategories = { "Population > 1,000,000", "Population > 500,000", "Population > 250,000",
 				"Population > 50,000", "Population > 25,000", "Population > 5000", "Population <= 5000" };
-		legendV.setInput(test_input);
+		legendV.setInput(legendCategories);
 		legendV.update(legendV, null);
 
 		// Legend label