Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 182458 - FontColor Syntax category selection defaults to whitespace
FontColor Syntax category selection defaults to whitespace
Status: RESOLVED DUPLICATE of bug 165431
Product: editor
Classification: Unclassified
Component: Options
All All
: P3 (vote)
: 6.x
Assigned To: Jan Jancura
Depends on:
Blocks: 179047
  Show dependency treegraph
Reported: 2010-03-22 01:29 UTC by err
Modified: 2010-05-06 12:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT

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 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo