Examples of GherkinTableRow


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

  public String getFamilyName() {
    return "RemoveTableColumnFix";
  }

  public void applyFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) {
    final GherkinTableRow headerRow = myTable.getHeaderRow();
    if (headerRow != null) {
      headerRow.deleteCell(myColumnIndex);
    }
    for (GherkinTableRow row : myTable.getDataRows()) {
      row.deleteCell(myColumnIndex);
    }
  }
View Full Code Here

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

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

      final int start = row.getStartOffsetInParent();
      final int end = start + row.getTextLength();

      if (start <= caretOffsetInParent && caretOffsetInParent <= end) {
        return row;
      }
      if (end < caretOffsetInParent && caretOffsetInParent <= nextRow.getStartOffsetInParent()) {
        return row;
      }
    }
    return rowList.get(rowList.size() - 1);
  }
View Full Code Here

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

                                Editor editor,
                                PsiFile file,
                                FileType fileType) {
    if (fileType.equals(GherkinFileType.INSTANCE)) {
      if (c == PIPE) {
        final GherkinTableRow currentRow = findCurrentRow(editor, file);
        if (currentRow != null) {
          final GherkinTableRow previousRow = getPreviousRow(currentRow);
          if (previousRow != null) {
            final int offsetInParent = editor.getCaretModel().getOffset() - currentRow.getTextOffset();
            final int cellNumber = getColumnNumber(currentRow, offsetInParent);
            int rightPosition = getPreferredPipeOffset(previousRow, cellNumber);
            if (offsetInParent < rightPosition - 1) {
View Full Code Here

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

    return result;
  }

  public int getColumnWidth(int columnIndex) {
    int result = 0;
    final GherkinTableRow headerRow = getHeaderRow();
    if (headerRow != null) {
      result = headerRow.getColumnWidth(columnIndex);
    }
    for (GherkinTableRow row : getDataRows()) {
      result = Math.max(result, row.getColumnWidth(columnIndex));
    }
    return result;
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.