public static void addColumn(final @NotNull Project project, final Editor editor, final PsiFile file, boolean toInsertBefore)
    throws IncorrectOperationException {
    PsiElement element = getCurrentPsiElement(editor, file);
    element = getParentWithName(element, new String[]{TD, TH});
    assert element != null;

    PsiElement root = getTablePsiElement(element);
    Pair<List<TableRow>, TableCell> pair = getTableAndPosition(root, element);
    List<TableRow> table = pair.first;
    int columnNumber = pair.second.startColumn;
    if (!toInsertBefore) {
      columnNumber += getColumnsNumber((XmlTag)element);
    }
    addColumnToTable(project, table, columnNumber - 1);

    moveCaretToFirstEmptyCell(editor, root);
  }
public static void addColumn(final @NotNull Project project, final Editor editor, final PsiFile file, boolean toInsertBefore)