| Summary: | [Forms] Wrong code in org.eclipse.ui.forms.widgets.SizeCache | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Julian <youhoo2000> | ||||
| Component: | User Assistance | Assignee: | Chris Goldthorpe <cgold> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cgold, youhoo2000 | ||||
| Version: | 3.5.2 | ||||||
| Target Milestone: | 3.7 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
I agree that the code is wrong - have you seen any visible problems as a result of this bug? No, I just saw this bug and report it. Created attachment 172381 [details]
Patch
Patch applied to HEAD, Fixed. Fixed in 3.7M1 |
Build Identifier: 20100218-1602 package org.eclipse.ui.forms.widgets; import java.util.List; // should be org.eclipse.swt.widgets.List ............ static boolean independentLengthAndWidth(Control control) { if (control == null || control.isDisposed()) { return true; } if (control instanceof Button || control instanceof ProgressBar || control instanceof Sash || control instanceof Scale || control instanceof Slider || control instanceof List /*** here used List ***/ || control instanceof Combo || control instanceof Tree) { return true; } if (control instanceof Label || control instanceof Text) { return (control.getStyle() & SWT.WRAP) == 0; } // Unless we're certain that the control has this property, we should // return false. return false; } Reproducible: Always Steps to Reproduce: ...