Esempio n. 1
0
  boolean shouldComputeVariation(String variationMode, Resource resource) {
    if (Scopes.FILE.equals(resource.getScope())
        && !Qualifiers.UNIT_TEST_FILE.equals(resource.getQualifier())) {
      return enabledFileVariation
          && StringUtils.equals(variationMode, CoreProperties.TIMEMACHINE_MODE_PREVIOUS_ANALYSIS);
    }

    // measures on files are currently purged, so past measures are not available on files
    return StringUtils.equals(Scopes.PROJECT, resource.getScope())
        || StringUtils.equals(Scopes.DIRECTORY, resource.getScope());
  }
Esempio n. 2
0
 /**
  * Views plugin creates copy of technical projects and should be allowed to copy all measures even
  * internal ones
  */
 private boolean isTechnicalProjectCopy(Resource resource) {
   return Scopes.FILE.equals(resource.getScope())
       && Qualifiers.PROJECT.equals(resource.getQualifier());
 }