Bug 259952 [Preferences] Duplicated text when using tooltip in BooleanFieldEditor
Build ID: M20080911-1700 Steps To Reproduce: 1. Set a tooltip to the field: bfe.getLabelControl(parent).setToolTipText(tooltipText); 2. When the preference page is shown, the text that describes the preference being edited appears duplicated. More information: The usual way to set the tool tip to a field editor is calling "getLabelControl(parent).setToolTipText(tooltipText)", but in the BooleanFieldEditor this creates a Label that is not needed (when using the BooleanFieldEditor.DEFAULT style), which makes the textual description be shown twice, in the Checkbox control, and in the (unnecessary) Label control. One solution for this issue would be to turn the method "BooleanFieldEditor.getChangeControl()" to be public instead of protected. This way one could set the tool tip directly in the checkbox Button control.
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/BooleanFieldEditor.java
/**
     * Style constant (value <code>0</code>) indicating the default
     * layout where the field editor's check box appears to the left
     * of the label.
     */
    public static final int DEFAULT = 0;
    /**
     * Style constant (value <code>1</code>) indicating a layout 
     * where the field editor's label appears on the left
     * with a check box on the right.
     */
    public static final int SEPARATE_LABEL = 1;
    /**
     * Style bits. Either <code>DEFAULT</code> or
     * <code>SEPARATE_LABEL</code>.
     */
    private int style;
    /**
     * The previously selected, or "before", value.
     */
    private boolean wasSelected;
    /**
     * The checkbox control, or <code>null</code> if none.
     */
    private Button checkBox = null;
    /**
     * Creates a new boolean field editor 
     */
    protected BooleanFieldEditor() {
    }