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.
During the investigation of #103808 I found that some of the customized syntax highlighting colors do not persist (i.e. are lost) when the IDE is restarted. Following syntax highlighting categories seem to be affected. All of them are in the Java language category, but other languages may be affected too: * Javadoc tag * Unused element * ... probably others that I have left to their default values in other languages The behavior is the same whether the built-in "Netbeans" color profile is changed or a new one is created. The bug is reproducible in the following way: 1. Open the Options dialog via Tools -> Options 2. Go to the Fonts & Colors section 3. In the Syntax tab, choose the Java language from the drop-down menu 4. Change the colors of one or more of the aforementioned color categories (I changed the foreground, maybe others are affected too) 5. Close the Options dialog with OK 6. Open a new java editor to see the new values take effect (bug #93969) 7. Close the IDE and start it again 8. See the mentioned colors take their default values again, rather than the colors set in step 4.
I am sorry, but it seems to be working fine in my trunk build. I tried changing javadoc tag (forecolor = orange) and unused field (forecolor = red, effect = strikethrough, effect-color = red) in Netbeans profile and the changes were persisted and correctly loaded after the restart. Are you sure about the steps? Were there any exceptions? Can you check that after making a change and OKeying the Tools-Options dialog there is a file in your userdir with the changes? It should be <ud>/config/Editors/text/x-java/FontsColors/NetBeans/org-netbeans-modules-editor-settings-CustomFontsColors.xml Thanks
OK, setting explicit colors seems to work. Setting the values for those categories to "inherited" (what I actually wanted) definitely does not persist for me. The XML file you mentioned is indeed being written after each change to the color profile, but looks like it is not interpreted correctly. Setting the said colors to "inherited" produces: <fontcolor default="comment" name="javadoc-tag"> <font style="bold"/> </fontcolor> <fontcolor name="mod-unused" waveUnderlined="orange"/> Despite that, javadoc tags are bright blue (the default) instead of dark green (my customized normal comment color). Unused elements are still being wave-underlined in orange, but have a grey foreground (default) instead of their normal inherited color. Inheriting, however, does work correctly after the Options dialog is closed until the IDE is restarted. After a fresh start, the default colors are reset. No exceptions or the like are produced for me. Hope this helps you on.
Aha, it's the same problem as in issue #103247. Changes are persisted correctly, but user defined colorings are incorrectly merged with the default ones when loading. *** This issue has been marked as a duplicate of 103247 ***