Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ptp-dev] Question about removing selected job from job view

I'm making an attempt to fix the job view so a selected terminated job can 
be removed from the job view (todo list #44). I have this mostly working, 
but have run into a quirk. In the ParallelJobsView, I added code to the 
jobTableViewer mouse listener to save the job state and IPJob object for 
the job that the mouse was over when it was right-clicked. If the job is 
in terminated state, then I add an additional action to the popup menu in 
fillJobContextMenu, passing the saved IPJob object to the constructor for 
my new action. In the run method in that action, I call the removeJob 
method in the JobManager class.

This sort of works, in that the job gets deleted from the view, but the 
job only disappears after I perform another action that updates the job 
view, such as submit another job. In looking at the JobManager class, I 
see that the removeAllStoppedJobs method finds the correct IPQueue object 
and calls getResourceManager().removeTerminatedJobs in that IPQueue 
object. Do I need to do something similar to the logic flow in the 
removeTerminatedJobs method and what it calls, but only removing the 
matching IPJob object?

Have I gone way off track in trying to fix this?

Dave


Back to the top