Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Creating a "ProgressMonitor mirror" of the status view
Creating a "ProgressMonitor mirror" of the status view [message #334943] Wed, 11 March 2009 06:42 Go to next message
Philipp Simon is currently offline Philipp SimonFriend
Messages: 26
Registered: July 2009
Junior Member
Hi,

we have a normal Job that does some refreshing ( longer running
calculation recreating a model from input file). That one basically works
fine shows progress in the common places ( bottom right/ Status view /
workbench job dialog). The problem we have now is that in some places we
need to check if the Job is running and if so wait for it to complete.
Ideally while waiting for the job to complete the user should see exactly
the kind of progressbar the statusview is showing. Or at least something
similar. After having finished reading this link
http://book.javanb.com/eclipse-rich-client-platform-designin g-coding-and-packaging-java-applications-oct-2005/ch17lev1se c8.html
it seems o me that the only way to solve that would be to implement a
Progressprovider ourself which unfortunately would kill the workbench's
current Progressprovider ( so the status view)? Can someone verify this
and maybe give some thought input on how to solve the problem. We
definetly do not want to loose the normal workbench handling for the Jobs.

Thanks
Philipp
Re: Creating a "ProgressMonitor mirror" of the status view [message #334947 is a reply to message #334943] Wed, 11 March 2009 09:26 Go to previous messageGo to next message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
Hi,

I think you may be able to use JobManager.join if you give your Job a
specific JobFamily. JobManager.join should show the fact that there is a
job waiting as a separate progress bar in the same places as usual.

hth,

Steffen

Philipp Simon wrote:
> Hi,
>
> we have a normal Job that does some refreshing ( longer running
> calculation recreating a model from input file). That one basically
> works fine shows progress in the common places ( bottom right/ Status
> view / workbench job dialog). The problem we have now is that in some
> places we need to check if the Job is running and if so wait for it to
> complete. Ideally while waiting for the job to complete the user
> should see exactly the kind of progressbar the statusview is showing.
> Or at least something similar. After having finished reading this link
> http://book.javanb.com/eclipse-rich-client-platform-designin g-coding-and-packaging-java-applications-oct-2005/ch17lev1se c8.html
> it seems o me that the only way to solve that would be to implement a
> Progressprovider ourself which unfortunately would kill the
> workbench's current Progressprovider ( so the status view)? Can
> someone verify this and maybe give some thought input on how to solve
> the problem. We definetly do not want to loose the normal workbench
> handling for the Jobs.
>
> Thanks
> Philipp
>

--
Dr. rer. nat. Steffen Zschaler
Senior Research Associate

Lancaster University
Lancaster, United Kingdom

Email szschaler@acm.org
Phone +44 (01524) 510354
WWW http://www.steffen-zschaler.de/

--
Consider submitting to MDPLE, the 1st International Workshop on
Model-Driven Product Line Engineering
http://www.feasiple.de/workshop_en.html
Re: Creating a "ProgressMonitor mirror" of the status view [message #334950 is a reply to message #334943] Wed, 11 March 2009 16:22 Go to previous messageGo to next message
Jay Rosenthal is currently offline Jay RosenthalFriend
Messages: 2
Registered: July 2009
Junior Member
The JobManager might be one possible way to accomplish this. However
the JobManager is typically used to manage/monitor all jobs in the
system or a job family.

As you are only concerned with one particular job, you might try
installing a JobChangeListener using the addJobChangeListener() method.
There is also a getState() method which you can use to query the state
of the job.

Here are some more links that might be useful:
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/runtime_jobs.htm
http://www.eclipse.org/articles/Article-Concurrency/jobs-api .html


Good Luck
Jay


Philipp Simon wrote:
> Hi,
>
> we have a normal Job that does some refreshing ( longer running
> calculation recreating a model from input file). That one basically
> works fine shows progress in the common places ( bottom right/ Status
> view / workbench job dialog). The problem we have now is that in some
> places we need to check if the Job is running and if so wait for it to
> complete. Ideally while waiting for the job to complete the user should
> see exactly the kind of progressbar the statusview is showing. Or at
> least something similar. After having finished reading this link
> http://book.javanb.com/eclipse-rich-client-platform-designin g-coding-and-packaging-java-applications-oct-2005/ch17lev1se c8.html
> it seems o me that the only way to solve that would be to implement a
> Progressprovider ourself which unfortunately would kill the workbench's
> current Progressprovider ( so the status view)? Can someone verify this
> and maybe give some thought input on how to solve the problem. We
> definetly do not want to loose the normal workbench handling for the Jobs.
>
> Thanks
> Philipp
>
Re: Creating a "ProgressMonitor mirror" of the status view [message #334953 is a reply to message #334950] Wed, 11 March 2009 17:16 Go to previous message
Steffen Zschaler is currently offline Steffen ZschalerFriend
Messages: 266
Registered: July 2009
Senior Member
But would that give you access to the progress bar to indicate you are
blocking?

Steffen

Jay R. wrote:
> The JobManager might be one possible way to accomplish this. However
> the JobManager is typically used to manage/monitor all jobs in the
> system or a job family.
>
> As you are only concerned with one particular job, you might try
> installing a JobChangeListener using the addJobChangeListener() method.
> There is also a getState() method which you can use to query the state
> of the job.
>
> Here are some more links that might be useful:
> http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/runtime_jobs.htm
>
> http://www.eclipse.org/articles/Article-Concurrency/jobs-api .html
>
>
> Good Luck
> Jay
>
>
> Philipp Simon wrote:
>> Hi,
>>
>> we have a normal Job that does some refreshing ( longer running
>> calculation recreating a model from input file). That one basically
>> works fine shows progress in the common places ( bottom right/ Status
>> view / workbench job dialog). The problem we have now is that in some
>> places we need to check if the Job is running and if so wait for it
>> to complete. Ideally while waiting for the job to complete the user
>> should see exactly the kind of progressbar the statusview is showing.
>> Or at least something similar. After having finished reading this
>> link
>> http://book.javanb.com/eclipse-rich-client-platform-designin g-coding-and-packaging-java-applications-oct-2005/ch17lev1se c8.html
>> it seems o me that the only way to solve that would be to implement a
>> Progressprovider ourself which unfortunately would kill the
>> workbench's current Progressprovider ( so the status view)? Can
>> someone verify this and maybe give some thought input on how to solve
>> the problem. We definetly do not want to loose the normal workbench
>> handling for the Jobs.
>>
>> Thanks
>> Philipp
>>

--
Dr. rer. nat. Steffen Zschaler
Senior Research Associate

Lancaster University
Lancaster, United Kingdom

Email szschaler@acm.org
Phone +44 (01524) 510354
WWW http://www.steffen-zschaler.de/

--
Consider submitting to MDPLE, the 1st International Workshop on
Model-Driven Product Line Engineering
http://www.feasiple.de/workshop_en.html
Previous Topic:Registers view...
Next Topic:Existing problem markers are not displayed
Goto Forum:
  


Current Time: Fri Dec 13 02:51:23 GMT 2024

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

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

Back to the top