Thanks for the input.
I added the null pointer checks I saw fit. I'm not sure if it's possible not to have an 'OptionColour' for a defined 'HighlightLanguage' setting so I left them blank. New patch is attached.
According to my tests if the user changes colours in 'settings-> editor -> syntax highlighting', all the newly created diagrams uses the new color settings. So I don't see a reason to add code to reconstruct already constructed diagrams with the new settings, other than increasing cost of maintenance for almost nothing.
'settings -> environment -> colours' for sure is the ultimate solution but I can't invest time on that right now.
Curiosity killed the cat! You were actually right about the 10-20 minutes. ;) Anyway the patch attached uses 'settings -> environment -> colours' to define diagram colors.
Fix in SVN HEAD. I had to modify it a bit. Please test and report if there are any problems, because I'm not using this plugin, so I cannot verify that the changes doesn't cause serious problems.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The code is missing lots of null pointer checks when getting the data for the colours.
Also there is no code to detect when the user changes the colours in the settings -> editor.
And lastly you can handle this using the colour manager and by defining the colours there.
See Settings -> Environment -> Colours.
Thanks for the input.
I added the null pointer checks I saw fit. I'm not sure if it's possible not to have an 'OptionColour' for a defined 'HighlightLanguage' setting so I left them blank. New patch is attached.
According to my tests if the user changes colours in 'settings-> editor -> syntax highlighting', all the newly created diagrams uses the new color settings. So I don't see a reason to add code to reconstruct already constructed diagrams with the new settings, other than increasing cost of maintenance for almost nothing.
'settings -> environment -> colours' for sure is the ultimate solution but I can't invest time on that right now.
Hm, I though there is an easy way to detect when the settings have been changed, but there isn't...
The colours manager solution will take probably 10-20 minutes to implement, btw.
10-20 mins? I respect that your skills can accomplish that so easily. ;)
Curiosity killed the cat! You were actually right about the 10-20 minutes. ;) Anyway the patch attached uses 'settings -> environment -> colours' to define diagram colors.
Fix in SVN HEAD. I had to modify it a bit. Please test and report if there are any problems, because I'm not using this plugin, so I cannot verify that the changes doesn't cause serious problems.