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);