changeset 4932:e94c28bc5396

Automated merge with ssh://jfxsrc.us.oracle.com//javafx/8.0/scrum/controls/jfx/rt
author jgiles
date Wed, 04 Sep 2013 15:57:05 +1200
parents e0f3abebc024 9257caffde99
children bab22eeb95fd
files
diffstat 12 files changed, 195 insertions(+), 208 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/VirtualFlow.java	Wed Sep 04 15:57:05 2013 +1200
@@ -1586,7 +1586,7 @@
         }
 
         if (pile.size() > 0) {
-            accumCell = pile.get(0);
+            return pile.get(0);
         }
 
         // We need to use the accumCell and return that
--- a/modules/controls/src/main/java/javafx/scene/control/TableCell.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TableCell.java	Wed Sep 04 15:57:05 2013 +1200
@@ -542,9 +542,11 @@
         final int index = getIndex();
         final boolean isEmpty = isEmpty();
         final T oldValue = getItem();
+
+        final boolean indexExceedsItemCount = index >= itemCount;
         
         // there is a whole heap of reasons why we should just punt...
-        if (index >= itemCount ||
+        if (indexExceedsItemCount ||
                 index < 0 || 
                 columnIndex < 0 ||
                 !isVisible() ||
@@ -557,7 +559,12 @@
             // refer to Ensemble8PopUpTree.png - in this case the arrows are being
             // shown as the new cells are instantiated with the arrows in the
             // children list, and are only hidden in updateItem.
-            if ((!isEmpty && oldValue != null) || isFirstRun) {
+            // RT-32621: There are circumstances where we need to updateItem,
+            // even when the index is greater than the itemCount. For example,
+            // RT-32621 identifies issues where a TreeTableView collapses a
+            // TreeItem but the custom cells remain visible. This is now
+            // resolved with the check for indexExceedsItemCount.
+            if ((!isEmpty && oldValue != null) || isFirstRun || indexExceedsItemCount) {
                 updateItem(null, true);
                 isFirstRun = false;
             }
--- a/modules/controls/src/main/java/javafx/scene/control/TreeTableCell.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeTableCell.java	Wed Sep 04 15:57:05 2013 +1200
@@ -533,9 +533,11 @@
         final int index = getIndex();
         final boolean isEmpty = isEmpty();
         final T oldValue = getItem();
+
+        final boolean indexExceedsItemCount = index >= itemCount;
         
         // there is a whole heap of reasons why we should just punt...
-        if (index >= itemCount ||
+        if (indexExceedsItemCount ||
                 index < 0 || 
                 columnIndex < 0 ||
                 !isVisible() ||
@@ -549,7 +551,12 @@
             // refer to Ensemble8PopUpTree.png - in this case the arrows are being
             // shown as the new cells are instantiated with the arrows in the
             // children list, and are only hidden in updateItem.
-            if ((!isEmpty && oldValue != null) || isFirstRun) {
+            // RT-32621: There are circumstances where we need to updateItem,
+            // even when the index is greater than the itemCount. For example,
+            // RT-32621 identifies issues where a TreeTableView collapses a
+            // TreeItem but the custom cells remain visible. This is now
+            // resolved with the check for indexExceedsItemCount.
+            if ((!isEmpty && oldValue != null) || isFirstRun || indexExceedsItemCount) {
                 updateItem(null, true);
                 isFirstRun = false;
             }
--- a/modules/controls/src/main/java/javafx/scene/control/TreeTableView.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/TreeTableView.java	Wed Sep 04 15:57:05 2013 +1200
@@ -950,115 +950,6 @@
         return editingCell;
     }
 
-    
-    // --- On Edit Start
-    private ObjectProperty<EventHandler<TreeTableView.EditEvent<S>>> onEditStart;
-
-    /**
-     * Sets the {@link EventHandler} that will be called when the user begins
-     * an edit. 
-     */
-    public final void setOnEditStart(EventHandler<TreeTableView.EditEvent<S>> value) {
-        onEditStartProperty().set(value);
-    }
-
-    /**
-     * Returns the {@link EventHandler} that will be called when the user begins
-     * an edit.
-     */
-    public final EventHandler<TreeTableView.EditEvent<S>> getOnEditStart() {
-        return onEditStart == null ? null : onEditStart.get();
-    }
-
-    /**
-     * This event handler will be fired when the user successfully initiates
-     * editing.
-     */
-    public final ObjectProperty<EventHandler<TreeTableView.EditEvent<S>>> onEditStartProperty() {
-        if (onEditStart == null) {
-            onEditStart = new SimpleObjectProperty<EventHandler<TreeTableView.EditEvent<S>>>(this, "onEditStart") {
-                @Override protected void invalidated() {
-                    setEventHandler(TreeTableView.<S>editStartEvent(), get());
-                }
-            };
-        }
-        return onEditStart;
-    }
-
-
-    // --- On Edit Commit
-    private ObjectProperty<EventHandler<TreeTableView.EditEvent<S>>> onEditCommit;
-
-    /**
-     * Sets the {@link EventHandler} that will be called when the user commits
-     * an edit. 
-     */
-    public final void setOnEditCommit(EventHandler<TreeTableView.EditEvent<S>> value) {
-        onEditCommitProperty().set(value);
-    }
-
-    /**
-     * Returns the {@link EventHandler} that will be called when the user commits
-     * an edit.
-     */
-    public final EventHandler<TreeTableView.EditEvent<S>> getOnEditCommit() {
-        return onEditCommit == null ? null : onEditCommit.get();
-    }
-
-    /**
-     * <p>This property is used when the user performs an action that should
-     * result in their editing input being persisted.</p>
-     *
-     * <p>The EventHandler in this property should not be called directly - 
-     * instead call {@link TreeCell#commitEdit(java.lang.Object)} from within
-     * your custom TreeCell. This will handle firing this event, updating the 
-     * view, and switching out of the editing state.</p>
-     */
-    public final ObjectProperty<EventHandler<TreeTableView.EditEvent<S>>> onEditCommitProperty() {
-        if (onEditCommit == null) {
-            onEditCommit = new SimpleObjectProperty<EventHandler<TreeTableView.EditEvent<S>>>(this, "onEditCommit") {
-                @Override protected void invalidated() {
-                    setEventHandler(TreeTableView.<S>editCommitEvent(), get());
-                }
-            };
-        }
-        return onEditCommit;
-    }
-
-
-    // --- On Edit Cancel
-    private ObjectProperty<EventHandler<TreeTableView.EditEvent<S>>> onEditCancel;
-
-    /**
-     * Sets the {@link EventHandler} that will be called when the user cancels
-     * an edit.
-     */
-    public final void setOnEditCancel(EventHandler<TreeTableView.EditEvent<S>> value) {
-        onEditCancelProperty().set(value);
-    }
-
-    /**
-     * Returns the {@link EventHandler} that will be called when the user cancels
-     * an edit.
-     */
-    public final EventHandler<TreeTableView.EditEvent<S>> getOnEditCancel() {
-        return onEditCancel == null ? null : onEditCancel.get();
-    }
-
-    /**
-     * This event handler will be fired when the user cancels editing a cell.
-     */
-    public final ObjectProperty<EventHandler<TreeTableView.EditEvent<S>>> onEditCancelProperty() {
-        if (onEditCancel == null) {
-            onEditCancel = new SimpleObjectProperty<EventHandler<TreeTableView.EditEvent<S>>>(this, "onEditCancel") {
-                @Override protected void invalidated() {
-                    setEventHandler(TreeTableView.<S>editCancelEvent(), get());
-                }
-            };
-        }
-        return onEditCancel;
-    }
-    
 
     // --- Table menu button visible
     private BooleanProperty tableMenuButtonVisible;
--- a/modules/controls/src/main/java/javafx/scene/control/cell/TextFieldTreeCell.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/TextFieldTreeCell.java	Wed Sep 04 15:57:05 2013 +1200
@@ -216,8 +216,6 @@
     /** {@inheritDoc} */
     @Override public void updateItem(T item, boolean empty) {
         super.updateItem(item, empty);
-        
-        TreeItem<T> treeItem = getTreeItem();
         CellUtils.updateItem(this, getConverter(), hbox, getTreeItemGraphic(), textField);
     }
     
--- a/modules/controls/src/main/java/javafx/scene/control/cell/TextFieldTreeTableCell.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/cell/TextFieldTreeTableCell.java	Wed Sep 04 15:57:05 2013 +1200
@@ -56,7 +56,7 @@
     /**
      * Provides a {@link TextField} that allows editing of the cell content when
      * the cell is double-clicked, or when 
-     * {@link TableView#edit(int, javafx.scene.control.TreeTableColumn)} is called. 
+     * {@link javafx.scene.control.TreeTableView#edit(int, javafx.scene.control.TreeTableColumn)} is called.
      * This method will only  work on {@link TreeTableColumn} instances which are of
      * type String.
      * 
@@ -71,7 +71,7 @@
     /**
      * Provides a {@link TextField} that allows editing of the cell content when
      * the cell is double-clicked, or when 
-     * {@link TableView#edit(int, javafx.scene.control.TreeTableColumn) } is called. 
+     * {@link javafx.scene.control.TreeTableView#edit(int, javafx.scene.control.TreeTableColumn) } is called.
      * This method will work  on any {@link TreeTableColumn} instance, regardless of 
      * its generic type. However, to enable this, a {@link StringConverter} must 
      * be provided that will convert the given String (from what the user typed 
--- a/modules/controls/src/test/java/com/sun/javafx/scene/control/infrastructure/MouseEventFirer.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/test/java/com/sun/javafx/scene/control/infrastructure/MouseEventFirer.java	Wed Sep 04 15:57:05 2013 +1200
@@ -51,6 +51,11 @@
         fireMouseEvent(MouseEvent.MOUSE_PRESSED, modifiers);
         fireMouseEvent(MouseEvent.MOUSE_RELEASED, modifiers);
     }
+
+    public void fireMousePressAndRelease(int clickCount, KeyModifier... modifiers) {
+        fireMouseEvent(MouseEvent.MOUSE_PRESSED, MouseButton.PRIMARY, clickCount, 0, 0, modifiers);
+        fireMouseEvent(MouseEvent.MOUSE_RELEASED, MouseButton.PRIMARY, clickCount, 0, 0, modifiers);
+    }
     
     public void fireMouseClicked() {
         fireMouseEvent(MouseEvent.MOUSE_CLICKED);
@@ -83,6 +88,10 @@
     public void fireMousePressed(double deltaX, double deltaY, KeyModifier... modifiers) {
         fireMouseEvent(MouseEvent.MOUSE_PRESSED, deltaX, deltaY, modifiers);
     }
+
+    public void fireMousePressed(int clickCount, double deltaX, double deltaY, KeyModifier... modifiers) {
+        fireMouseEvent(MouseEvent.MOUSE_PRESSED, MouseButton.PRIMARY, clickCount, deltaX, deltaY, modifiers);
+    }
     
     public void fireMouseReleased() {
         fireMouseEvent(MouseEvent.MOUSE_RELEASED);
--- a/modules/controls/src/test/java/com/sun/javafx/scene/control/infrastructure/VirtualFlowTestUtils.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/test/java/com/sun/javafx/scene/control/infrastructure/VirtualFlowTestUtils.java	Wed Sep 04 15:57:05 2013 +1200
@@ -51,12 +51,20 @@
     }
 
     public static void clickOnRow(final Control control, int row, KeyModifier... modifiers) {
-        clickOnRow(control, row, false, modifiers);
+        clickOnRow(control, row, 1, false, modifiers);
+    }
+
+    public static void clickOnRow(final Control control, int row, int clickCount, KeyModifier... modifiers) {
+        clickOnRow(control, row, clickCount, false, modifiers);
+    }
+
+    public static void clickOnRow(final Control control, int row, boolean ignoreChildren, KeyModifier... modifiers) {
+        clickOnRow(control, row, 1, ignoreChildren, modifiers);
     }
 
     // ignore children allows clicking on the row, rather than a child in that row.
     // This is good for testing, for example, TableRowBehavior
-    public static void clickOnRow(final Control control, int row, boolean ignoreChildren, KeyModifier... modifiers) {
+    public static void clickOnRow(final Control control, int row, int clickCount, boolean ignoreChildren, KeyModifier... modifiers) {
         IndexedCell cell = VirtualFlowTestUtils.getCell(control, row);
 
         if (! ignoreChildren && ((cell instanceof TableRow) || (cell instanceof TreeTableRow))) {
@@ -65,7 +73,7 @@
                     continue;
                 }
                 IndexedCell<?> childCell = (IndexedCell<?>)n;
-                new MouseEventFirer(childCell).fireMousePressAndRelease(modifiers);
+                new MouseEventFirer(childCell).fireMousePressAndRelease(clickCount, modifiers);
                 break;
             }
         } else {
@@ -76,7 +84,7 @@
                 mef.fireMousePressed(cell.getWidth(), cell.getHeight() / 2.0, modifiers);
                 mef.fireMouseReleased(cell.getWidth(), cell.getHeight() / 2.0, modifiers);
             } else {
-                new MouseEventFirer(cell).fireMousePressAndRelease(modifiers);
+                new MouseEventFirer(cell).fireMousePressAndRelease(clickCount, modifiers);
             }
         }
     }
--- a/modules/controls/src/test/java/javafx/scene/control/TreeTableCellTest.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TreeTableCellTest.java	Wed Sep 04 15:57:05 2013 +1200
@@ -277,20 +277,20 @@
         assertEquals(apples, tree.getEditingCell().getTreeItem());
     }
 
-    @Ignore // TODO file bug!
-    @Test public void editCellFiresEventOnTree() {
-        tree.setEditable(true);
-        cell.updateTreeTableView(tree);
-        cell.updateIndex(2);
-        final boolean[] called = new boolean[] { false };
-        tree.setOnEditStart(new EventHandler<TreeTableView.EditEvent<String>>() {
-            @Override public void handle(TreeTableView.EditEvent<String> event) {
-                called[0] = true;
-            }
-        });
-        cell.startEdit();
-        assertTrue(called[0]);
-    }
+//    @Ignore // TODO file bug!
+//    @Test public void editCellFiresEventOnTree() {
+//        tree.setEditable(true);
+//        cell.updateTreeTableView(tree);
+//        cell.updateIndex(2);
+//        final boolean[] called = new boolean[] { false };
+//        tree.setOnEditStart(new EventHandler<TreeTableView.EditEvent<String>>() {
+//            @Override public void handle(TreeTableView.EditEvent<String> event) {
+//                called[0] = true;
+//            }
+//        });
+//        cell.startEdit();
+//        assertTrue(called[0]);
+//    }
 
     // commitEdit()
     @Test public void commitWhenTreeIsNullIsOK() {
@@ -310,21 +310,21 @@
         assertEquals("Watermelon", tree.getRoot().getChildren().get(0).getValue());
     }
 
-    @Ignore // TODO file bug!
-    @Test public void commitSendsEventToTree() {
-        tree.setEditable(true);
-        cell.updateTreeTableView(tree);
-        cell.updateIndex(1);
-        cell.startEdit();
-        final boolean[] called = new boolean[] { false };
-        tree.setOnEditCommit(new EventHandler<TreeTableView.EditEvent<String>>() {
-            @Override public void handle(TreeTableView.EditEvent<String> event) {
-                called[0] = true;
-            }
-        });
-        cell.commitEdit("Watermelon");
-        assertTrue(called[0]);
-    }
+//    @Ignore // TODO file bug!
+//    @Test public void commitSendsEventToTree() {
+//        tree.setEditable(true);
+//        cell.updateTreeTableView(tree);
+//        cell.updateIndex(1);
+//        cell.startEdit();
+//        final boolean[] called = new boolean[] { false };
+//        tree.setOnEditCommit(new EventHandler<TreeTableView.EditEvent<String>>() {
+//            @Override public void handle(TreeTableView.EditEvent<String> event) {
+//                called[0] = true;
+//            }
+//        });
+//        cell.commitEdit("Watermelon");
+//        assertTrue(called[0]);
+//    }
 
     @Test public void afterCommitTreeTableViewEditingCellIsNull() {
         tree.setEditable(true);
@@ -344,21 +344,21 @@
         cell.cancelEdit();
     }
 
-    @Ignore // TODO file bug!
-    @Test public void cancelEditFiresChangeEvent() {
-        tree.setEditable(true);
-        cell.updateTreeTableView(tree);
-        cell.updateIndex(1);
-        cell.startEdit();
-        final boolean[] called = new boolean[] { false };
-        tree.setOnEditCancel(new EventHandler<TreeTableView.EditEvent<String>>() {
-            @Override public void handle(TreeTableView.EditEvent<String> event) {
-                called[0] = true;
-            }
-        });
-        cell.cancelEdit();
-        assertTrue(called[0]);
-    }
+//    @Ignore // TODO file bug!
+//    @Test public void cancelEditFiresChangeEvent() {
+//        tree.setEditable(true);
+//        cell.updateTreeTableView(tree);
+//        cell.updateIndex(1);
+//        cell.startEdit();
+//        final boolean[] called = new boolean[] { false };
+//        tree.setOnEditCancel(new EventHandler<TreeTableView.EditEvent<String>>() {
+//            @Override public void handle(TreeTableView.EditEvent<String> event) {
+//                called[0] = true;
+//            }
+//        });
+//        cell.cancelEdit();
+//        assertTrue(called[0]);
+//    }
 
     @Test public void cancelSetsTreeTableViewEditingIndexToNegativeOne() {
         tree.setEditable(true);
--- a/modules/controls/src/test/java/javafx/scene/control/TreeTableRowTest.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TreeTableRowTest.java	Wed Sep 04 15:57:05 2013 +1200
@@ -590,19 +590,19 @@
         assertEquals(apples, tree.getEditingCell().getTreeItem());
     }
 
-    @Test public void editCellFiresEventOnTree() {
-        tree.setEditable(true);
-        cell.updateTreeTableView(tree);
-        cell.updateIndex(2);
-        final boolean[] called = new boolean[] { false };
-        tree.setOnEditStart(new EventHandler<TreeTableView.EditEvent<String>>() {
-            @Override public void handle(TreeTableView.EditEvent<String> event) {
-                called[0] = true;
-            }
-        });
-        cell.startEdit();
-        assertTrue(called[0]);
-    }
+//    @Test public void editCellFiresEventOnTree() {
+//        tree.setEditable(true);
+//        cell.updateTreeTableView(tree);
+//        cell.updateIndex(2);
+//        final boolean[] called = new boolean[] { false };
+//        tree.setOnEditStart(new EventHandler<TreeTableView.EditEvent<String>>() {
+//            @Override public void handle(TreeTableView.EditEvent<String> event) {
+//                called[0] = true;
+//            }
+//        });
+//        cell.startEdit();
+//        assertTrue(called[0]);
+//    }
 
     // commitEdit()
     @Test public void commitWhenTreeIsNullIsOK() {
@@ -620,20 +620,20 @@
         assertEquals("Watermelon", tree.getRoot().getChildren().get(0).getValue());
     }
 
-    @Test public void commitSendsEventToTree() {
-        tree.setEditable(true);
-        cell.updateTreeTableView(tree);
-        cell.updateIndex(1);
-        cell.startEdit();
-        final boolean[] called = new boolean[] { false };
-        tree.setOnEditCommit(new EventHandler<TreeTableView.EditEvent<String>>() {
-            @Override public void handle(TreeTableView.EditEvent<String> event) {
-                called[0] = true;
-            }
-        });
-        cell.commitEdit("Watermelon");
-        assertTrue(called[0]);
-    }
+//    @Test public void commitSendsEventToTree() {
+//        tree.setEditable(true);
+//        cell.updateTreeTableView(tree);
+//        cell.updateIndex(1);
+//        cell.startEdit();
+//        final boolean[] called = new boolean[] { false };
+//        tree.setOnEditCommit(new EventHandler<TreeTableView.EditEvent<String>>() {
+//            @Override public void handle(TreeTableView.EditEvent<String> event) {
+//                called[0] = true;
+//            }
+//        });
+//        cell.commitEdit("Watermelon");
+//        assertTrue(called[0]);
+//    }
 
     @Test public void afterCommitTreeTableViewEditingCellIsNull() {
         tree.setEditable(true);
@@ -652,20 +652,20 @@
         cell.cancelEdit();
     }
 
-    @Test public void cancelEditFiresChangeEvent() {
-        tree.setEditable(true);
-        cell.updateTreeTableView(tree);
-        cell.updateIndex(1);
-        cell.startEdit();
-        final boolean[] called = new boolean[] { false };
-        tree.setOnEditCancel(new EventHandler<TreeTableView.EditEvent<String>>() {
-            @Override public void handle(TreeTableView.EditEvent<String> event) {
-                called[0] = true;
-            }
-        });
-        cell.cancelEdit();
-        assertTrue(called[0]);
-    }
+//    @Test public void cancelEditFiresChangeEvent() {
+//        tree.setEditable(true);
+//        cell.updateTreeTableView(tree);
+//        cell.updateIndex(1);
+//        cell.startEdit();
+//        final boolean[] called = new boolean[] { false };
+//        tree.setOnEditCancel(new EventHandler<TreeTableView.EditEvent<String>>() {
+//            @Override public void handle(TreeTableView.EditEvent<String> event) {
+//                called[0] = true;
+//            }
+//        });
+//        cell.cancelEdit();
+//        assertTrue(called[0]);
+//    }
 
     @Test public void cancelSetsTreeTableViewEditingCellIsNull() {
         tree.setEditable(true);
--- a/modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TreeViewKeyInputTest.java	Wed Sep 04 15:57:05 2013 +1200
@@ -29,6 +29,7 @@
 import javafx.beans.InvalidationListener;
 import javafx.beans.Observable;
 import javafx.collections.FXCollections;
+import javafx.event.Event;
 import javafx.event.EventHandler;
 import javafx.scene.input.KeyCode;
 import java.util.List;
@@ -1491,4 +1492,71 @@
         assertNotSame(initialSelectionOwner, nextSelectionOwner);
         assertNotSame(newSelectionOwner, nextSelectionOwner);
     }
+
+    private int rt32783_count_start = 0;
+    private int rt32783_count_commit = 0;
+    private int rt32783_count_cancel = 0;
+    private int rt32783_count = 0;
+    @Test public void test_rt32683() {
+        // set up test
+        final int items = 8;
+        TreeItem<String> newRoot = new TreeItem<>("New root");
+        newRoot.setExpanded(false);
+        for (int i = 0; i < items; i++) {
+            newRoot.getChildren().add(new TreeItem<>("Row " + i));
+        }
+
+        treeView.setRoot(newRoot);
+        treeView.setEditable(true);
+        treeView.setOnEditStart(new EventHandler() {
+            @Override public void handle(Event t) {
+                rt32783_count_start++;
+            }
+        });
+
+        treeView.setOnEditCommit(new EventHandler() {
+            @Override public void handle(Event t) {
+                rt32783_count_commit++;
+            }
+        });
+
+        treeView.setOnEditCancel(new EventHandler() {
+            @Override public void handle(Event t) {
+                rt32783_count_cancel++;
+            }
+        });
+
+        treeView.editingItemProperty().addListener(new InvalidationListener() {
+            @Override
+            public void invalidated(Observable observable) {
+                assertNotNull(treeView.getEditingItem());
+                System.out.println("editing item: " + treeView.getEditingItem());
+                rt32783_count++;
+            }
+        });
+
+        // start test
+//        final int middleIndex = items / 2;
+
+        newRoot.setExpanded(true);
+        Toolkit.getToolkit().firePulse();
+        newRoot.setExpanded(false);
+        Toolkit.getToolkit().firePulse();
+
+        final MultipleSelectionModel sm = treeView.getSelectionModel();
+        sm.clearAndSelect(0);
+
+        // need to get the cell before the editing starts
+//        TreeCell cell = (TreeCell)VirtualFlowTestUtils.getCell(treeView, 0);
+
+        // this forces the selected cell to go into editing mode
+        keyboard.doKeyPress(KeyCode.F2);
+//        Toolkit.getToolkit().firePulse();
+
+        assertEquals(1, rt32783_count_start);
+        assertEquals(0, rt32783_count_commit);
+        assertEquals(0, rt32783_count_cancel);
+//        assertTrue(cell.isEditing());
+        assertEquals(newRoot, treeView.getEditingItem());
+    }
 }
--- a/modules/controls/src/test/java/javafx/scene/control/TreeViewTest.java	Tue Sep 03 09:40:03 2013 -0700
+++ b/modules/controls/src/test/java/javafx/scene/control/TreeViewTest.java	Wed Sep 04 15:57:05 2013 +1200
@@ -718,7 +718,6 @@
         VirtualFlowTestUtils.assertRowsEmpty(tree, 3, -1); // rows 3+ should be empty
     }
 
-    @Ignore("Test has started failing - I have reopened the jira issue")
     @Test public void test_rt28556() {
         List<Employee> employees = Arrays.<Employee>asList(
             new Employee("Ethan Williams", "Sales Department"),