Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-ui-dev] UIJob vs WorkbenchJob - Role/Expectations


Trying to make sure I understand the role of each job type with respect to classic plug-in development (IDE) vs other types of contributions (RCP and so on).

There were posts about the UIJob way back that seemed to indicate that you must provide a display on the constructor or via the setDisplay method (http://dev.eclipse.org/mhonarc/lists/eclipse-dev/msg03293.html). Current code base just grabs the display for you if not provided.  I seem to have a vague memory where the auto-grab of the PlatformUI display was supposed to be done by the WorkbenchJob, but not a UIJob.

Working backwards, I've got a set of the Eclipse UI oriented plug-ins imported (some, not all).  I've been searching for references to see if there is a common strategy on when to use UIJob vs WorkbenchJob.

Given the set I have in my workspace - I see 49 UIJob refs and 28 WorkbenchJob refs.  I guess I expected a higher percentage of them to be WorkbenchJobs.  Even code in the plugin that defines WorkbenchJob seems to use UIJob instead.

Can anyone comment on the strategy for choosing one over the other?  (Beyond the fact that the WorkbenchJob will ask twice if the platform is running (shouldSchedule/shouldRun) and gives you a 'free' done listener for the job itself).

Regards,

Pat McCarthy

Back to the top