Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 189991

Summary: [Progress] Progress view truncates progress widgets for long task names
Product: [Eclipse Project] Platform Reporter: Stefan Xenos <sxenos>
Component: UIAssignee: Tod Creasey <Tod_Creasey>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipse, markus.kell.r, samuelwu
Version: 3.3Keywords: helpwanted
Target Milestone: 3.4 M6   
Hardware: Other   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Screenshot demonstrating the bug
none
Patch
none
Patch to handle the long job name
none
Screenshot with missing button none

Description Stefan Xenos CLA 2007-05-30 14:21:14 EDT
Eclipse 3.3 M7, GTK/Linux

Make the progress view big.
Run a job with long subtask names
Make the progress view small.

Observed:

The rightmost part of the progress view is truncated. There is no way to click the "stop" button on any of the jobs.

Here's the weird bit: every time the subtask label changes, the job widgets shrink by a few pixels until eventually (slowly) the layout corrects itself.


Expected:

The job widgets resize to match the width of the progress view. Subtask labels are truncated as necessary to make them fit.
Comment 1 Stefan Xenos CLA 2007-05-30 14:22:57 EDT
Created attachment 69347 [details]
Screenshot demonstrating the bug
Comment 2 Tod Creasey CLA 2008-02-25 14:38:30 EST
*** Bug 219970 has been marked as a duplicate of this bug. ***
Comment 3 Tod Creasey CLA 2008-02-28 09:58:10 EST
Created attachment 91003 [details]
Patch

The issue is the trickiness of ScrolledComposites. Because we do not set initial sizes the link text lays itself out as long as it needs to be the full length of the string.

The gradual reduction occurs because we shorten the String when we get an update. The calculated size does not include the stop button so it gets a little smaller every update.

Note that this does not address overly long job names. We decided to discourage long job names as long detail belongs in the tasks.
Comment 4 Tod Creasey CLA 2008-02-28 09:59:01 EST
Patch released for build >20080228
Comment 5 Tod Creasey CLA 2008-02-28 10:09:22 EST
Created attachment 91005 [details]
Patch to handle the long job name

As Samuel noted in Bug 219970 CVS has long job names to this patch will handle that case as well.

Released as well for build >20080228
Comment 6 Samuel Wu CLA 2008-02-28 10:29:37 EST
Thank you, Tod, for investigating the problem. The patch you provided helps to keep the cancel button visible. But the button will still be hidden if the view is not wide enough. I'm wondering whether you can make the viewer in the ProgressView horizontally scrollable, like the following.

public void createPartControl(Composite parent) {
viewer = new DetailedProgressViewer(parent, SWT.MULTI|SWT.H_SCROLL);

In this way, the user at least has one more choice to get to the cancel button.
Comment 7 Tod Creasey CLA 2008-02-28 11:30:18 EST
Sam please show me a screenshot where it is not wide enough with the patch applied. When I tested this fix I didn't see the button cut off so the horizontal scroll should not be required.

I can add it if there is no other way but the truncation of task names was added to prevent the need for the scrollbar.
Comment 8 Samuel Wu CLA 2008-02-28 11:50:08 EST
Created attachment 91024 [details]
Screenshot with missing button

Hi Tod, this is the screenshot. Thanks.
Comment 9 Tod Creasey CLA 2008-02-28 12:53:23 EST
Sam do you get this problem when the job starts or does it happen as a result of a resize.

Also it looks like you did not apply the second patch. The first one handles long task names, the second one long job names.
Comment 10 Samuel Wu CLA 2008-02-28 13:43:52 EST
Tod,
I had both patches applied when I did the screen capture. 
Your resizing question led me to try a bit more. here was my scenario. 
1. I ran the action to generate the messages in progress view
2. Resized the view and close it
3. Reran my action and the cancel button was gone
4. If I restarted workbench after step two, then the cancel button would not be gone. 
Comment 11 Tod Creasey CLA 2008-02-28 13:56:54 EST
I assume you mean

1. I ran the action to generate the messages in progress view
2. Resized the progress view and then closed the progress view
2a Reopened the progress view
3. Reran my action and the cancel button was gone

Correct?
Comment 12 Samuel Wu CLA 2008-02-28 16:26:07 EST
you are right. 
Comment 13 Tod Creasey CLA 2008-03-24 15:33:18 EDT
Verified in I20080323-2000