public Collection getHintPaths()

in fxcop-agent/src/jetbrains/buildServer/fxcop/agent/FxCopRegistrySearch.java [28:50]


  public Collection<File> getHintPaths(@NotNull final BuildAgentConfiguration config, @Nullable AgentParametersSupplier dotNetParametersSupplier) {
    // Use .fxcop file association
    final String fxcopClass = myRegistryAccessor.readRegistryText(Win32RegistryAccessor.Hive.CLASSES_ROOT, Bitness.BIT32, FXCOP_PROJECT_FILE_EXT, "");
    if (fxcopClass == null) {
      LOG.debug(".fxcop file association wasn't found in CLASSES_ROOT");
      return Collections.emptyList();
    }

    LOG.info("Found FxCop class in CLASSES_ROOT: " + fxcopClass);
    final String fxcopStartCmd = myRegistryAccessor.readRegistryText(Win32RegistryAccessor.Hive.CLASSES_ROOT, Bitness.BIT32, fxcopClass + "\\shell\\open\\command", "");
    if (fxcopStartCmd == null) {
      return Collections.emptyList();
    }

    final String fxcopBinary = extractFxCopBinary(fxcopStartCmd);
    if (fxcopBinary == null) {
      LOG.warn("Can't extract fxcop binary from: " + fxcopStartCmd);
      return Collections.emptyList();
    }

    LOG.info("Found FxCopCmd start cmd: " + fxcopStartCmd);
    return Collections.singleton(new File(fxcopBinary));
  }