Bug 50627 [Preferences] Bug when disabling RadioGroupFieldEditor
If I disable a RadioGroupFieldEditor in the initialize of a FieldEditorPreferencePage, the label of the group gets added to the preference page at the bottom. The problem is that the method FieldEditor#getLabelControl (Composite) creates a label control. In general, this is correct but a radio button group uses a different label so when the disable occurs, an additional label is created. We have released changes to the Team>CVS>Watch/Edit preference page that illustrates this problem.
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/RadioGroupFieldEditor.java
((GridData)radioBox.getLayoutData()).horizontalSpan = numColumns;
}
/**
 * Checks whether given <code>String[][]</code> is of "type" 
 * <code>String[][2]</code>.
 *
 * @return <code>true</code> if it is ok, and <code>false</code> otherwise
 */
private boolean checkArray(String[][] table) {
	if (table == null)
		return false;
	for (int i = 0; i < table.length; i++) {
		String[] array = table[i];
		if (array == null || array.length != 2)
			return false;
	}
	return true;
}
/* (non-Javadoc)
 * Method declared on FieldEditor.
 */
protected void doFillIntoGrid(Composite parent, int numColumns) {
	if (useGroup) {
		Control control = getRadioBoxControl(parent);
		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
		control.setLayoutData(gd);
	}
	else {
		Control control = getLabelControl(parent);
		GridData gd = new GridData();