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 182458 - FontColor Syntax category selection defaults to whitespace
Summary: FontColor Syntax category selection defaults to whitespace
Status: RESOLVED DUPLICATE of bug 165431
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jan Jancura
URL:
Keywords:
Depends on:
Blocks: 179047
  Show dependency tree
 
Reported: 2010-03-22 01:29 UTC by err
Modified: 2010-05-06 12:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
simple fix (2.34 KB, patch)
2010-03-22 01:29 UTC, err
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description err 2010-03-22 01:29:20 UTC
Created attachment 95506 [details]
simple fix

This may only happen if the profile is not the default. Not sure. This can be seen when Font&Color is first selected or when language is changed.

This came to my attention by a jVi user who had some jvi navigation fail after changing the font. After discussion he realized that he had changed whitespace size and not the default font, and he thought that was a NB bug. When he changed the default everything was fine. Turns out there have been spuratic reports of this navigation problem for a long time without knowing why, some users fixed it by removing userdir.

SyntaxColoringPanel.setCurrentProfile() does lCategories.setSelectedIndex to 0, but then does refreshUI() which does updatePreview() which does preview.setParameters and this ends up firing a property change event which causes whitespace to be selected in category.

The attached patch is to ColorModel which is where the preview lives. The patch prevents firing change events while setParameters is running. Notice that the changes are made through an invokeLater.
Comment 1 Jan Jancura 2010-05-06 12:18:28 UTC

*** This bug has been marked as a duplicate of bug 165431 ***