Package org.eclipse.core.runtime.jobs

Examples of org.eclipse.core.runtime.jobs.IJobManager.find()


     * during the current build.
     */
    private void cancelPreviousPerlBuilderJob()
    {
        IJobManager jobMan = Platform.getJobManager();
        Job[] jobs = jobMan.find(PerlBuilderJob.JOB_FAMILY);

        if (jobs.length == 0) return; // no previous build found
       
        jobMan.cancel(PerlBuilderJob.JOB_FAMILY);
        try { jobMan.join(PerlBuilderJob.JOB_FAMILY, null); }
View Full Code Here


        assertThat("beam was not removed", beam2, nullValue());
    }

    private void waitJobsToFinish(final Object family) {
        final IJobManager jobMan = Job.getJobManager();
        final Job[] build = jobMan.find(family);
        while (build.length == 1) {
            try {
                build[0].join();
            } catch (final InterruptedException e) {
            }
View Full Code Here

    }
    try {
      boolean commitSuicide = false;

      IJobManager jobManager = Job.getJobManager();
      Job[] jobs = jobManager.find(null);
      if (jobs != null) {
        for (Job job : jobs) {
          if (job != this && job instanceof EOGenerateWorkspaceJob && ((EOGenerateWorkspaceJob) job).isFile(_eogenFile)) {
            EOGenerateWorkspaceJob otherJob = (EOGenerateWorkspaceJob) job;
            if (otherJob.creationDate() > _creationDate) {
View Full Code Here

   * org.eclipse.php.internal.core.codeassist.PHPCompletionEngine.complete
   */
  public static void waitOnBuild()
  {
    IJobManager manager = Job.getJobManager();
    Job[] jobs = manager.find(ResourcesPlugin.FAMILY_AUTO_BUILD);

    if(jobs != null && jobs.length > 0){
      // force the jobs that are holding us up to execute.
      for (Job job : jobs){
        job.wakeUp();
View Full Code Here

      while(tries < 10 && jobs != null && jobs.length > 0){
        try{
          Thread.sleep(100);
        }catch(Exception ignore){
        }
        jobs = manager.find(ResourcesPlugin.FAMILY_AUTO_BUILD);
        tries++;
      }
    }
  }
}
View Full Code Here

  public Object execute(CommandLine commandLine)
    throws Exception
  {
    Object family = getFamily(commandLine.getValue(Options.FAMILY_OPTION));
    IJobManager manager = Job.getJobManager();
    Job[] jobs = manager.find(family);

    ArrayList<HashMap<String,String>> results =
      new ArrayList<HashMap<String,String>>();

    for (Job job : jobs){
View Full Code Here

   * (non-Javadoc) Method declared on SelectionDispatchAction.
   */
  public void selectionChanged(final ITextSelection selection) {

    IJobManager jobManager = Job.getJobManager();
    if (jobManager.find(PHPUiPlugin.OPEN_CALL_HIERARCHY_ACTION_FAMILY_NAME).length > 0) {
      jobManager
          .cancel(PHPUiPlugin.OPEN_CALL_HIERARCHY_ACTION_FAMILY_NAME);
    }

    Job job = new Job(PHPUiPlugin.OPEN_CALL_HIERARCHY_ACTION_FAMILY_NAME) {
View Full Code Here

    }
  }

  void applyChangesJOB() {
    IJobManager jobManager = Job.getJobManager();
    if (jobManager.find("Applying annotation model changes").length == 0) { //$NON-NLS-1$
      ApplyAnnotationModelChangesJob job = new ApplyAnnotationModelChangesJob(
          "Applying annotation model changes", this); //$NON-NLS-1$
      job.setPriority(Job.DECORATE);
      job.setSystem(true);
      job.schedule();
View Full Code Here

      fInfo = info;
    }

    public void perform(IDocument document, IDocumentListener owner) {
      IJobManager jobManager = Job.getJobManager();
      if (jobManager.find("Applying annotation model changes").length == 0) { //$NON-NLS-1$
        ApplyAnnotationModelChangesJob job = new ApplyAnnotationModelChangesJob(
            "Applying annotation model changes", fInfo); //$NON-NLS-1$
        job.setPriority(Job.DECORATE);
        job.setSystem(true);
        job.schedule();
View Full Code Here

   * (non-Javadoc) Method declared on SelectionDispatchAction.
   */
  public void selectionChanged(final ITextSelection selection) {

    IJobManager jobManager = Job.getJobManager();
    if (jobManager.find(PHPUiPlugin.OPEN_TYPE_HIERARCHY_ACTION_FAMILY_NAME).length > 0) {
      jobManager
          .cancel(PHPUiPlugin.OPEN_TYPE_HIERARCHY_ACTION_FAMILY_NAME);
    }

    Job job = new Job(PHPUiPlugin.OPEN_TYPE_HIERARCHY_ACTION_FAMILY_NAME) {
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.