Bug 72727 [JFace] ColorFieldEditor doesn't call setPresentsDefaultValue(), unexpected results after Restore Defaults is pressed
Version: 3.0.1 Build id: 200408050912 In Preference page using ColorFieldEditor where default color is blue, 1) Change color to red 2) Press "Restore Defaults," color changes back to blue, boolean value isDefaultPresented is set to true in FieldEditor.loadDefault() 3) Change color to red. UI displays red, but preference is still set to default blue, since in FieldEditor.store() if (isDefaultPresented) { preferenceStore.setToDefault(preferenceName); } else { doStore(); } Other field editors have a selectionListener that setPresenetsDefaultValue (true). Can you do the same thing in ColorFieldEditor's PropertyChangeListener? eclipse.buildId=I200406192000
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/ColorFieldEditor.java
* @param labelText the label text of the field editor
     * @param parent the parent of the field editor's control
     */
    public ColorFieldEditor(String name, String labelText, Composite parent) {
        super(name, labelText, parent);
    }
    /* (non-Javadoc)
     * Method declared on FieldEditor.
     */
    protected void adjustForNumColumns(int numColumns) {
        ((GridData) colorSelector.getButton().getLayoutData()).horizontalSpan = numColumns - 1;
    }
    /**
     * Computes the size of the color image displayed on the button.
     * <p>
     * This is an internal method and should not be called by clients.
     * </p>
     * @param window the window to create a GC on for calculation.
     * @return Point The image size
     * 
     */
    protected Point computeImageSize(Control window) {
        
        
        	
        GC gc = new GC(window);
        Font f = JFaceResources.getFontRegistry().get(
                JFaceResources.DEFAULT_FONT);
        gc.setFont(f);
        int height = gc.getFontMetrics().getHeight();