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.
1. Go to Tools > Options > Fonts & Colors > Synatax > Java 2. Change foreground color of "Javadoc HTML tag" >> No effect in preview 3.Press Apply >> Javadoc HTML tags still have original color Product Version: NetBeans IDE Dev (Build 201402100001) Java: 1.8.0; Java HotSpot(TM) 64-Bit Server VM 25.0-b67 Runtime: Java(TM) SE Runtime Environment 1.8.0-b126 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Reproducible
I cannot reproduce this on Product Version: NetBeans IDE Dev (Build 201401130002) Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Linux version 3.0.0-32-generic running on amd64; UTF-8; en (nb) I can change color of <code> (html tag) in preview
Jirka Prox can reproduce it on Windows 7 and NB 8.0 .. I will test NB 8.0 ..
Still reproducible in 8.1 Beta. Product Version: NetBeans IDE 8.1 Beta (Build 201507302201) Java: 1.8.0_60-ea; Java HotSpot(TM) 64-Bit Server VM 25.60-b23 Runtime: Java(TM) SE Runtime Environment 1.8.0_60-ea-b25 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\8.1beta Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\8.1beta
Ok, I found why this is happening. It's because of Javadoc first sentence, which override all foreground font colors on first line of javadoc /* * <html>Test</html> - this is grey (or color of javadoc first sentence) * <html>Test2</html> - this is magneta (or color of html-tag in javadoc) */ Since html-tag in preview is in first line of javadoc, there is no effect on html-tag. I am ccing Ralph, maybe he as owner of Javadoc module will come with some solution.
Created attachment 155198 [details] MySolution Here is what I suggest. It takes different color attributes for javadoc first line TokenId that are not in colorset for comment TokenId. It will override colors for html tag if user change color of javadoc first line. But by default it will not override anything, so it will work for default uses. What do you think Ralph? Code(diff) is just quick prototype.
http://hg.netbeans.org/jet-main/rev/235457175e1e
Integrated into 'main-silver', will be available in build *201508150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/235457175e1e User: Milutin Kristofic <mkristofic@netbeans.org> Log: #241630 - [Options > Fonts&Colors] "Javadoc HTML tag" - don't not changes color