Wednesday 15 May 2013

java - Eclipse RCP: check if a job has finished -



java - Eclipse RCP: check if a job has finished -

i want check if job has finished. this:

if ( tracejob.getstate() != job.waiting && tracejob.getstate() != job.running){

but think there should improve way check. has thought ?

you can utilize job.addjobchangelistener add together listener job. done method of listener called when job finishes. there jobchangeadapter class default implementations of ijobchangelistener methods don't need implement of them.

you can utilize job.getjobmanager().join(family, progress monitor) wait job finish. requires job override belongsto method test family job belongs to. there job.join() wait specific job finish.

java eclipse multithreading user-interface eclipse-rcp

No comments:

Post a Comment