Package com.intellij.javascript.testFramework.qunit

Examples of com.intellij.javascript.testFramework.qunit.QUnitFileStructure


    for (VirtualFile file : jsTestVirtualFiles) {
      PsiFile psiFile = PsiManager.getInstance(myProject).findFile(file);
      if (psiFile instanceof JSFile) {
        JSFile jsFile = (JSFile) psiFile;
        QUnitFileStructureBuilder builder = QUnitFileStructureBuilder.getInstance();
        QUnitFileStructure qunitFileStructure = builder.fetchCachedTestFileStructure(jsFile);
        PsiElement element = qunitFileStructure.findPsiElement(moduleName, testName);
        if (element != null && element.isValid()) {
          return element;
        }
      }
    }
View Full Code Here


    for (VirtualFile jsTestVirtualFile : validJsTestVirtualFiles) {
      PsiFile psiFile = PsiManager.getInstance(project).findFile(jsTestVirtualFile);
      if (psiFile instanceof JSFile) {
        JSFile jsFile = (JSFile) psiFile;
        QUnitFileStructureBuilder builder = QUnitFileStructureBuilder.getInstance();
        QUnitFileStructure qunitFileStructure = builder.fetchCachedTestFileStructure(jsFile);
        PsiElement element = qunitFileStructure.findPsiElement(DefaultQUnitModuleStructure.NAME, testMethodName);
        if (element != null && element.isValid()) {
          return element;
        }
      }
    }
View Full Code Here

    );
  }

  @Override
  protected boolean isSuitableElement(@NotNull JSFile jsFile, @NotNull JSCallExpression callExpression) {
    QUnitFileStructure structure = QUnitFileStructureBuilder.getInstance().fetchCachedTestFileStructure(jsFile);
    String name = structure.getNameByPsiElement(callExpression);
    return name != null;
  }
View Full Code Here

  }

  @Nullable
  private static LineMarkerInfo getQUnitLineMarkerInfo(@NotNull JSFile jsFile,
                                                       @NotNull PsiElement element) {
    QUnitFileStructure qunitFileStructure = QUnitFileStructureBuilder.getInstance().fetchCachedTestFileStructure(jsFile);
    if (element instanceof JSCallExpression) {
      JSCallExpression callExpression = (JSCallExpression) element;
      String testElementName = qunitFileStructure.getNameByPsiElement(callExpression);
      if (testElementName == null) {
        return null;
      }
      return createLineMarkerFromElement(element, testElementName);
    }
View Full Code Here

TOP

Related Classes of com.intellij.javascript.testFramework.qunit.QUnitFileStructure

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.