changeset 2:4d0d41b58c0a

List and table cells are parents Fixed tests Build should use default platform added .hgignore
author shurailine
date Mon, 06 Feb 2012 17:03:58 +0400
parents 16deb0a5eb54
children 1cbc0e0624a8
files tools/Jemmy/JemmyFX/build.xml tools/Jemmy/JemmyFX/nbproject/build-impl.xml tools/Jemmy/JemmyFX/nbproject/genfiles.properties tools/Jemmy/JemmyFX/nbproject/project.properties tools/Jemmy/JemmyFX/nbproject/project.xml tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemWrap.java tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TextFieldCellEditor.java tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewApp.java tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewLookupTest.java
diffstat 10 files changed, 130 insertions(+), 87 deletions(-) [+]
line wrap: on
line diff
--- a/tools/Jemmy/JemmyFX/build.xml	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/build.xml	Mon Feb 06 17:03:58 2012 +0400
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
 Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -22,7 +23,6 @@
 or visit www.oracle.com if you need additional information or have any
 questions.
 -->
-<?xml version="1.0" encoding="UTF-8"?>
 <project name="JemmyJC" default="default" basedir=".">
     <description>Builds, tests, and runs the project JemmyJC.</description>
     <import file="nbproject/build-impl.xml"/>
--- a/tools/Jemmy/JemmyFX/nbproject/build-impl.xml	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/nbproject/build-impl.xml	Mon Feb 06 17:03:58 2012 +0400
@@ -54,43 +54,6 @@
         <property file="nbproject/project.properties"/>
     </target>
     <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
-        <j2seproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
-        <j2seproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
-        <j2seproject1:property name="platform.compiler" value="platforms.${platform.active}.compile"/>
-        <j2seproject1:property name="platform.javac.tmp" value="platforms.${platform.active}.javac"/>
-        <condition property="platform.javac" value="${platform.home}/bin/javac">
-            <equals arg1="${platform.javac.tmp}" arg2="$${platforms.${platform.active}.javac}"/>
-        </condition>
-        <property name="platform.javac" value="${platform.javac.tmp}"/>
-        <j2seproject1:property name="platform.java.tmp" value="platforms.${platform.active}.java"/>
-        <condition property="platform.java" value="${platform.home}/bin/java">
-            <equals arg1="${platform.java.tmp}" arg2="$${platforms.${platform.active}.java}"/>
-        </condition>
-        <property name="platform.java" value="${platform.java.tmp}"/>
-        <j2seproject1:property name="platform.javadoc.tmp" value="platforms.${platform.active}.javadoc"/>
-        <condition property="platform.javadoc" value="${platform.home}/bin/javadoc">
-            <equals arg1="${platform.javadoc.tmp}" arg2="$${platforms.${platform.active}.javadoc}"/>
-        </condition>
-        <property name="platform.javadoc" value="${platform.javadoc.tmp}"/>
-        <condition property="platform.invalid" value="true">
-            <or>
-                <contains string="${platform.javac}" substring="$${platforms."/>
-                <contains string="${platform.java}" substring="$${platforms."/>
-                <contains string="${platform.javadoc}" substring="$${platforms."/>
-            </or>
-        </condition>
-        <fail unless="platform.home">Must set platform.home</fail>
-        <fail unless="platform.bootcp">Must set platform.bootcp</fail>
-        <fail unless="platform.java">Must set platform.java</fail>
-        <fail unless="platform.javac">Must set platform.javac</fail>
-        <fail if="platform.invalid">
- The J2SE Platform is not correctly set up.
- Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. 
- Either open the project in the IDE and setup the Platform with the same name or add it manually.
- For example like this:
-     ant -Duser.properties.file=&lt;path_to_property_file&gt; jar (where you put the property "platforms.${platform.active}.home" in a .properties file)
-  or ant -Dplatforms.${platform.active}.home=&lt;path_to_JDK_home&gt; jar (where no properties file is used) 
-  </fail>
         <available file="${manifest.file}" property="manifest.available"/>
         <condition property="splashscreen.available">
             <and>
@@ -225,6 +188,15 @@
         <condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
             <length length="0" string="${endorsed.classpath}" when="greater"/>
         </condition>
+        <condition else="false" property="jdkBug6558476">
+            <and>
+                <matches pattern="1\.[56]" string="${java.specification.version}"/>
+                <not>
+                    <os family="unix"/>
+                </not>
+            </and>
+        </condition>
+        <property name="javac.fork" value="${jdkBug6558476}"/>
         <property name="jar.index" value="false"/>
         <property name="jar.index.metainf" value="${jar.index}"/>
         <property name="copylibs.rebase" value="true"/>
@@ -273,7 +245,7 @@
                 <property location="${build.dir}/empty" name="empty.dir"/>
                 <mkdir dir="${empty.dir}"/>
                 <mkdir dir="@{apgeneratedsrcdir}"/>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
                     <src>
                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
                             <include name="*"/>
@@ -312,7 +284,7 @@
             <sequential>
                 <property location="${build.dir}/empty" name="empty.dir"/>
                 <mkdir dir="${empty.dir}"/>
-                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" executable="${platform.javac}" fork="yes" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
+                <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
                     <src>
                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
                             <include name="*"/>
@@ -369,7 +341,7 @@
             <attribute default="**" name="testincludes"/>
             <sequential>
                 <property name="junit.forkmode" value="perTest"/>
-                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" jvm="${platform.java}" showoutput="true" tempdir="${build.dir}">
+                <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
                     <batchtest todir="${build.test.results.dir}">
                         <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
                             <filename name="@{testincludes}"/>
@@ -446,9 +418,6 @@
                     <classpath>
                         <path path="@{classpath}"/>
                     </classpath>
-                    <bootclasspath>
-                        <path path="${platform.bootcp}"/>
-                    </bootclasspath>
                 </nbjpdastart>
             </sequential>
         </macrodef>
@@ -464,9 +433,7 @@
         </macrodef>
     </target>
     <target name="-init-debug-args">
-        <exec executable="${platform.java}" outputproperty="version-output">
-            <arg value="-version"/>
-        </exec>
+        <property name="version-output" value="java version &quot;${ant.java.version}"/>
         <condition property="have-jdk-older-than-1.4">
             <or>
                 <contains string="${version-output}" substring="java version &quot;1.0"/>
@@ -491,7 +458,7 @@
             <attribute default="${debug.classpath}" name="classpath"/>
             <element name="customize" optional="true"/>
             <sequential>
-                <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">
+                <java classname="@{classname}" dir="${work.dir}" fork="true">
                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
                     <jvmarg line="${debug-args-line}"/>
                     <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
@@ -516,7 +483,7 @@
             <attribute default="${run.classpath}" name="classpath"/>
             <element name="customize" optional="true"/>
             <sequential>
-                <java classname="@{classname}" dir="${work.dir}" fork="true" jvm="${platform.java}">
+                <java classname="@{classname}" dir="${work.dir}" fork="true">
                     <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
                     <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
                     <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
@@ -700,7 +667,7 @@
             <path path="${run.classpath}"/>
             <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
         </pathconvert>
-        <echo level="info">${platform.java} -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+        <echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
     </target>
     <target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
         <tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
@@ -727,7 +694,7 @@
         <j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
         <echo level="info">To run this application from the command line without Ant, try:</echo>
         <property location="${dist.jar}" name="dist.jar.resolved"/>
-        <echo level="info">${platform.java} -jar "${dist.jar.resolved}"</echo>
+        <echo level="info">java -jar "${dist.jar.resolved}"</echo>
     </target>
     <target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
         <delete>
@@ -885,7 +852,7 @@
                 </not>
             </and>
         </condition>
-        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" executable="${platform.javadoc}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
+        <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
             <classpath>
                 <path path="${javac.classpath}"/>
             </classpath>
--- a/tools/Jemmy/JemmyFX/nbproject/genfiles.properties	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/nbproject/genfiles.properties	Mon Feb 06 17:03:58 2012 +0400
@@ -3,6 +3,6 @@
 build.xml.stylesheet.CRC32=28e38971@1.38.2.45
 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
 # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=bff48239
-nbproject/build-impl.xml.script.CRC32=a77ef47f
+nbproject/build-impl.xml.data.CRC32=15dddc79
+nbproject/build-impl.xml.script.CRC32=dedfbc6e
 nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.1.46
--- a/tools/Jemmy/JemmyFX/nbproject/project.properties	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/nbproject/project.properties	Mon Feb 06 17:03:58 2012 +0400
@@ -66,7 +66,7 @@
 main.class=
 manifest.file=manifest.mf
 meta.inf.dir=${src.dir}/META-INF
-platform.active=JDK_1.7_x86
+platform.active=default_platform
 run.classpath=\
     ${javac.classpath}:\
     ${build.classes.dir}
--- a/tools/Jemmy/JemmyFX/nbproject/project.xml	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/nbproject/project.xml	Mon Feb 06 17:03:58 2012 +0400
@@ -4,7 +4,6 @@
     <configuration>
         <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
             <name>JemmyFX</name>
-            <explicit-platform explicit-source-supported="true"/>
             <source-roots>
                 <root id="src.docks.dir" name="Generated"/>
                 <root id="src.dir"/>
--- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/ListItemWrap.java	Mon Feb 06 17:03:58 2012 +0400
@@ -233,6 +233,9 @@
         if(WindowElement.class.equals(interfaceClass) && Scene.class.equals(type)) {
             return true;
         }
+        if(Parent.class.equals(interfaceClass) && Node.class.equals(type)) {
+            return cellWrap().is(interfaceClass, type);
+        }
         return super.is(interfaceClass, type);
     }
 
@@ -251,6 +254,9 @@
         if(WindowElement.class.equals(interfaceClass) && Scene.class.equals(type)) {
             return (INTERFACE) listViewWrap.as(interfaceClass, type);
         }
+        if(Parent.class.equals(interfaceClass) && Node.class.equals(type)) {
+            return cellWrap().as(interfaceClass, type);
+        }
         return super.as(interfaceClass, type);
     }
 
--- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemWrap.java	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TableCellItemWrap.java	Mon Feb 06 17:03:58 2012 +0400
@@ -170,6 +170,9 @@
         if(WindowElement.class.equals(interfaceClass) && Scene.class.equals(type)) {
             return true;
         }
+        if(Parent.class.equals(interfaceClass) && Node.class.equals(type)) {
+            return cellWrap().is(interfaceClass, type);
+        }
         return super.is(interfaceClass, type);
     }
 
@@ -188,6 +191,9 @@
         if(WindowElement.class.equals(interfaceClass) && Scene.class.equals(type)) {
             return (INTERFACE) tableViewWrap.as(interfaceClass, type);
         }
+        if(Parent.class.equals(interfaceClass) && Node.class.equals(type)) {
+            return cellWrap().as(interfaceClass, type);
+        }
         return super.as(interfaceClass, type);
     }
 
--- a/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TextFieldCellEditor.java	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/src/org/jemmy/fx/control/TextFieldCellEditor.java	Mon Feb 06 17:03:58 2012 +0400
@@ -49,8 +49,8 @@
 
     public void edit(Wrap<? extends ITEM> item, ITEM newValue) {
         if(!item.is(Parent.class, Node.class)) {
-            throw new IllegalStateException("Only " + ItemWrap.class + " supported. Got " + 
-                    item.getClass().getName());
+            throw new IllegalStateException(item.getClass().getName() + 
+                    " would need to be a parent for editing");
         }
         item.as(Showable.class).shower().show();
         Parent<Node> parent = item.as(Parent.class, Node.class);
--- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewApp.java	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewApp.java	Mon Feb 06 17:03:58 2012 +0400
@@ -24,7 +24,6 @@
  */
 package org.jemmy.fx.control;
 
-
 import javafx.application.Application;
 import javafx.beans.property.SimpleStringProperty;
 import javafx.beans.property.StringProperty;
@@ -37,25 +36,26 @@
 import javafx.scene.Scene;
 import javafx.scene.control.TableColumn.CellDataFeatures;
 import javafx.scene.control.*;
+import javafx.scene.input.KeyCode;
+import javafx.scene.input.KeyEvent;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.VBox;
 import javafx.stage.Stage;
 import javafx.util.Callback;
 
-
 /**
  *
  * @author Alexander Kouznetsov
  */
 public class TableViewApp extends Application {
-    
+
     public static void main(String[] args) {
         launch(args);
     }
 
     @Override
     public void start(Stage stage) throws Exception {
-        
+
         final TableView<Person> tableView = new TableView<Person>();
         tableView.setEditable(true);
         ObservableList<Person> teamMembers = FXCollections.observableArrayList(
@@ -81,8 +81,7 @@
                 new Person("S", "19"),
                 new Person("T", "20"),
                 new Person("U", "21"),
-                new Person("Victor", "Johnson")
-                );
+                new Person("Victor", "Johnson"));
         tableView.setItems(teamMembers);
 
         TableColumn<Person, String> firstNameCol = new TableColumn<Person, String>("First Name");
@@ -90,12 +89,20 @@
         TableColumn<Person, String> lastNameCol = new TableColumn<Person, String>("Last Name");
         lastNameCol.setEditable(true);
         
+        Callback<TableColumn<Person, String>, TableCell<Person, String>> cellFactory =
+           new Callback<TableColumn<Person, String>, TableCell<Person, String>>() {
+                public TableCell call(TableColumn p) {
+                    return new EditingCell();
+                }
+        };
+
         lastNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() {
 
             public ObservableValue<String> call(CellDataFeatures<Person, String> p) {
                 return ((Person) p.getValue()).lastNameProperty();
             }
         });
+        lastNameCol.setCellFactory(cellFactory);
 
         firstNameCol.setCellValueFactory(new Callback<CellDataFeatures<Person, String>, ObservableValue<String>>() {
 
@@ -103,20 +110,19 @@
                 return ((Person) p.getValue()).firstNameProperty();
             }
         });
+        firstNameCol.setCellFactory(cellFactory);
 
         tableView.getColumns().setAll(firstNameCol, lastNameCol);
-        
-//        tableView.getSelectionModel().setCellSelectionEnabled(true);
+
         tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
         tableView.getSelectionModel().setCellSelectionEnabled(true);
-        
+
         final Label label = new Label("selected");
         //label.textProperty().bind(tableView.getSelectionModel().getSelectedCells());
-        
+
         tableView.getSelectionModel().getSelectedCells().addListener(new ListChangeListener() {
 
             public void onChanged(Change change) {
-//                System.out.println("change = " + change);
                 final ObservableList list = change.getList();
                 if (list.isEmpty()) {
                     label.setText("selected = nothing");
@@ -126,9 +132,9 @@
                 }
             }
         });
-        
+
         tableView.setEditable(true);
-        
+
         Button removeButton = new Button("Remove scrollbars");
         removeButton.setOnMouseClicked(new EventHandler<MouseEvent>() {
 
@@ -137,19 +143,79 @@
                         tableView.getItems().subList(0, 8)));
             }
         });
-        
+
         VBox vBox = new VBox();
         vBox.getChildren().setAll(tableView, label, removeButton);
-        
+
         Scene scene = new Scene(vBox);
-        
+
         stage.setScene(scene);
         stage.show();
-        
-        
-        
+
+
+
     }
-    
+
+    class EditingCell extends TableCell<Person, String> {
+
+        private TextField textBox;
+
+        public EditingCell() {
+        }
+
+        @Override
+        public void startEdit() {
+            super.startEdit();
+            if (isEmpty()) {
+                return;
+            }
+
+            if (textBox == null) {
+                createTextBox();
+            } else {
+                textBox.setText(getItem());
+            }
+
+            setGraphic(textBox);
+            setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
+
+            textBox.requestFocus();
+            textBox.selectAll();
+        }
+
+        @Override
+        public void cancelEdit() {
+            super.cancelEdit();
+            setContentDisplay(ContentDisplay.TEXT_ONLY);
+        }
+
+        @Override
+        public void updateItem(String item, boolean empty) {
+            super.updateItem(item, empty);
+            if (!isEmpty()) {
+                if (textBox != null) {
+                    textBox.setText(item);
+                }
+                setText(item);
+            }
+        }
+
+        private void createTextBox() {
+            textBox = new TextField(getItem());
+            textBox.setMinWidth(this.getWidth() - this.getGraphicTextGap() * 2);
+            textBox.setOnKeyReleased(new EventHandler<KeyEvent>() {
+
+                @Override
+                public void handle(KeyEvent t) {
+                    if (t.getCode() == KeyCode.ENTER) {
+                        commitEdit(textBox.getText());
+                    } else if (t.getCode() == KeyCode.ESCAPE) {
+                        cancelEdit();
+                    }
+                }
+            });
+        }
+    }
 
     public static final class Person {
 
--- a/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewLookupTest.java	Fri Feb 03 19:17:57 2012 +0400
+++ b/tools/Jemmy/JemmyFX/test/org/jemmy/fx/control/TableViewLookupTest.java	Mon Feb 06 17:03:58 2012 +0400
@@ -30,13 +30,12 @@
 import org.jemmy.control.Wrap;
 import org.jemmy.fx.AppExecutor;
 import org.jemmy.fx.SceneDock;
-import org.jemmy.interfaces.Parent;
 import org.jemmy.interfaces.Table;
 import org.jemmy.lookup.EqualsLookup;
 import org.jemmy.lookup.LookupCriteria;
 import org.jemmy.timing.State;
+import org.junit.*;
 import static org.junit.Assert.*;
-import org.junit.*;
 
 
 /**
@@ -75,28 +74,28 @@
     public void cellLookup() {
         System.out.println("testLookup");
         
-        final String B = "B";
-        /*
+        final String D = "D";
+
         Wrap<? extends TableCell> tableCellWrap = tableDock.asParent().
                 lookup(TableCell.class, new LookupCriteria<TableCell>() {
 
             public boolean check(TableCell control) {
                 String item = (String) control.getItem();
-                return item != null && item.contains(B);
+                return item != null && item.contains(D);
             }
         }).wrap();
         assertTrue("tableViewCellsParent.lookup().wrap() returns "
                 + "TableCellWrap", 
                 tableCellWrap instanceof TableCellWrap);
         
-        assertTrue(tableCellWrap.getProperty(String.class, "getItem").contains(B));
+        assertTrue(tableCellWrap.getProperty(String.class, "getItem").contains(D));
         
         tableCellWrap.mouse().click();
-*/
+
         tableDock.wrap().waitState(new State() {
 
             public Object reached() {
-                return tableDock.getSelection().contains(new Point(0, 2)) ? true : null;
+                return tableDock.getSelection().contains(new Point(0, 4)) ? true : null;
             }
         });
     }
@@ -122,6 +121,6 @@
     @Test
     public void edit() {
         table.setEditor(new TextFieldCellEditor());
-        //new TableCellItemDock(table, new EqualsLookup("B")).asCell().edit("Aleksander");
+        new TableCellItemDock(table, new EqualsLookup("B")).asCell().edit("Aleksander");
     }
 }