Package org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.literals

Examples of org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.literals.GrLiteral


    if (ApplicationManager.getApplication().isUnitTestMode()) return true;

    final TemplateBuilderImpl builder = (TemplateBuilderImpl)TemplateBuilderFactory.getInstance().createTemplateBuilder(methodCall);

    // regexp str
    GrLiteral pattern = GrCucumberUtil.getStepDefinitionPattern(methodCall);
    assert pattern != null;

    String patternText = pattern.getText();

    builder.replaceElement(pattern,
                           new TextRange(1, patternText.length() - 1),
                           patternText.substring(1, patternText.length() - 1));
View Full Code Here


  public static String getStepDefinitionPatternText(final GrMethodCall stepDefinition) {
    return ApplicationManager.getApplication().runReadAction(new NullableComputable<String>() {
      @Nullable
      @Override
      public String compute() {
        GrLiteral pattern = getStepDefinitionPattern(stepDefinition);
        if (pattern == null) return null;
        Object value = pattern.getValue();
        return value instanceof String ? (String)value : null;
      }
    });
  }
View Full Code Here

TOP

Related Classes of org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.literals.GrLiteral

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.