Package com.intellij.lang.javascript.psi

Examples of com.intellij.lang.javascript.psi.JSProperty


    return basePathRef.get();
  }

  public static boolean isBasePathStringLiteral(@NotNull JSLiteralExpression literalExpression) {
    if (literalExpression.isQuotedLiteral()) {
      JSProperty property = ObjectUtils.tryCast(literalExpression.getParent(), JSProperty.class);
      if (property != null) {
        String name = JsPsiUtils.getPropertyName(property);
        return BASE_PATH_VAR_NAME.equals(name);
      }
    }
View Full Code Here


  }

  private static void matchTest(@NotNull MarkedTestStructure markedTestStructure, @NotNull JstdTestStructure testStructure) {
    Assert.assertEquals("Build test name is not equal to the marked one", markedTestStructure.getName(), testStructure.getName());
    String testName = testStructure.getName();
    JSProperty markedJsProperty = markedTestStructure.getPropertyPsiElement();
    if (markedJsProperty != null) {
      matchPsiElement(testName, "property", markedJsProperty, testStructure.getJsProperty());
    } else {
      matchPsiElement(testName, "declaration", markedTestStructure.getDeclarationPsiElement(), testStructure.getTestMethodNameDeclaration());
      matchPsiElement(testName, "body", markedTestStructure.getBodyPsiElement(), testStructure.getTestMethodBody());
View Full Code Here

  private static boolean isFileStringLiteral(@NotNull JSLiteralExpression literalExpression) {
    if (literalExpression.isQuotedLiteral()) {
      JSArrayLiteralExpression arrayLiteralExpression = ObjectUtils.tryCast(literalExpression.getParent(), JSArrayLiteralExpression.class);
      if (arrayLiteralExpression != null) {
        JSProperty property = ObjectUtils.tryCast(arrayLiteralExpression.getParent(), JSProperty.class);
        if (property != null) {
          String name = JsPsiUtils.getPropertyName(property);
          return FILES_VAR_NAME.equals(name);
        }
      }
View Full Code Here

TOP

Related Classes of com.intellij.lang.javascript.psi.JSProperty

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.