| Summary: | SWTException in CoolBarManager.update() on updating disposed CoolItem | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Yury <swimmer_86> | ||||||||
| Component: | JFace | Assignee: | Project Inbox <rap-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | rsternberg | ||||||||
| Version: | 2.1 | ||||||||||
| Target Milestone: | 2.2 M2 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | sr212 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Yury
Created attachment 235800 [details]
proposed patch
Created attachment 235847 [details]
Proposed patch
Yury, could you try the attached patch. I've introduced "inUpdate" filed which is used to skip the resize listener execution. When CoolBarManager#update() is called, the contribution items sizes are updated at the end of the method anyway.
Thank you, Ivan for the quick fix - this patch works.
It seems to me that resize listeners should not be notified when coolBar.setRedraw(false) is set.
See org.eclipse.jface.action.CoolBarManager.update(boolean)
...
try {
coolBar.setRedraw(false);
inUpdate = true;
...
} finally {
coolBar.setRedraw(true);
inUpdate = false;
}
Your flag inUpdate is synchronized with need redraw state.
It is just my thoughts.
Is it possible to include these fixes in RAP 2.1.1?
Applied the patch to master with commit b76264fce735822d8e33ca7c60141d5bff9aa65b. The redraw flag does not affect control resizing (listeners) in SWT. It only suppresses the OS drawing operations on the control. Yury, it's too late for 2.1.1 - the 2.1.1 build will be available for download today. I will mark it for consideration for 2.1.2. +1 for backporting to 2.1.2 Backported to 2.1-maintenance branch with change https://git.eclipse.org/r/21238. |