Version: 12.0.0-alpha-18
Build #: 28641
Build Date: 2012-Aug-08 10:00:32 AM
Color of Editor changes in line number area of sidebar when options are changed
To reproduce:
Open a new Query Window
Go to File Options --> SQL Editor--> Syntax Color
Unchek Enabled
Enable Bold
Click ok
Now take the same options and Enable them
The sql editor comes up as attached.
You need to enable / disable the options a few times to reproduce
|
|
42 KB
|
|
65 KB
This isssue is caused by the com.aquafold.aquaeditor.mime.RefresheableFontColorSettingsImpl.getFontColors() method , because the getFontColors(FontColorNames.LINE_NUMBER_COLORING).getAttribute(StyleConstants.Background) call sometimes returns NULL . In this case, FCSAdapter.decorate() (line 144) adds editor's background (white) to this Coloring instance, which is later queried by GlyphGutter.update().
Debugging ADS, I've noticed the following:
There might be a precedence issue, too, because, if I watch RefresheableFontColorSettingsImpl.getFontColors(FontColorNames.LINE_NUMBER_COLORING) during step 6, starting at some point in time it has a proper background attribute (gray), but sidebar remains white, probably because the LINE_NUMBERING property gets queried before the RefresheableFontColorSettingsImpl internal settings update process (due to Syntax Color change). That's why opening Options again and hitting OK again correctly sets sidebar's background.
Summing up, I think RefresheableFontColorSettingsImpl.getFontColors(FontColorNames.LINE_NUMBER_COLORING) should always return some background attribute, to prevent inheriting it from the editor. Also, it might worth taking a look at the precedence constraint (maybe it cause other bugs, too).
Issue #7389 |
| Closed |
| Fixed |
| Resolved |
Completion |
| No due date |
| Fixed Build 12.0.0-alpha-41 |
| No time estimate |
This isssue is caused by the com.aquafold.aquaeditor.mime.RefresheableFontColorSettingsImpl.getFontColors() method , because the getFontColors(FontColorNames.LINE_NUMBER_COLORING).getAttribute(StyleConstants.Background) call sometimes returns NULL . In this case, FCSAdapter.decorate() (line 144) adds editor's background (white) to this Coloring instance, which is later queried by GlyphGutter.update().
Debugging ADS, I've noticed the following:
There might be a precedence issue, too, because, if I watch RefresheableFontColorSettingsImpl.getFontColors(FontColorNames.LINE_NUMBER_COLORING) during step 6, starting at some point in time it has a proper background attribute (gray), but sidebar remains white, probably because the LINE_NUMBERING property gets queried before the RefresheableFontColorSettingsImpl internal settings update process (due to Syntax Color change). That's why opening Options again and hitting OK again correctly sets sidebar's background.
Summing up, I think RefresheableFontColorSettingsImpl.getFontColors(FontColorNames.LINE_NUMBER_COLORING) should always return some background attribute, to prevent inheriting it from the editor. Also, it might worth taking a look at the precedence constraint (maybe it cause other bugs, too).