final GherkinTableRow row = table != null ? table.getHeaderRow() : null;
if (row == null) {
return;
}
final List<GherkinTableCell> cells = row.getPsiCells();
IntArrayList unusedIndices = new IntArrayList();
for (int i = 0, cellsSize = cells.size(); i < cellsSize; i++) {
String columnName = cells.get(i).getText().trim();
if (!columnNames.contains(columnName)) {
unusedIndices.add(i);
}
}
if (!unusedIndices.isEmpty()) {
highlightUnusedColumns(row, unusedIndices, holder);
for (GherkinTableRow tableRow : table.getDataRows()) {
highlightUnusedColumns(tableRow, unusedIndices, holder);
}
}