Package com.subhajit.common.util

Examples of com.subhajit.common.util.IProgress.increment()


    new TaskRunner(new ISwingRunnableWithProgress() {
      public void run(IProgress progresses) throws Throwable {
        IProgress progress = progresses;
        for (int i = 0; i < 100; i++) {
          Thread.sleep(random.nextInt(5) * 100);
          progress.increment(1, "" + (i + 1));
          if (Thread.currentThread().isInterrupted()) {
            return;
          }
        }
      }
View Full Code Here


        IProgress progress = progresses;
        progress.setMessage("Finding files, please wait");
        List<File> srcFiles = FileUtils.listAllFilesUnder(srcDir);
        progress.setRange(0, srcFiles.size());
        for (File file : srcFiles) {
          progress.increment(1, "Copying " + file.length()
              + " bytes (" + file.getAbsolutePath() + ")");
          File destFile = new File(destDir, file.getAbsolutePath()
              .substring(srcDir.getAbsolutePath().length()));
          if (!destFile.getParentFile().exists()) {
            FileUtils.mkdirs(destFile.getParentFile());
View Full Code Here

            List<IJavaProject> dependentProjects = BuildUtils
                .getDependentProjects(javaProject, progress);
            progress.setRange(0, dependentProjects.size());
            int index = 0;
            for (IJavaProject project : dependentProjects) {
              progress.increment(1, "Building "
                  + project.getProject().getName());
              BuildUtils.buildJavaProjectInteractively0(project,
                  progress, buildKind, problems);
              progress.setRange(0, dependentProjects.size());
              for (int i = 0; i < index; i++) {
View Full Code Here

                  + project.getProject().getName());
              BuildUtils.buildJavaProjectInteractively0(project,
                  progress, buildKind, problems);
              progress.setRange(0, dependentProjects.size());
              for (int i = 0; i < index; i++) {
                progress.increment(1, "");
              }
              index++;
            }
            BuildUtils.buildJavaProjectInteractively0(javaProject,
                progress, buildKind, problems);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.