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 268335

Summary: Wrong keyword color in new Fonts&Colors profile
Product: editor Reporter: soldatov <soldatov>
Component: OptionsAssignee: Milutin Kristofic <mkristofic>
Status: VERIFIED FIXED    
Severity: normal CC: issues
Priority: P2    
Version: 8.2   
Hardware: PC   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:
Attachments: proposed patch

Description soldatov 2016-10-04 10:06:11 UTC
Scenario:
- Push Tools|Options
- Select "Fonts&Colors" category and Syntax tab
- Press Duplicate... button
- Type NetBeans111 in Profile Name field
- Select C language
- Select Keyword category
==> Current Foreground: [blue square] Inherited
- Press OK button
- Restart IDE
- Open Options window again
- Check C keyword settings again
==> Current Foreground: [green square] Inherited

Now In editor all C or C++ keywords has green colors.
Comment 1 Alexander Simon 2016-10-04 15:39:58 UTC
It seems method ColoringStorage.load() does wrong things if token name has '-'.
Comment 2 Alexander Simon 2016-10-04 15:43:48 UTC
For example after restart C++ keywords of duplicated color scheme has attributes:
"keyword => {S6{name=keyword,display name=Keyword,default=preprocessor-keyword-directive}}"
which point to green color.
Whereas xml has:
<fontcolor default="keyword" name="keyword"/>
Comment 3 Alexander Simon 2016-10-04 15:44:55 UTC
Created attachment 162330 [details]
proposed patch
Comment 4 Milutin Kristofic 2016-10-05 12:41:18 UTC
Thank you, you are right, it is some archaic code.

http://hg.netbeans.org/jet-main/rev/be49eae46594
Comment 5 Quality Engineering 2016-10-06 02:47:00 UTC
Integrated into 'main-silver', will be available in build *201610060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/be49eae46594
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #268335 - Wrong keyword color in new Fonts&Colors profile
Comment 6 Vladimir Voskresensky 2016-10-07 14:17:46 UTC
Thanks!
Comment 7 soldatov 2016-12-12 14:54:32 UTC
Verified in internal NetBeans 8,2 patch 1 build.