diff options
author | Leif Åstrand <legioth@gmail.com> | 2017-02-01 11:09:04 +0200 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2017-02-01 11:09:04 +0200 |
commit | 07d56a9ca050d976dec4f598ed39471ae369c588 (patch) | |
tree | 167982734c11fa76b39cfad226b8f601174da17a /testbench-api/src/main/java/com | |
parent | 601de7e3ba5af6146ab0342bf3a924c9aa08a1b4 (diff) | |
download | vaadin-framework-07d56a9ca050d976dec4f598ed39471ae369c588.tar.gz vaadin-framework-07d56a9ca050d976dec4f598ed39471ae369c588.zip |
Add a maven plugin for formatting according to Eclipse settings
Running formatter:format will format all files in a submodule using an
embedded Eclipse compiler (based on Neon SR1)
according to the regular formatting settings file.
Diffstat (limited to 'testbench-api/src/main/java/com')
-rw-r--r-- | testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java b/testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java index 5970cc53a1..bdc26ed663 100644 --- a/testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java +++ b/testbench-api/src/main/java/com/vaadin/testbench/elements/GridElement.java @@ -64,8 +64,8 @@ public class GridElement extends AbstractComponentElement { } public GridCellElement getCell(int columnIndex) { - TestBenchElement e = (TestBenchElement) findElement(By - .xpath("./td[" + (columnIndex + 1) + "]")); + TestBenchElement e = (TestBenchElement) findElement( + By.xpath("./td[" + (columnIndex + 1) + "]")); return e.wrap(GridCellElement.class); } } @@ -206,8 +206,8 @@ public class GridElement extends AbstractComponentElement { * @return Header cell element with given indices. */ public GridCellElement getHeaderCell(int rowIndex, int colIndex) { - return getSubPart("#header[" + rowIndex + "][" + colIndex + "]").wrap( - GridCellElement.class); + return getSubPart("#header[" + rowIndex + "][" + colIndex + "]") + .wrap(GridCellElement.class); } /** @@ -223,16 +223,16 @@ public class GridElement extends AbstractComponentElement { */ public GridCellElement getHeaderCellByCaption(String caption) { List<WebElement> headerRows = findElement(By.vaadin("#header")) - .findElements(By.xpath("./tr/th")); + .findElements(By.xpath("./tr/th")); for (WebElement header : headerRows) { if (caption.equals(header.getText())) { return TestBenchElement - .wrapElement(header, getCommandExecutor()) - .wrap(GridCellElement.class); + .wrapElement(header, getCommandExecutor()) + .wrap(GridCellElement.class); } } String errorMessage = String - .format("There is no header cell with %s caption. ", caption); + .format("There is no header cell with %s caption. ", caption); throw new NoSuchElementException(errorMessage); } @@ -250,7 +250,8 @@ public class GridElement extends AbstractComponentElement { * if there is no header row or no header cell with the given * text. */ - public GridCellElement getHeaderCellByCaption(int rowIndex, String caption) { + public GridCellElement getHeaderCellByCaption(int rowIndex, + String caption) { List<GridCellElement> headerCells = getHeaderCells(rowIndex); for (GridCellElement cell : headerCells) { if (caption.equals(cell.getText())) { |