This is an attempt to fix the broken theme issue that's causing syntax highlighting to effectively disappear. I'm not super happy with the fix because I don't understand exactly why it's suddenly failing.
My guess is it's two-fold:
Our custom OrderedProperties implementation is likely broken on Java 9+ causing it to malfunction when we remove values from it (it ends up removing almost all the values mysteriously and randomly)
We're then auto-saving a "user copy" of the loaded theme with all the "rules" removed from them (due to the bug above)
So this fix tries to do a few things:
If we load a user copy of a builtin theme and it has no rules, assume it's broken and fall back to using the original copy of the builtin theme
use our custom OrderedProperties implementation solely when we load from disk and then immediately converted into a Map<String, String> that retains the same ordering of keys/values.
Note that the reason we even have OrderedProperties is to try and retain the same ordering of rules as what's on disk/in the theme when we save/load.
Also note that I'm seeing overall Eclipse E4/CSS Theme issues with our Dark Studio theme for the IDE overall. This isn't the same bug but is related and likely also needs to be fixed. (Eclipse now ships their own dark theme and we may need to just use that from here on out, but that'd require a fair number of changes - and the version of Eclipse we're building on right now doesn't list the Dark theme on macOS 10.15!)
Fixes TISTUD-9212
This is an attempt to fix the broken theme issue that's causing syntax highlighting to effectively disappear. I'm not super happy with the fix because I don't understand exactly why it's suddenly failing.
My guess is it's two-fold:
So this fix tries to do a few things:
Note that the reason we even have OrderedProperties is to try and retain the same ordering of rules as what's on disk/in the theme when we save/load.
Also note that I'm seeing overall Eclipse E4/CSS Theme issues with our Dark Studio theme for the IDE overall. This isn't the same bug but is related and likely also needs to be fixed. (Eclipse now ships their own dark theme and we may need to just use that from here on out, but that'd require a fair number of changes - and the version of Eclipse we're building on right now doesn't list the Dark theme on macOS 10.15!)