This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 103247

Summary: editors font styles are not persisted
Product: editor Reporter: athompson <athompson>
Component: Painting & PrintingAssignee: issues@editor <issues>
Status: VERIFIED FIXED    
Severity: blocker Keywords: A11Y, USABILITY
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description athompson 2007-05-03 15:25:59 UTC
1. open 'Options-->Fonts and Colors'.
2. click the 'Syntax' tab, select 'All Languages', select the 'Keyword' category.
3. open the font selection dialog and change the font style from 'bold' to 'plain'.
4! click 'OK' to close the dialogs.  while the font style changes are reflected
in the IDE, they are not persisted in the configuration files.  The next time
the IDE starts, the keywords are bold again.

the XML looks like this:

dev\config\Editors\FontsColors\NetBeans\org-netbeans-modules-editor-settings-CustomFontsColors.xml:

    <fontcolor foreColor="ff000099" name="keyword"/>

it should probably look like this:

    <fontcolor foreColor="ff000099" name="keyword">
        <font style="plain"/>
    </fontcolor>

altering the XML to the above fixes the problem.

the same occurs for every language/keyword setting.
Comment 1 Vitezslav Stejskal 2007-05-06 23:06:02 UTC
No, the xml file is correct, but the loading algorithm is wrong. It should not
merge user changes with default values.
Comment 2 Vitezslav Stejskal 2007-05-15 22:59:39 UTC
*** Issue 103917 has been marked as a duplicate of this issue. ***
Comment 3 Vitezslav Stejskal 2007-05-18 02:29:37 UTC
*** Issue 103454 has been marked as a duplicate of this issue. ***
Comment 4 Vitezslav Stejskal 2007-05-18 05:21:23 UTC
Should be fixed.

Checking in src/org/netbeans/modules/editor/settings/storage/ColoringStorage.java;
/cvs/editor/settings/storage/src/org/netbeans/modules/editor/settings/storage/ColoringStorage.java,v
 <--  ColoringStorage.java
new revision: 1.28; previous revision: 1.27
done
Checking in src/org/netbeans/modules/editor/settings/storage/Utils.java;
/cvs/editor/settings/storage/src/org/netbeans/modules/editor/settings/storage/Utils.java,v
 <--  Utils.java
new revision: 1.20; previous revision: 1.19
done
Checking in
test/unit/src/org/netbeans/modules/editor/settings/storage/FontColorSettingsImplTest.java;
/cvs/editor/settings/storage/test/unit/src/org/netbeans/modules/editor/settings/storage/FontColorSettingsImplTest.java,v
 <--  FontColorSettingsImplTest.java
new revision: 1.5; previous revision: 1.4
done
Checking in
test/unit/src/org/netbeans/modules/editor/settings/storage/test-layer.xml;
/cvs/editor/settings/storage/test/unit/src/org/netbeans/modules/editor/settings/storage/test-layer.xml,v
 <--  test-layer.xml
new revision: 1.6; previous revision: 1.5
done
Comment 5 athompson 2007-05-27 00:35:09 UTC
yup
Comment 6 Vitezslav Stejskal 2007-05-28 02:14:56 UTC
*** Issue 104271 has been marked as a duplicate of this issue. ***