Package com.subhajit.codeanalysis.files

Examples of com.subhajit.codeanalysis.files.LWRepository


      public void run() {
        final ConcurrentMap<File, Set<File>> filesMap = new ConcurrentHashMap<File, Set<File>>();
        final ConcurrentMap<File, Graph<String>> nodes = new ConcurrentHashMap<File, Graph<String>>();
        new TaskRunner(new ISwingRunnableWithProgress() {
          public void run(IProgress progress) throws Throwable {
            LWRepository repository = GenerateDependenciesActionHandler.this.jarPanel.repository;
            filesMap.putAll(updateFilesMap(repository, progress));

            progress.setRange(0, filesMap.entrySet().size());
            for (Map.Entry<File, Set<File>> entry : filesMap
                .entrySet()) {
View Full Code Here


  private static void updateData(final List<File> files,
      final List<LWRepository> holder,
      final Map<File, ClassCount> classCountMap) {
    new TaskRunner(new ISwingRunnableWithProgress() {
      public void run(IProgress progress) throws Throwable {
        LWRepository other = new LWRepository(files, progress);
        holder.add(other);
        List<String> allDefinedClassNames = other
            .getAllDefinedClassNames();

        int steps = Math.min(allDefinedClassNames.size(), 20);
        int stepSize = allDefinedClassNames.size() / steps;
        progress.setRange(0, steps);
        int index = 0;
        for (String className : allDefinedClassNames) {
          index++;
          if (index % stepSize == 0) {
            progress.increment(1, "Loaded " + index + " classes.");
          }
          File file = other.locateClass(className);
          if (file != null) {
            file = file.getCanonicalFile();
            ClassCount count = classCountMap.get(file);
            if (count == null) {
              count = new ClassCount(0, 0);
              classCountMap.put(file, count);
            }
            if (other.findClass(className).isInterface()) {
              count
                  .setInterfaceCount(count
                      .getInterfaceCount() + 1);
            } else {
              count.setClassCount(count.getClassCount() + 1);
View Full Code Here

TOP

Related Classes of com.subhajit.codeanalysis.files.LWRepository

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.