--- old/application/uitests/org.openjdk.jmc.test.jemmy/src/test/java/org/openjdk/jmc/test/jemmy/misc/wrappers/MCTable.java 2019-10-22 09:27:25.125202242 -0400 +++ new/application/uitests/org.openjdk.jmc.test.jemmy/src/test/java/org/openjdk/jmc/test/jemmy/misc/wrappers/MCTable.java 2019-10-22 09:27:24.965199956 -0400 @@ -281,6 +281,19 @@ /** * Finds tables by column header (first match only) * + * @param shellText + * text to look up the shell that contains the table + * @param headerName + * the name of the column header + * @return a {@link MCTable} + */ + public static MCTable getByColumnHeader(String shellText , String headerName) { + return getByColumnHeader(getShellByText(shellText), headerName); + } + + /** + * Finds tables by column header (first match only) + * * @param shell * the shell in which to look for the table * @param headerName @@ -511,6 +524,24 @@ setOutput(count); } }; + Display.getDefault().syncExec(fetcher); + return fetcher.getOutput().intValue(); + } + + /** + * Gets the number of items selected in the table + * + * @return the number of items selected in the table + */ + public int getSelectionCount() { + final Table table = getWrap().getControl(); + Fetcher fetcher = new Fetcher() { + @Override + public void run() { + int count = table.getSelectionCount(); + setOutput(count); + } + }; Display.getDefault().syncExec(fetcher); return fetcher.getOutput().intValue(); }