Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Why is IJobRunnable dependent on UI?
Why is IJobRunnable dependent on UI? [message #530069] Wed, 28 April 2010 11:34 Go to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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 #531844 is a reply to message #530069] Thu, 06 May 2010 11:10 Go to previous messageGo to next message
Zied is currently offline ZiedFriend
Messages: 26
Registered: February 2010
Junior Member
hello,
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 do an eclipse "JOB" just implement your custom Class with a runnable instance inside .

[Updated on: Thu, 06 May 2010 11:11]

Report message to a moderator

Re: Why is IJobRunnable dependent on UI? [message #538300 is a reply to message #531844] Mon, 07 June 2010 09:35 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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
Re: Why is IJobRunnable dependent on UI? [message #538329 is a reply to message #538300] Mon, 07 June 2010 11:47 Go to previous message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
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
Previous Topic:Composite's Scrollbar issue
Next Topic:Importing in Execute Time
Goto Forum:
  


Current Time: Sun Dec 21 05:01:15 GMT 2014

Powered by FUDForum. Page generated in 0.01910 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software