Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 402015 - Duplicate "Cancel Operation" in Progress view
Summary: Duplicate "Cancel Operation" in Progress view
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.3 RC1   Edit
Assignee: Szymon Ptaszkiewicz CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-28 09:59 EST by Szymon Ptaszkiewicz CLA
Modified: 2013-05-20 06:52 EDT (History)
5 users (show)

See Also:
markus.kell.r: review+


Attachments
Progress view (19.85 KB, image/png)
2013-02-28 09:59 EST, Szymon Ptaszkiewicz CLA
no flags Details
Patch v.0.1 (875 bytes, patch)
2013-03-21 13:02 EDT, Szymon Ptaszkiewicz CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Ptaszkiewicz CLA 2013-02-28 09:59:09 EST
Created attachment 227731 [details]
Progress view

Build id: I20130219-1600

When Progress view is refreshed/updated, it is easy to see that "Cancel Operation" button is shown twice. It seems that it is first rendered at the end of the job label and then again on the right side of the view. The one at the end of the label is redundant and causes ugly flickering. The attachment shows how it looks like.
Comment 1 Szymon Ptaszkiewicz CLA 2013-03-21 13:02:31 EDT
The bug was introduced by a fix for bug 242144. Flickering is caused by additional call to layout() which is called to soon. Here is the relevant stack:

ProgressInfoItem.refresh(ProgressInfoItem.java:605)
ProgressInfoItem.createChildren(ProgressInfoItem.java:304)
ProgressInfoItem.<init>(ProgressInfoItem.java:204)
DetailedProgressViewer.createNewItem(DetailedProgressViewer.java:203)
DetailedProgressViewer.add(DetailedProgressViewer.java:177)
ProgressViewerContentProvider.add(ProgressViewerContentProvider.java:224)
ProgressViewUpdater$1.runInUIThread(ProgressViewUpdater.java:297)
UIJob$1.run(UIJob.java:95)
...

The layout method called on a parent widget uses layout data of child widgets to properly lay out. The above stack shows that getParent().layout(...) is called before setLayoutData(...). The fix is to move createChildren(...) after setLayoutData(...) so that refresh happens when layout data is already set.
Comment 2 Szymon Ptaszkiewicz CLA 2013-03-21 13:02:51 EDT
Created attachment 228869 [details]
Patch v.0.1
Comment 3 Markus Keller CLA 2013-05-15 08:44:07 EDT
+1 for RC1, fix looks good and works.
Comment 5 Daniel Rolka CLA 2013-05-20 06:52:06 EDT
Verified in the build: I20130516-2200