Package com.subhajit.eclipse.swt

Examples of com.subhajit.eclipse.swt.SwtTaskRunner


    /*
     * SwtTaskRunner is the standard way to execute long-running tasks
     * within the Swt context.
     */
    new SwtTaskRunner() {
      @Override
      protected void runTask(IProgress progress) throws Exception {
        Graph<ClassMetaData> classMetaDataGraph = null;
        switch (_classDiagramType) {
        case Simple:
View Full Code Here


        FileUtils.saveTextFile(tempFile, sequenceDiagramSpecification);

        // Invoke the external process that generates the sequence
        // diagram
        // from the spec.
        new SwtTaskRunner() {
          @Override
          protected void runTask(IProgress progress) throws Exception {
            ByteArrayOutputStream out = null;
            try {
              out = new ByteArrayOutputStream();
View Full Code Here

        // The user canceled out of providing some input.
        return;
      }

      try {
        new SwtTaskRunner() {
          @Override
          protected void runTask(IProgress progress) throws Exception {
            processUserInputsInNonSwtThread(userInputs, progress);
          }
        };
View Full Code Here

  }

  private void createFatJarInteractively(final File projectJarDir,
      final File zipDir, final EclipseProject eclipseProject,
      final String mainClass, final boolean stripJars) throws Throwable {
    new SwtTaskRunner() {
      @Override
      protected void runTask(IProgress progress) throws Exception {
        // Create the project jar file.
        File projectJarFile = new File(zipDir, eclipseProject.getName()
            + ".jar");
View Full Code Here

  }

  private void createThinJarInteractively(final File projectJarDir,
      final File zipDir, final EclipseProject eclipseProject,
      final String mainClass0, final boolean stripJars0) throws Throwable {
    new SwtTaskRunner() {
      @Override
      protected void runTask(IProgress progress) throws Exception {
        createThinJarHelper(eclipseProject, projectJarDir, zipDir,
            mainClass0, stripJars0, progress);
      }
View Full Code Here

  static void compileSourceCodeInteractively(
      final EclipseProject eclipseProject,
      final EclipseMetafile[] dependencies, final File outputDirectory,
      final CodeLevel sourceCodeLevel, final CodeLevel targetCodeLevel)
      throws Throwable {
    new SwtTaskRunner() {
      @Override
      protected void runTask(IProgress progress) throws Exception {
        FileUtils.mkdirs(outputDirectory);
        progress.increment(1, "Compiling source code...");
        CreateJarUtils.compileSourceCodeForProject(outputDirectory,
View Full Code Here

  }

  static EclipseMetafile[] getProjectDependenciesInteractively(
      final EclipseProject project) throws Throwable {
    final List<EclipseMetafile> ret = new ArrayList<EclipseMetafile>();
    new SwtTaskRunner() {
      @Override
      protected void runTask(IProgress progress) throws Exception {
        ret.addAll(Arrays.asList(getProjectDependencies(project,
            progress)));
      }
View Full Code Here

  }

  static void copyDependencyJarsInteractively(
      final EclipseProject eclipseProject, final File zipDir)
      throws Throwable {
    new SwtTaskRunner() {
      @Override
      protected void runTask(IProgress progress) throws Exception {
        copyDependencyJars(eclipseProject, zipDir, progress);
      }
    };
View Full Code Here

   */
  static List<String> findMainClassesInteractively(
      final URLClassLoader classLoader) throws Throwable {
    try {
      final List<String> mainClasses = new ArrayList<String>();
      new SwtTaskRunner() {
        @Override
        protected void runTask(IProgress progress) throws Exception {
          URL[] urls = classLoader.getURLs();
          if (urls.length == 0) {
            throw new IllegalArgumentException(
View Full Code Here

    final String className = (String) inputs.get("class");
    final URLClassLoader classLoader = ProjectUtils.getClassLoader(
        (IJavaProject) inputs.get("project"), true);

    final Map<MethodInfo, byte[]> diagrams = new HashMap<MethodInfo, byte[]>();
    new SwtTaskRunner() {
      @Override
      protected void runTask(IProgress progress) throws Exception {
        progress.setMessage("Computing sequence diagram...");
        SequenceDiagramGenerator gen = new SequenceDiagramGenerator(
            classLoader);
View Full Code Here

TOP

Related Classes of com.subhajit.eclipse.swt.SwtTaskRunner

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.