| Summary: | [EditorMgmt] switch to tabs on bottom then back to top redraws poorly | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Michael Van Meekeren <michaelvanmeekeren> | ||||||
| Component: | UI | Assignee: | Stefan Xenos <sxenos> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P2 | CC: | eclipse, ed.burnette, ines, veronika_irvine | ||||||
| Version: | 3.0 | Keywords: | helpwanted | ||||||
| Target Milestone: | 3.0 M9 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Michael Van Meekeren
This just started happening to me with N20040506 with *both* views and editors. For example if the tabs are on top and I change the option to make them be on the bottom and press Apply or OK, they're invisible until I do a resize or reset perspective. *** Bug 61661 has been marked as a duplicate of this bug. *** After comparing several versions of eclipse with a correct one (“N20040404”), I found the problem. In the oldest version I compared (“I20040504“), the “resizeListener” in “BasicStackPresentation” was present, but the content of the "handleEvent" method was commented out. The commented code was a call to "setControlSize()" which performs a layout. The newest version I examined is build id: 200405110800. In that build, the “BasicStackPresentation” class replaces "DefaultPartPresentation". In the latter class, the "resize" listener is completely removed. I added that part back and the tab folders behave correctly. I am going to attach a patch to this bug, but if the "resize" listener was removed intentionally and you need an alternative solution, let me know. Created attachment 10540 [details]
Patch to add the “resizeListener” code back in “DefaultPartPresentation”
Since SWT throws a resize event after it sets the tab position, I put back the
code to layout on the resize event to fix the drawing issues.
The resize listener was removed because it would cause 2 layouts to occur when calling setBounds(...). Also, the fact that we got a resize event even though the size of the CTabFolder had not changed would seem to be an SWT bug and we should not be relying on it. I would suggest calling layout(false) inside the property listener. Created attachment 10563 [details]
Patch for the tab folders
Added “layout(false)” to “DefaultViewPresentation” and
“DefaultEditorPresentation” in their property change methods.
Re-assigning to Stefan so he can apply the patch. Patch applied. Bug fixed. Thanks, Ines. Verified on Mac OS X and Windows XP with Build id: 200405181200. Verified with Build id: 200405190010 on Windows XP and Mac OS X. *** Bug 61786 has been marked as a duplicate of this bug. *** |