Bug 18588 - [Workbench] Hierarchy - no progress monitor ?
Summary: [Workbench] Hierarchy - no progress monitor ?
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2002-06-01 09:44 EDT by Philipe Mulet CLA
Modified: 2006-06-22 08:34 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2002-06-01 09:44:25 EDT
Build 20020601

Open type java.lang.Object, select Object type name in editor, and hit F4.
No progress is shown during hierarchy opening.
Comment 1 Erich Gamma CLA 2002-06-01 16:09:48 EDT
we are using the WorkbenchWindow as the runnable context and it looks like 
progress doesn't show up under all circumstances.

We have two options:
a) use a ProgressMonitorDialog as the runnable context
->when dialog has no timeout this will result in a lot of flushing. In 
particular on save you will see progress first in the status line and then you 
will see a dialog (BTW, this is also a problem with a manual build, i.e. save 
uses the status line and the actual build is using a progess monitor dialog)

b) use the busy cursor runnable context as we did in F1
->the draw back here is that you cannot cancel the operation

Need advise from Nick what their plans are with regard to the progress monitor.
Comment 2 Nick Edgar CLA 2002-06-01 16:17:14 EDT
Sounds like our problem.  This is a candidate for fix pass 2.
Comment 3 Nick Edgar CLA 2002-06-01 16:42:48 EDT
The operation is being called with:
context.run(false, false, op)

So the operation is not cancelable and is running in the UI thread.
Recommend Search uses (true, true) and changes its code to handle being run in 
a non-UI thread.

We should process UI events after disabling the controls but before running 
the operation, to at least allow the status line to relayout and show the 
progress bar and cancel button.
Comment 4 Nick Edgar CLA 2002-06-01 16:43:07 EDT
See comments above.
Comment 5 Nick Edgar CLA 2002-06-05 16:04:26 EDT
Erich, I'm assuming that you won't be making changes to how you call the 
progress monitor here.  
Is it still important for you that the status line progress bar handle (false, 
false) for 2.0?
Comment 6 Erich Gamma CLA 2002-06-06 19:11:13 EDT
The main motivation for using the Application windows progress monitor is to 
support that opening the a type hierarchy on Object becomes cancelable.

As you point out the code is currently called with (false, false, op). This is 
not correct the operation should be cancelable, so we should call it with 
false, true. However, what we cannot do is to run the hierarchy refresh code 
always in an operation/modal context. We had tried this earlier without success.

If you can handle "false, true" then we would use the support. However, if this 
is not possible then we can fallback to use the busy runnable context. Given 
that opening the hierarchy object has drastically improved (30-40s) we can 
consider this again.
Comment 7 Nick Edgar CLA 2002-06-06 21:08:16 EDT
Adam is looking into what we can do to make this work.
If it's at all risky, we will have to defer though.

I don't quite understand how fork=false works even the ProgressDialog case.
If we're not spinning UI events, I don't see how the dialog even comes up and 
updates.
Comment 8 Erich Gamma CLA 2002-06-07 04:58:58 EDT
>I don't quite understand how fork=false works even the ProgressDialog case.
I don't think we have ever done this, so this might indeed not work at all. 

If it is too risky to support false, true we will switch back to the F1 
busyrunnable context solution.
Comment 9 Nick Edgar CLA 2002-06-07 16:26:48 EDT
Adam, please investigate.  If we can't fix by end of Monday, JDT will have to 
back out of using it.
Comment 10 Nick Edgar CLA 2002-06-10 11:50:09 EDT
The hierarchy calculation uses the animated progress bar.
In order for this to work, the event loop needs to be running.
We recommend using the EventLoopProgressMonitor to wrap your progress monitor.
Note that this is an internal class, so we would have to fix this problem 
properly post 2.0 (making EventLoopProgressMonitor API is not the right answer).

If you do not want to do this, then we recommend using the busyrunnable context 
instead of the status line.

Comment 11 Erich Gamma CLA 2002-06-10 18:20:48 EDT
in this case I prefer to switch back to the busy runnable context. 

thanks for your investigations
Comment 12 Nick Edgar CLA 2002-06-10 21:24:43 EDT
Defering to post 2.0.
Comment 13 Randy Giffen CLA 2002-08-12 10:40:23 EDT
Reopened for investigation
Comment 14 Eduardo Pereira CLA 2002-11-25 14:47:33 EST
Erich, Nick, Is there any work to be done here? Can I close this?
Comment 15 Nick Edgar CLA 2002-11-25 15:20:22 EST
I'm not sure what we can do here.  

McQ, a while back you said the Mac had progress monitors in a single-threaded 
model, and handled this problem somehow.  Could you explain how they do it?
Comment 16 Mike Wilson CLA 2002-11-26 09:00:55 EST
Sorry, I'm out of the loop on this one. I'm not sure exactly what the problem is.

I'm pretty sure it was Steve who was talking about the behavior of the various progress 
indicators on different platforms. My understanding is though, that once an indeterminate 
progress indicator on the mac is started, it will continue to spin without requiring 
application event handling until it is stopped again.

The only other interesting case is that busy cursor handling is free. Essentially, if the 
application stops responding to events, the system puts up a busy cursor , and takes it 
down the next time an event is dispatched.
Comment 17 Nick Edgar CLA 2003-02-19 11:41:12 EST
There are no plans for the UI team to work on this defect until higher 
priority items are addressed. 
Comment 18 Philipe Mulet CLA 2003-02-19 12:18:37 EST
Also see comment in similar bug 31268 :

In 2.1 world, since indexes are no longer checked for consistency eagerly 
during startup, search actions may trigger lazily some indexing work 
(rebuilding a big index will take some decent amount of time).

Thus, opening a type hierarchy can enter this mode, and user gets absolutely no 
feedback whatsoever, it feels the IDE froze.
Comment 19 Erich Gamma CLA 2003-02-19 12:26:22 EST
JDT is investigating into the type hierarchy open problem for 2.1. 

Having a fix for bug# 6325 would also improve the current situation (SWT is 
investigating on this one).
Comment 20 Tod Creasey CLA 2006-06-22 08:34:22 EDT
There are currently no plans to work on this feature