Package com.subhajit.gui.progress

Examples of com.subhajit.gui.progress.ISwingRunnableWithProgress


    }
    new Thread(new Runnable() {
      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()) {
              progress.increment(1, "");
              Graph<String> sourceNode = ensureNodeExists(nodes,
                  entry.getKey());
              for (File usedFile : entry.getValue()) {
                if (!usedFile.equals(entry.getKey())) {
                  Graph<String> targetNode = ensureNodeExists(
                      nodes, usedFile);
                  boolean alreadyParent = false;
                  for (Graph<String> child : sourceNode
                      .getChildren()) {
                    if (child == targetNode) {
                      alreadyParent = true;
                      break;
                    }
                  }
                  if (!alreadyParent) {
                    sourceNode.addChild(targetNode);
                  }
                }
              }
            }
          }
        }, "", "", 0).exec();
        new TaskRunner(new ISwingRunnableWithProgress() {
          public void run(IProgress progress) throws Throwable {
            progress.setRange(0, nodes.entrySet().size());
            File temporaryDir = new File(
                IConstants.JAVA_IO_TMPDIR_PATH + "/"
                    + UUID.randomUUID().toString());
View Full Code Here


   * @param classCountMap
   */
  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();
View Full Code Here

  private Map<MethodInfo, byte[]> generateSequenceDiagrams(
      final URLClassLoader classLoader, final String className,
      final String packagesListStr) {
    final Map<MethodInfo, byte[]> diagrams = new HashMap<MethodInfo, byte[]>();
    final String[] packagesList = packagesListStr.split(",");
    new TaskRunner(new ISwingRunnableWithProgress() {
      public void run(IProgress progress) throws Throwable {
        progress.setMessage("Computing sequence diagram...");
        SequenceDiagramGenerator gen = new SequenceDiagramGenerator(
            classLoader);
        ClassInfo classInfo = new ClassInfo(className, gen
View Full Code Here

    extractClassNamesWithMainMethod();
  }

  private void extractClassNamesWithMainMethod() throws IOException {
    classNames.clear();
    new TaskRunner(new ISwingRunnableWithProgress() {
      public void run(IProgress progress) throws Throwable {
        CompletionExecutor<List<String>> executor = new CompletionExecutor<List<String>>(
            5);
        try {
          int count = 0;
View Full Code Here

    final String className = getContext().getClassName();
    final File[] classpaths = new File[getContext().getFiles().length];
    System.arraycopy(getContext().getFiles(), 0, classpaths, 0,
        classpaths.length);
    final List<URLClassLoader> holder = new ArrayList<URLClassLoader>();
    new TaskRunner(new ISwingRunnableWithProgress() {
      public void run(IProgress progress) throws Throwable {
        holder.add(newClassLoader(classpaths, progress));
      }
    }, "Creating class loader", "", classpaths.length).exec();
    final URLClassLoader classLoader = holder.get(0);
View Full Code Here

    boolean showMethods = editedValues.get("setMethods") == null ? false
        : (Boolean) editedValues.get("setMethods");
    @SuppressWarnings("unused")
    final ClassRenderingStrategy strategy = showMethods ? DefaultClassRenderingStrategy.SHOW_ALL_DECLARED_METHODS
        : DefaultClassRenderingStrategy.SHOW_NO_FIELDS_OR_METHODS;
    new TaskRunner(new ISwingRunnableWithProgress() {
      public void run(IProgress progress) throws Throwable {
        Graph<ClassMetaData> classMetaDataGraph = null;
        try {
          switch (_classDiagramType) {
          case Simple:
View Full Code Here

  private void updateClassTree() {
    assert SwingUtilities.isEventDispatchThread();
    // Find all classes.
    try {
      final Set<String> classNames = new HashSet<String>();
      new TaskRunner(new ISwingRunnableWithProgress() {
        public void run(IProgress arg0) throws Throwable {
          classNames
              .addAll(ClasspathUtils
                  .getAllClasses(new Classpath(
                      classpathElements
View Full Code Here

    final String className = getContext().getClassName();
    final File[] classpaths = new File[getContext().getFiles().length];
    System.arraycopy(getContext().getFiles(), 0, classpaths, 0,
        classpaths.length);
    final List<URLClassLoader> holder = new ArrayList<URLClassLoader>();
    new TaskRunner(new ISwingRunnableWithProgress() {
      public void run(IProgress progress) throws Throwable {
        holder.add(newClassLoader(classpaths, progress));
      }
    }, "Creating class loader", "", classpaths.length).exec();
    final URLClassLoader classLoader = holder.get(0);
View Full Code Here

    ClassInfo classInfo = new ClassInfo(className, gen.getClassLoader());
    final List<MethodInfo> methods = classInfo.getMethods();
    final Map<MethodInfo, byte[]> diagrams = new HashMap<MethodInfo, byte[]>();

    // Create the sequence diagram.
    new TaskRunner(new ISwingRunnableWithProgress() {
      public void run(IProgress progress) throws Throwable {
        progress.setRange(0, methods.size() + 1);
        for (MethodInfo method : methods) {
          progress.increment(1, "Processing "
              + method.getMethodName());
View Full Code Here

TOP

Related Classes of com.subhajit.gui.progress.ISwingRunnableWithProgress

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.