Examples of GherkinStepsHolder


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

public class CucumberJavaScenarioRunConfigurationProducer extends CucumberJavaFeatureRunConfigurationProducer {
  @Override
  protected String getNameFilter(@NotNull ConfigurationContext context) {
    final PsiElement sourceElement = context.getPsiLocation();

    final GherkinStepsHolder scenario = PsiTreeUtil.getParentOfType(sourceElement, GherkinScenario.class, GherkinScenarioOutline.class);
    if (scenario != null) {
      final String scenarioName = scenario.getScenarioName().replaceAll("\\\"", "\\\\\"").replaceAll("\\(", "\\\\(").replaceAll("\\)", "\\\\)");
      return scenarioName;
    }

    return super.getNameFilter(context);
  }
View Full Code Here

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

  @Nullable
  @Override
  protected VirtualFile getFileToRun(ConfigurationContext context) {
    final PsiElement element = context.getPsiLocation();
    final GherkinStepsHolder scenario = PsiTreeUtil.getParentOfType(element, GherkinScenario.class, GherkinScenarioOutline.class);
    final PsiFile psiFile = scenario != null ? scenario.getContainingFile() : null;
    return psiFile != null ? psiFile.getVirtualFile() : null;
  }
View Full Code Here

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

  }

  @Override
  protected String getConfigurationName(@NotNull final ConfigurationContext context) {
    final PsiElement sourceElement = context.getPsiLocation();
    final GherkinStepsHolder scenario = PsiTreeUtil.getParentOfType(sourceElement, GherkinScenario.class, GherkinScenarioOutline.class);

    return "Scenario: " + (scenario != null ? scenario.getScenarioName() : "");
  }
View Full Code Here

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

  @Nullable
  @Override
  protected VirtualFile getFileToRun(ConfigurationContext context) {
    final PsiElement element = context.getPsiLocation();
    final GherkinStepsHolder scenario = PsiTreeUtil.getParentOfType(element, GherkinScenario.class, GherkinScenarioOutline.class);
    if (element != null && scenario == null && element.getContainingFile() instanceof GherkinFile) {
      return element.getContainingFile().getVirtualFile();
    }

    return null;
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.