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
/**
     * Creates a boolean field editor in the given style.
     * 
     * @param name the name of the preference this field editor works on
     * @param labelText the label text of the field editor
     * @param style the style, either <code>DEFAULT</code> or
     *   <code>SEPARATE_LABEL</code>
     * @param parent the parent of the field editor's control
     * @see #DEFAULT
     * @see #SEPARATE_LABEL
     */
    public BooleanFieldEditor(String name, String labelText, int style,
            Composite parent) {
        init(name, labelText);
        this.style = style;
        createControl(parent);
    }
    /**
     * Creates a boolean field editor in the default style.
     * 
     * @param name the name of the preference this field editor works on
     * @param label the label text of the field editor
     * @param parent the parent of the field editor's control
     */
    public BooleanFieldEditor(String name, String label, Composite parent) {
        this(name, label, DEFAULT, parent);
    }
    /* (non-Javadoc)
     * Method declared on FieldEditor.
     */