Examples of GherkinTable


Examples of org.jetbrains.plugins.cucumber.psi.GherkinTable

      if (element == null) {
        return null;
      }
    }

    final GherkinTable table = (GherkinTable)element;
    final int tableOffset = table.getTextOffset();
    final int caretOffsetInParent = editor.getCaretModel().getOffset() - tableOffset;

    final List<GherkinTableRow> rowList = new ArrayList<GherkinTableRow>();
    if (table.getHeaderRow() != null) {
      rowList.add(table.getHeaderRow());
    }
    rowList.addAll(table.getDataRows());

    for (int i = 0; i < rowList.size() - 1; i++) {
      final GherkinTableRow row = rowList.get(i);
      final GherkinTableRow nextRow = rowList.get(i + 1);
View Full Code Here

Examples of org.jetbrains.plugins.cucumber.psi.GherkinTable

   * @return GherkinTableRow (or header) if there is a row above or null otherwise
   */
  @Nullable
  private static GherkinTableRow getPreviousRow(@NotNull final GherkinTableRow currentRow) {
    if (currentRow.getParent() != null && currentRow.getParent() instanceof GherkinTable) {
      final GherkinTable table = (GherkinTable)currentRow.getParent();
      int i = table.getDataRows().indexOf(currentRow);
      if (i > 0) {
        return table.getDataRows().get(i - 1);
      } else if (i == 0) {
        return table.getHeaderRow();
      }
    }
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.