RESOLVED - bug 311007: [modeling] The TreeViewer selection is not correctly updated after a Deletion
https://bugs.eclipse.org/bugs/show_bug.cgi?id=311007
diff --git a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/actions/RemoveAction.java b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/actions/RemoveAction.java
index 95a56b6..1d548b6 100644
--- a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/actions/RemoveAction.java
+++ b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/actions/RemoveAction.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Jacques Lescot, Sierra Wireless - initial API and implementation (bug 300462)
  *
- * $Id: RemoveAction.java,v 1.1 2010/01/22 16:42:08 bcabe Exp $
+ * $Id: RemoveAction.java,v 1.2 2010/06/02 10:16:32 bcabe Exp $
  */
 package org.eclipse.pde.emfforms.editor.actions;
 
@@ -67,13 +67,13 @@
 	public void run() {
 		TreeViewer treeViewer = masterDetail.getTreeViewer();
 
-		EObject nearestEltToSelect = computeElementToSelectAfterDeletion(treeViewer);
+		EObject elementToSelectAfterDeletion = computeElementToSelectAfterDeletion(treeViewer);
 
 		getDeleteAction().run();
 
 		treeViewer.refresh();
-		if (nearestEltToSelect != null) {
-			treeViewer.setSelection(new StructuredSelection(nearestEltToSelect));
+		if (elementToSelectAfterDeletion != null) {
+			treeViewer.setSelection(new StructuredSelection(elementToSelectAfterDeletion));
 			treeViewer.getTree().setFocus();
 		}
 	}