Skip to content

Commit

Permalink
Merge pull request #154 from laeubi/run_job_in_place
Browse files Browse the repository at this point in the history
If the job manager is suspended run the job directly
  • Loading branch information
scottslewis authored Jan 15, 2025
2 parents cec2460 + 91b4774 commit 7f36f26
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ecf.core.security.IConnectContext;
Expand Down Expand Up @@ -147,8 +148,11 @@ public IRemoteFileSystemRequest sendBrowseRequest() {

IRemoteFileSystemRequest request = createRemoteFileSystemRequest();
job.setRequest(request);

job.schedule();
if (Job.getJobManager().isSuspended()) {
job.run(new NullProgressMonitor());
} else {
job.schedule();
}
return request;
}

Expand Down

0 comments on commit 7f36f26

Please sign in to comment.