Package org.eclipse.core.runtime.jobs

Examples of org.eclipse.core.runtime.jobs.JobChangeAdapter


      }
    };
   
    job.setUser(true);
    job.schedule();
    job.addJobChangeListener(new JobChangeAdapter() {
      @Override
      public void done(IJobChangeEvent event) {
        Display.getDefault().asyncExec(new Runnable() {
          public void run() {
            MessageDialog.openInformation(window.getShell(), "Finished",
View Full Code Here


        // start thejob
        Job job = new CardImageLoaderJob(adapter);

        // update view when job get's done
        job.addJobChangeListener(new JobChangeAdapter() {
          @Override
          public void done(IJobChangeEvent event) {
            if (event.getResult().isOK()) {
              CardImageLoaderJob job = (CardImageLoaderJob) event.getJob();
View Full Code Here

      }
    };
    job.setPriority(Job.LONG);
    // Enable progress in taskbar on Windows 7
    job.setProperty(IProgressConstants2.SHOW_IN_TASKBAR_ICON_PROPERTY, true);
    job.addJobChangeListener(new JobChangeAdapter() {
      /* (non-Javadoc)
       * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
       */
      @Override
      public void done(IJobChangeEvent event) {
        syncInProgressMap.remove(log);
      }
    });
    if (callback != null) {
      job.addJobChangeListener(new JobChangeAdapter() {
        /* (non-Javadoc)
         * @see org.eclipse.core.runtime.jobs.JobChangeAdapter#done(org.eclipse.core.runtime.jobs.IJobChangeEvent)
         */
        @Override
        public void done(IJobChangeEvent event) {
View Full Code Here

        return;
      }
     
      if (MessageDialog.openConfirm(shell, "composer.phar not found", "composer.phar can not be found. Download it now?")) {
        DownloadJob job = new DownloadJob(getProject());
        job.addJobChangeListener(new JobChangeAdapter() {
          @Override
          public void done(IJobChangeEvent event) {
            // re-schedule the original job
            ComposerJob.this.schedule();
          }
View Full Code Here

  public static void start(HashSet<Click> clicks, String dbName) {
    synchronized (WriteCacheJob.class) {
      if (runningJob == null) {
        runningJob = new WriteClicksJob("News.nsf - Save Clicks", clicks, dbName);
        runningJob.addJobChangeListener(new JobChangeAdapter() {
          @Override
          public void done(IJobChangeEvent event) {
            runningJob = null;
          }
        });
View Full Code Here

   */
  public static boolean handleTaskJob(HttpServletRequest request, HttpServletResponse response, TaskJob job, ServletResourceHandler<IStatus> statusHandler, IURIUnqualificationStrategy strategy) throws IOException, ServletException, URISyntaxException, JSONException {
    job.schedule();

    final Object jobIsDone = new Object();
    final JobChangeAdapter jobListener = new JobChangeAdapter() {
      public void done(IJobChangeEvent event) {
        synchronized (jobIsDone) {
          jobIsDone.notify();
        }
      }
View Full Code Here

            }
        };
        job.setUser(false);
        job.setSystem(false);
        job.setPriority(Job.SHORT);
        job.addJobChangeListener(new JobChangeAdapter() {

            @Override
            public void done(IJobChangeEvent event) {
                // in principle, the following line should be enabled, but it
                // appears to force project rebuild
View Full Code Here

        if (overwrite) { // Overwrite file
          final CdkExportJob exportRarJob = new CdkExportJob("Building JAR", javaProject, cdkRarExportedPath);

          exportRarJob.setRule(ResourcesPlugin.getWorkspace().getRoot());
          exportRarJob.setUser(true);
          exportRarJob.addJobChangeListener(new JobChangeAdapter() {
            public void done(IJobChangeEvent event) {
              if (exportRarJob.getError() != null) {
                PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
                  public void run() {
                    try {
View Full Code Here

    getLogFacility().logDebug("startSearch() done");
  }

  private void registerJobChangeListener()
  {
    this.searchJob.addJobChangeListener(new JobChangeAdapter()
    {
      @Override
      public void done(IJobChangeEvent event)
      {
        IStatus result = event.getResult();
View Full Code Here

            getLOGGER().debug("Cancelling previous job " + previouslyScheduledJob + " (scheduled at " + previouslyScheduledJob.getScheduledAt() + ")");
            previouslyScheduledJob.cancelIfPossible(); // if running
        }
        scheduledJobs.put(jobKey, astJob);
       
    astJob.addJobChangeListener(new JobChangeAdapter() {
      @Override
      public void aboutToRun(IJobChangeEvent event) {
        astJobAboutToRun(asAstJob(event));
      }
      @Override
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.jobs.JobChangeAdapter

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.