use of org.jetbrains.plugins.cucumber.psi.GherkinTableCell in project intellij-plugins by JetBrains.
the class GherkinTableRowImpl method deleteCell.
public void deleteCell(int columnIndex) {
final List<GherkinTableCell> cells = getPsiCells();
if (columnIndex < cells.size()) {
PsiElement cell = cells.get(columnIndex);
PsiElement nextPipe = cell.getNextSibling();
if (nextPipe instanceof PsiWhiteSpace) {
nextPipe = nextPipe.getNextSibling();
}
if (nextPipe != null && nextPipe.getNode().getElementType() == GherkinTokenTypes.PIPE) {
nextPipe.delete();
}
cell.delete();
}
}
use of org.jetbrains.plugins.cucumber.psi.GherkinTableCell in project intellij-plugins by JetBrains.
the class GherkinTableRowImpl method getColumnWidth.
public int getColumnWidth(int columnIndex) {
final List<GherkinTableCell> cells = getPsiCells();
if (cells.size() <= columnIndex) {
return 0;
}
final PsiElement cell = cells.get(columnIndex);
if (cell != null && cell.getText() != null) {
return cell.getText().trim().length();
}
return 0;
}
Aggregations