Java Code Examples for org.eclipse.core.runtime.jobs.Job#getName()

The following examples show how to use org.eclipse.core.runtime.jobs.Job#getName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DummyJobChangeListener.java    From tlaplus with MIT License 5 votes vote down vote up
public void done(IJobChangeEvent event) {
	final Job j = event.getJob();
	if(j.belongsTo(ToolboxJob.FAMILY)) {
		final String jobName = j.getName();
		if(jobName.endsWith(model.getName())) {
			job = j;
		}
	}
}
 
Example 2
Source File: JobUtils.java    From thym with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=405456 in
 * Eclipse 4.3.0M7 (since -Dorg.eclipse.ui.testsDisableWorkbenchAutoSave=true
 * option is not yet implemented in M7)
 *
 * @param job
 * @return
 */
private static boolean shouldIgnoreJob(Job job) {
	for (String name : IGNORE_JOBS_NAMES) {
		if (name != null && job != null && job.getName() != null && name.equalsIgnoreCase(job.getName().trim())) {
			System.out.println("Ignoring the non-build long running job: " + job.getName());
			return true;
		}
	}
	return false;
}