Package com.intellij.execution

Examples of com.intellij.execution.Location


  }

  @NotNull
  @Override
  public List<Location> getLocation(@NotNull String protocolId, @NotNull String locationData, Project project) {
    final Location location;
    if (PROTOCOL_ID__CONFIG_FILE.equals(protocolId)) {
      location = getConfigLocation(locationData);
    }
    else if (PROTOCOL_ID__TEST_SUITE.equals(protocolId)) {
      location = getTestLocation(locationData, true);
View Full Code Here


  private static final String PROTOCOL_ID__BROWSER_ERROR = "browserError";

  @NotNull
  @Override
  public List<Location> getLocation(@NotNull String protocolId, @NotNull String locationData, Project project) {
    final Location location;
    if (PROTOCOL_ID__CONFIG_FILE.equals(protocolId)) {
      location = findConfigFile(locationData, project);
    }
    else if (PROTOCOL_ID__TEST_CASE.equals(protocolId) || PROTOCOL_ID__TEST.equals(protocolId)) {
      location = findTest(locationData, project);
View Full Code Here

    final Module module = ModuleUtilCore.findModuleForFile(virtualFile, project);
    if (module == null) return false;

    String mainClassName = null;
    final Location location = context.getLocation();
    if (location != null) {
      if (LocationUtil.isJarAttached(location, CUCUMBER_1_0_MAIN_CLASS, new PsiDirectory[0])) {
        mainClassName = CUCUMBER_1_0_MAIN_CLASS;
      } else if (LocationUtil.isJarAttached(location, CUCUMBER_1_1_MAIN_CLASS, new PsiDirectory[0])) {
        mainClassName = CUCUMBER_1_1_MAIN_CLASS;
View Full Code Here

    return true;
  }

  @Override
  public boolean isConfigurationFromContext(CucumberJavaRunConfiguration runConfiguration, ConfigurationContext context) {
    final Location location = JavaExecutionUtil.stepIntoSingleClass(context.getLocation());

    final VirtualFile fileToRun = getFileToRun(context);
    if (fileToRun == null) {
      return false;
    }

    if (!fileToRun.getPath().equals(runConfiguration.getFilePath())) {
      return false;
    }

    if (!Comparing.strEqual(getNameFilter(context), runConfiguration.getNameFilter())) {
      return false;
    }

    final Module configurationModule = runConfiguration.getConfigurationModule().getModule();
    if (!Comparing.equal(location.getModule(), configurationModule)) {
      return false;
    }

    return true;
  }
View Full Code Here

            }

            GoFile goFile = (GoFile) PsiManager.getInstance(project).findFile(file);
            for (GoFunctionDeclaration func : GoFileUtils.getFunctionDeclarations(goFile)) {
                if (funcName.equals(func.getFunctionName())) {
                    Location location = new PsiLocation<PsiElement>(project, func);
                    return Collections.singletonList(location);
                }
            }
        }
View Full Code Here

        configuration.getConfigData().setKind(ErlangUnitRunConfiguration.ErlangUnitRunConfigurationKind.FUNCTION);

        LinkedHashSet<String> testsToRerun = new LinkedHashSet<String>();
        for (AbstractTestProxy testProxy : getFailedTests(project)) {
          Location location = testProxy.getLocation(project, GlobalSearchScope.allScope(project));
          PsiElement psiElement = location != null ? location.getPsiElement() : null;

          if (!(psiElement instanceof ErlangFunction)) continue;

          ErlangFunction function = (ErlangFunction) psiElement;
          String functionName = ErlangPsiImplUtil.getQualifiedFunctionName(function);
View Full Code Here

    List<Location> locations = new SmartList<Location>();
    Collection<ErlangFile> erlangFiles = getErlangFiles(project, module);

    if (function != null) {
      for (ErlangFile file : erlangFiles) {
        Location testLocation = getTestLocation(project, file, function, line);
        ContainerUtil.addIfNotNull(testLocation, locations);
      }
    }
    if (locations.isEmpty()) {
      for (ErlangFile file : erlangFiles) {
        Location moduleLocation = getModuleLocation(project, file);
        ContainerUtil.addIfNotNull(moduleLocation, locations);
      }
    }
    return locations;
  }
View Full Code Here

        final List<ErlangFunction> failedGeneratedTests = new ArrayList<ErlangFunction>();
        List<ErlangFunction> failedTests = ContainerUtil.mapNotNull(getFailedTests(project), new Function<AbstractTestProxy, ErlangFunction>() {
          @Nullable
          @Override
          public ErlangFunction fun(AbstractTestProxy testProxy) {
            Location location = testProxy.getLocation(project, GlobalSearchScope.allScope(project));
            PsiElement psiElement = location != null ? location.getPsiElement() : null;
            ErlangFunction function = psiElement instanceof ErlangFunction ? (ErlangFunction) psiElement : null;
            if (function != null && function.getArity() != 0) {
              failedGeneratedTests.add(function);
            }
            return function;
View Full Code Here

TOP

Related Classes of com.intellij.execution.Location

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.