Project: SWT
Bug 314914 Confusing GridData javadoc
Reported: 2010-05-28 12:55:51 | Status: resolved fixed

GridData class docs sez: " * </pre> * The second is to take advantage of convenience style bits defined * by <code>GridData</code>: * <pre> * button1.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL)); * </pre> * </p> * <p>" But when you look at docs for those styles, we have: * Not recommended. Use * <code>new GridData(SWT.FILL, int, boolean, boolean)</code> * instead. */ public static final int HORIZONTAL_ALIGN_FILL = 1 << 8; * Not recommended. Use * <code>new GridData(int, int, true, boolean)</code> * instead. */ public static final int GRAB_HORIZONTAL = 1 << 9; Why are we using as an example something that isn't recommended?

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/layout/GridData.java