Package com.google.classpath

Examples of com.google.classpath.ClassPath


  private SourceReportGenerator report;
  private MetricComputer computer;

  protected void setUp() throws Exception {
    super.setUp();
    ClassPath classPath =
        new ClassPathFactory().createFromPaths("src/test/java", "core/src/test/java");
    SourceLoader loader = new SourceLoader(classPath);
    report = new SourceReportGenerator(new GradeCategories(0, 0), loader, null, new CostModel(),
            new Date(), 10, new Configuration());
    computer = new MetricComputer(new JavaClassRepository(), null,
View Full Code Here


    String[] classPaths = getClassPaths(javaProject, projectLocation);

    List<String> allJavaPackages = javaProjectHelper.getAllJavaPackages(javaProject);

    ClassPathFactory classPathFactory = new ClassPathFactory();
    ClassPath classPath = classPathFactory.createFromPaths(classPaths);

    IPath pluginStateLocation = Activator.getDefault().getStateLocation();
    String baseReportDirectoryString =
      configuration.getAttribute(TestabilityConstants.CONFIGURATION_ATTR_REPORT_FOLDER_NAME, "");
    if ("".equals(baseReportDirectoryString)) {
View Full Code Here

    assertTrue(err.toString().startsWith("WARNING: can not analyze class "));
  }


  private JavaTestabilityRunner runnerFor(String path) {
    ClassPath classPath = new ClassPathFactory().createFromPaths(path, "core/" + path);
    ClassRepository classRepository = new JavaClassRepository(classPath);
    MetricComputer computer = new MetricComputer(classRepository, errStream, whiteList, 0);
    return new JavaTestabilityRunner(report, classPath, classRepository, computer,
        allEntryList, whiteList, new PrintStream(err));
  }
View Full Code Here

    }
   
    // log("Couldn't find import for class " + className);

    for (Library lib : editor.dmode.contribLibraries) {
      ClassPath cp = factory.createFromPath(lib.getClassPath());
      resources = cp.findResources("", regf);
      for (String res : resources) {
        candidates.add(res);
        log("Res: " + res);
      }
    }
   
    if (editor.getSketch().hasCodeFolder()) {
      File codeFolder = editor.getSketch().getCodeFolder();
      // get a list of .jar files in the "code" folder
      // (class files in subfolders should also be picked up)
      ClassPath cp = factory.createFromPath(Base
                                            .contentsToClassPath(codeFolder));
      resources = cp.findResources("", regf);
      for (String res : resources) {
        candidates.add(res);
        log("Res: " + res);
      }
    }
View Full Code Here

TOP

Related Classes of com.google.classpath.ClassPath

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.