Package org.jetbrains.plugins.cucumber.psi.impl

Examples of org.jetbrains.plugins.cucumber.psi.impl.GherkinExamplesBlockImpl


    return new GherkinElementVisitor() {
      @Override
      public void visitScenarioOutline(GherkinScenarioOutline outline) {
        super.visitScenarioOutline(outline);

        final GherkinExamplesBlockImpl block = PsiTreeUtil.getChildOfType(outline, GherkinExamplesBlockImpl.class);
        if (block == null) {
          final PsiElement descriptionLine = outline.getShortDescriptionText();
          if (descriptionLine != null) {
            holder.registerProblem(outline,
                                   new TextRange(0, descriptionLine.getTextRange().getEndOffset() - outline.getTextOffset()),
View Full Code Here


    GherkinScenarioOutline fakeScenario = (GherkinScenarioOutline)GherkinElementFactory.createScenarioFromText(project, language, text);

    final GherkinExamplesBlock fakeExampleSection = fakeScenario.getExamplesBlocks().get(0);
    assert fakeExampleSection != null;

    GherkinExamplesBlockImpl addedSection = (GherkinExamplesBlockImpl)outline.add(fakeExampleSection);
    addedSection = CodeInsightUtilCore.forcePsiPostprocessAndRestoreElement(addedSection);
    final GherkinTable table = addedSection.getTable();
    assert table != null;
    final GherkinTableRow headerRow = table.getHeaderRow();
    assert headerRow != null;
    final List<GherkinTableCell> cells = headerRow.getPsiCells();
    final int firstCellOffset =  cells.size() > 0 && cells.get(0).getTextLength() > 0 ?
View Full Code Here

TOP

Related Classes of org.jetbrains.plugins.cucumber.psi.impl.GherkinExamplesBlockImpl

Copyright © 2018 www.massapicom. 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.