Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IProgressMonitor usage
IProgressMonitor usage [message #327157] Fri, 11 April 2008 19:01 Go to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

Hi all,

I'm trying to understand the proper usage of progress monitors. Here's my
scenario:

I am being passed a monitor by the workbench. The task I run manipulates
resources, creation mainly. All these operations require their own
monitor.

How do I get a 'submonitor' from the original progress monitor to pass to
the resource operations? I'd expect the submonitor's cancel status to be
influenced by the parent monitor.

thanks in advance,
vlad
Re: IProgressMonitor usage [message #327162 is a reply to message #327157] Fri, 11 April 2008 20:44 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
monitor.beginTask("taskName", totalTicks);
new SubProgressMonitor(monitor, portionOfTicks1)
or
SubMonitor.convert(IProgressMonitor, "taskName", portionOfTicks)

I am less familiar with the SubMonitor usage..
HTH
Darins
http://runnerwhocodes.blogspot.com

"Vlad Ciubotariu" <vcciubot@uwaterloo.ca> wrote in message
news:pan.2008.04.11.19.00.59.636628@uwaterloo.ca...
> Hi all,
>
> I'm trying to understand the proper usage of progress monitors. Here's my
> scenario:
>
> I am being passed a monitor by the workbench. The task I run manipulates
> resources, creation mainly. All these operations require their own
> monitor.
>
> How do I get a 'submonitor' from the original progress monitor to pass to
> the resource operations? I'd expect the submonitor's cancel status to be
> influenced by the parent monitor.
>
> thanks in advance,
> vlad
>
Re: IProgressMonitor usage [message #327163 is a reply to message #327162] Fri, 11 April 2008 22:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

Got it!

thanks
vlad
On Fri, 11 Apr 2008 13:44:04 -0700, Darin Swanson wrote:

> monitor.beginTask("taskName", totalTicks);
> new SubProgressMonitor(monitor, portionOfTicks1)
> or
> SubMonitor.convert(IProgressMonitor, "taskName", portionOfTicks)
>
> I am less familiar with the SubMonitor usage..
> HTH
> Darins
> http://runnerwhocodes.blogspot.com
>
> "Vlad Ciubotariu" <vcciubot@uwaterloo.ca> wrote in message
> news:pan.2008.04.11.19.00.59.636628@uwaterloo.ca...
>> Hi all,
>>
>> I'm trying to understand the proper usage of progress monitors. Here's my
>> scenario:
>>
>> I am being passed a monitor by the workbench. The task I run manipulates
>> resources, creation mainly. All these operations require their own
>> monitor.
>>
>> How do I get a 'submonitor' from the original progress monitor to pass to
>> the resource operations? I'd expect the submonitor's cancel status to be
>> influenced by the parent monitor.
>>
>> thanks in advance,
>> vlad
>>
Re: IProgressMonitor usage [message #327313 is a reply to message #327163] Tue, 15 April 2008 13:12 Go to previous messageGo to next message
Jerome Lanneluc is currently offline Jerome LannelucFriend
Messages: 572
Registered: July 2009
Senior Member
Vlad Ciubotariu wrote:
> Got it!
>
> thanks
> vlad
> On Fri, 11 Apr 2008 13:44:04 -0700, Darin Swanson wrote:
>
>> monitor.beginTask("taskName", totalTicks);
>> new SubProgressMonitor(monitor, portionOfTicks1)
>> or
>> SubMonitor.convert(IProgressMonitor, "taskName", portionOfTicks)
>>
>> I am less familiar with the SubMonitor usage..
>> HTH
>> Darins
>> http://runnerwhocodes.blogspot.com
>>
>> "Vlad Ciubotariu" <vcciubot@uwaterloo.ca> wrote in message
>> news:pan.2008.04.11.19.00.59.636628@uwaterloo.ca...
>>> Hi all,
>>>
>>> I'm trying to understand the proper usage of progress monitors. Here's my
>>> scenario:
>>>
>>> I am being passed a monitor by the workbench. The task I run manipulates
>>> resources, creation mainly. All these operations require their own
>>> monitor.
>>>
>>> How do I get a 'submonitor' from the original progress monitor to pass to
>>> the resource operations? I'd expect the submonitor's cancel status to be
>>> influenced by the parent monitor.
>>>
>>> thanks in advance,
>>> vlad
>>>
>
See also http://www.eclipse.org/articles/Article-Progress-Monitors/ar ticle.html
Re: IProgressMonitor usage [message #327349 is a reply to message #327313] Wed, 16 April 2008 02:30 Go to previous message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

I guess that's the tutorial I was looking for.

vlad
On Tue, 15 Apr 2008 15:12:55 +0200, Jerome Lanneluc wrote:

> http://www.eclipse.org/articles/Article-Progress-Monitors/ar ticle.html
Previous Topic:How to convert Java project to dynamic web project
Next Topic:How to use CVS to get org.eclipse.releng.*
Goto Forum:
  


Current Time: Tue Jul 16 13:42:18 GMT 2024

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

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

Back to the top