Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ProgressMonitorDialog question/feature request
ProgressMonitorDialog question/feature request [message #325048] Thu, 07 February 2008 00:50 Go to next message
Eclipse UserFriend
Originally posted by: olegryaboy.myway.com

I use ProgressMonitorDialog for a task that requires waiting for response
from a remote server, so I want the progress bar to show "indeterminate"
progress (like ProgressBar(x, SWT.INDETERMINATE)).

Is there a way to do that?

I tried monitor.beginTask("xxxx", IProgressMonitor.UNKNOWN), but that just
shows a disabled, grayed out progress bar...

Thank you!
Re: ProgressMonitorDialog question/feature request [message #325072 is a reply to message #325048] Thu, 07 February 2008 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ad.powerflasher.de

For me "beginTask" with "IProgressMonitor.UNKNOWN" works. Maybe there is an
other problem?


"Oleg" <olegryaboy@myway.com> schrieb im Newsbeitrag
news:b8343570ed1de03192eacde511c197d9$1@www.eclipse.org...
>I use ProgressMonitorDialog for a task that requires waiting for response
>from a remote server, so I want the progress bar to show "indeterminate"
>progress (like ProgressBar(x, SWT.INDETERMINATE)).
> Is there a way to do that?
> I tried monitor.beginTask("xxxx", IProgressMonitor.UNKNOWN), but that just
> shows a disabled, grayed out progress bar...
>
> Thank you!
>
Re: ProgressMonitorDialog question/feature request [message #325129 is a reply to message #325072] Sat, 09 February 2008 03:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olegryaboy.myway.com

Hi Arne,

When you say that it works for you, what do you see, exactly?
I am using Windows XP SP2, Eclipse 3.3, BTW.

Thank you!
Re: ProgressMonitorDialog question/feature request [message #325170 is a reply to message #325048] Mon, 11 February 2008 18:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olegryaboy.myway.com

Just to be clear, I expect the progress bar to show the "unknown progress"
animation, where it goes back and forth. Instead, I get a disabled, grayed
out bar, which looks like the program got "stuck".


Here's the code snippet:


// Get data from server
ProgressMonitorDialog pdm = new ProgressMonitorDialog(activeShell);

try {
pdm.run(true, false, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws
InvocationTargetException, InterruptedException {

monitor.beginTask("Getting data from server.",
IProgressMonitor.UNKNOWN);
monitor.subTask("Contacting server.");
monitor.worked(IProgressMonitor.UNKNOWN);
Thread.sleep(20000);
}
});
}
catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Re: ProgressMonitorDialog question/feature request [message #325238 is a reply to message #325170] Tue, 12 February 2008 23:53 Go to previous messageGo to next message
Marcel is currently offline MarcelFriend
Messages: 11
Registered: July 2009
Junior Member
Not entirely sure it'll solve your problem, but there is probably no
need to call monitor.worked for an unknown task - just call monitor.done
when you are finished, and in the meantime the progress display should
indicate that work is being done.

Marcel

On Mon, 2008-02-11 at 18:55 +0000, Oleg wrote:
> Just to be clear, I expect the progress bar to show the "unknown progress"
> animation, where it goes back and forth. Instead, I get a disabled, grayed
> out bar, which looks like the program got "stuck".
>
>
> Here's the code snippet:
>
>
> // Get data from server
> ProgressMonitorDialog pdm = new ProgressMonitorDialog(activeShell);
>
> try {
> pdm.run(true, false, new IRunnableWithProgress() {
> public void run(IProgressMonitor monitor) throws
> InvocationTargetException, InterruptedException {
>
> monitor.beginTask("Getting data from server.",
> IProgressMonitor.UNKNOWN);
> monitor.subTask("Contacting server.");
> monitor.worked(IProgressMonitor.UNKNOWN);
> Thread.sleep(20000);
> }
> });
> }
> catch (InvocationTargetException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> catch (InterruptedException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
>
>
Re: ProgressMonitorDialog question/feature request [message #325295 is a reply to message #325238] Wed, 13 February 2008 22:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: olegryaboy.myway.com

Marcel,

Thank you so much for replying. I tried deleting the call to
monitor.worked, and other permutations (calling worked(10), etc.), to no
avail - no animation, just a grayed out bar.

Would you mind running the code below on your computer to see if you get a
different behavior?

Thank you,
Oleg

Marcel wrote:

> Not entirely sure it'll solve your problem, but there is probably no
> need to call monitor.worked for an unknown task - just call monitor.done
> when you are finished, and in the meantime the progress display should
> indicate that work is being done.

> Marcel

> On Mon, 2008-02-11 at 18:55 +0000, Oleg wrote:
>> Just to be clear, I expect the progress bar to show the "unknown progress"
>> animation, where it goes back and forth. Instead, I get a disabled, grayed
>> out bar, which looks like the program got "stuck".
>>
>>
>> Here's the code snippet:
>>
>>
>> // Get data from server
>> ProgressMonitorDialog pdm = new ProgressMonitorDialog(activeShell);
>>
>> try {
>> pdm.run(true, false, new IRunnableWithProgress() {
>> public void run(IProgressMonitor monitor) throws
>> InvocationTargetException, InterruptedException {
>>
>> monitor.beginTask("Getting data from server.",
>> IProgressMonitor.UNKNOWN);
>> monitor.subTask("Contacting server.");
>> monitor.worked(IProgressMonitor.UNKNOWN);
>> Thread.sleep(20000);
>> }
>> });
>> }
>> catch (InvocationTargetException e) {
>> // TODO Auto-generated catch block
>> e.printStackTrace();
>> }
>> catch (InterruptedException e) {
>> // TODO Auto-generated catch block
>> e.printStackTrace();
>> }
>>
>>
Re: ProgressMonitorDialog question/feature request [message #325317 is a reply to message #325295] Thu, 14 February 2008 14:45 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Have you seen this article?
http://www.eclipse.org/articles/Article-Progress-Monitors/ar ticle.html

Hope this helps,
Eric


Oleg wrote:
> Marcel,
>
> Thank you so much for replying. I tried deleting the call to
> monitor.worked, and other permutations (calling worked(10), etc.), to no
> avail - no animation, just a grayed out bar.
>
> Would you mind running the code below on your computer to see if you get
> a different behavior?
>
> Thank you,
> Oleg
>
> Marcel wrote:
>
>> Not entirely sure it'll solve your problem, but there is probably no
>> need to call monitor.worked for an unknown task - just call monitor.done
>> when you are finished, and in the meantime the progress display should
>> indicate that work is being done.
>
>> Marcel
>
>> On Mon, 2008-02-11 at 18:55 +0000, Oleg wrote:
>>> Just to be clear, I expect the progress bar to show the "unknown
>>> progress" animation, where it goes back and forth. Instead, I get a
>>> disabled, grayed out bar, which looks like the program got "stuck".
>>>
>>>
>>> Here's the code snippet:
>>>
>>>
>>> // Get data from server
>>> ProgressMonitorDialog pdm = new ProgressMonitorDialog(activeShell);
>>>
>>> try {
>>> pdm.run(true, false, new IRunnableWithProgress() {
>>> public void run(IProgressMonitor monitor) throws
>>> InvocationTargetException, InterruptedException {
>>>
>>> monitor.beginTask("Getting data from server.",
>>> IProgressMonitor.UNKNOWN);
>>> monitor.subTask("Contacting server.");
>>> monitor.worked(IProgressMonitor.UNKNOWN);
>>> Thread.sleep(20000);
>>> }
>>> });
>>> }
>>> catch (InvocationTargetException e) {
>>> // TODO Auto-generated catch block
>>> e.printStackTrace();
>>> }
>>> catch (InterruptedException e) {
>>> // TODO Auto-generated catch block
>>> e.printStackTrace();
>>> }
>>>
>>>
>
>
Previous Topic:Can you only extend required plugins
Next Topic:Code template added to org.eclipse.ui.views is not listed in available templates?
Goto Forum:
  


Current Time: Sun Dec 21 12:04:31 GMT 2014

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

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