#15410 closed defect (fixed)
Color preferences overhaul
Reported by: | bastiK | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 17.10 |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Color name registration (Preferences.registerColor
) and ColorPreference
could do with some updates.
- It relies heavily on fragile string matching and several things are no longer working as intended.
- Color names are only registered at runtime for the current session, but the table shows all colors from the preference defaults. Now that JOSM remembers default preferences from the previous sessions, this leads to a mix of color names and raw preference keys in the GUI table.
- The table model relies on a
Map
from translated names to preference keys (error prone).
Attachments (0)
Change History (26)
comment:1 by , 7 years ago
comment:16 by , 7 years ago
Replying to Don-vip:
acknowledge? What do you mean?
Make the informed decision to ignore it. It's good to point out unnecessary public modifiers in interfaces, but in this case I would prefer to keep it.
comment:17 by , 7 years ago
It's possible by adding checkstyle comments // CHECKSTYLE.OFF: xxx
and // CHECKSTYLE.ON: xxx
(xxx being the check name) before and after the declaration. Or simply make the class public. Why do you want to keep a public constructor on a private class?
comment:18 by , 7 years ago
It shows the intentions whether this method/constructor should be used from outside the inner class or not, even though this isn't enforced by the compiler. If you were to refactor the class and make it public, then you can simply keep the access modifier as is.
In 12929/josm: