Why is IJobRunnable dependent on UI? [message #530069] |
Wed, 28 April 2010 07:34  |
Eclipse User |
|
|
|
The interface IJobRunnable is part of the org.eclipse.ui.progress
package within the org.eclipse.ui.workbench plugin, even though
neither of the dependent types of this interface depends on UI
or the workbench.
It seems to me that this interface should actually belong to
core.runtime, which would allow for general Job delegates that
can be assigned a "job-runnable" (i.e. IJobRunnable) to.
Are there any reasons why the design is the way it is?
Thanks & Greetings from Bremen,
Daniel Krügler
|
|
|
|
|
Re: Why is IJobRunnable dependent on UI? [message #538329 is a reply to message #538300] |
Mon, 07 June 2010 07:47  |
Eclipse User |
|
|
|
On 07/06/10 3:05 PM, Daniel Krügler wrote:
> On 06.05.2010 13:10, Zied wrote:
>> because Job need to get an instance of progress Monitor to show a
>> progress bar in the bottom-right of the screen with red square( the
>> cancel operation). if you need to have JOB juste implement your custom
>> Class with a runnable instance inside .
>
> This doesn't answer my question. The basic Job API is part of the
> org.eclipse.core.runtime package (including IStatus and
> IProgressMonitor), thus there exists no actual reason for
> having a different choice for IJobRunnable, because that is
> not depending on any UI feature.
>
> To me, the current state of affairs looks like a defect.
>
> - Daniel Krügler
If a class implements this interface, the run operation can be easily
wrapped inside a job or run directly from elsewhere. I don't see any
usage of this interface apart from the Save operation.
Apart from this purpose, it doesn't have any direct connection between
the jobs framework.
- Prakash
Platform UI Team, IBM
www.eclipse-tips.com
|
|
|
Powered by
FUDForum. Page generated in 0.04381 seconds