Package org.jetbrains.plugins.cucumber.steps

Examples of org.jetbrains.plugins.cucumber.steps.CucumberStepsIndex


   * @return step definitions
   * @see #resolveToDefinition()
   */
  @NotNull
  public Collection<AbstractStepDefinition> resolveToDefinitions() {
    final CucumberStepsIndex index = CucumberStepsIndex.getInstance(myStep.getProject());
    return index.findStepDefinitions(myStep.getContainingFile(), ((GherkinStepImpl)myStep));
  }
View Full Code Here


        final GherkinStepsHolder[] stepHolders = feature.getScenarios();
        for (GherkinStepsHolder stepHolder : stepHolders) {
          Collections.addAll(steps, stepHolder.getSteps());
        }
      }
      final CucumberStepsIndex index = CucumberStepsIndex.getInstance(file.getProject());
      final List<PsiFile> resultFiles = new ArrayList<PsiFile>();
      final List<GotoRelatedItem> result = new ArrayList<GotoRelatedItem>();
      for (GherkinStep step : steps) {
        AbstractStepDefinition stepDef = index.findStepDefinition(gherkinFile, step);
        final PsiElement stepDefMethod = stepDef != null ? stepDef.getElement() : null;

        if (stepDefMethod != null) {
          final PsiFile stepDefFile = stepDefMethod.getContainingFile();
          if (!resultFiles.contains(stepDefFile)) {
View Full Code Here

            }

            final VirtualFile file = value.getFirst().getVirtualFile();
            assert file != null;

            CucumberStepsIndex stepsIndex = CucumberStepsIndex.getInstance(value.getFirst().getProject());
            StepDefinitionCreator stepDefinitionCreator = stepsIndex.getExtensionMap().get(value.getSecond()).getStepDefinitionCreator();
            return stepDefinitionCreator.getStepDefinitionFilePath(value.getFirst());
          }

          @Override
          public Icon getIconFor(Pair<PsiFile, BDDFrameworkType> value) {
View Full Code Here

  public static Set<Pair<PsiFile, BDDFrameworkType>> getStepDefinitionContainers(@NotNull final GherkinFile featureFile) {
    final Set<Pair<PsiFile, BDDFrameworkType>> result =
      CucumberStepsIndex.getInstance(featureFile.getProject()).getStepDefinitionContainers(featureFile);

    CucumberStepsIndex stepsIndex = CucumberStepsIndex.getInstance(featureFile.getProject());
    for (Pair<PsiFile, BDDFrameworkType> item : result) {
      if (stepsIndex.getExtensionMap().get(item.getSecond()) == null) {
        result.remove(item);
      }
    }

    return result;
View Full Code Here

TOP

Related Classes of org.jetbrains.plugins.cucumber.steps.CucumberStepsIndex

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.