Bug 313697 [Forms] Wrong code in org.eclipse.ui.forms.widgets.SizeCache
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: ...
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/SizeCache.java
if (heightHint != SWT.DEFAULT && heightHint + heightAdjustment < minHeight) {
            if (widthHint == SWT.DEFAULT) {
                return new Point(computeWidthAtMinimumHeight(), minHeight);
            }
            
            heightHint = minHeight - heightAdjustment;
        }
        
        
        if (widthHint != SWT.DEFAULT && heightHint != SWT.DEFAULT) {                        
            return new Point(widthHint + widthAdjustment, heightHint + heightAdjustment);
        }
        
        if (widthHint == SWT.DEFAULT && heightHint == SWT.DEFAULT) {
            return Geometry.copy(getPreferredSize());
        }
        
        
        if (independentDimensions) {
            Point result = Geometry.copy(getPreferredSize());
            if (widthHint != SWT.DEFAULT) {
                result.x = widthHint + widthAdjustment;
            }
            if (heightHint != SWT.DEFAULT) {
                result.y = heightHint + heightAdjustment;
            }
            return result;
        }
        
        if (heightHint == SWT.DEFAULT) {