@Lycan-Thrope said in Config Files Need Updating, Too:
I thought using the Validate Files would correct whatever was found
…
My viewing the new aspects made me believe the validation and correction was automatic by clicking those functions … Guidance?
Sorry, I was hoping the section on Validation in the README would be enough. I guess I need to add a help button and see if I can explain things better.
The validation has occurred, and it has found errors.
Unfortunately, I cannot program enough intelligence into the plugin to be able to figure out the right/best way to fix the problems, so it does not correct errors for you. That’s why the double-click will take you to the right spot in the problematic XML file. Further, the stylers.model.xml button can be used to open the model file side-by-side with the problematic XML – and the plugin will do its best to align the model file so that it’s showing the same section of its XML as has the problem in the other (though, looking at the order that line#652 is listed, I think my alignment algorithm might need some work: that line proved assumptions wrong).
You are then supposed to compare the two, and use the semi-understandable XML error messages to help you figure out… Maybe I’ll have to figure out a way to convert the errors that the validation library spits out into something more human-readable.
'5' is a duplocate key... indicates that there are two <WordsStyle> entries that have the same StyleID. StyleID must be unique for Notepad++ to be able to correctly map that row in the XML (or that entry in the Style Configurator’s
Styles: list) to the underlying Lexilla style. When there are two with the same StyleID, Notepad++ only picks one to show in the Style Configurator and send to Lexilla. So you need to compare your XML with the model XML, and figure out what the right solution is:
Do you just need to pick one of the two duplicates and delete it (and if so, your human intelligence is needed to decide which is the right entry to keep and which to delete)
Or does one of them have the wrong styleID, and you just need to change it to a different value
'' violates enumeration constraint... indicates that you have a keywordClass attribute on your <WordsStyle> that has an invalid value (in your case, the empty string). keywordClass needs to be one of the known types as listed in the error message, or the attribute needs to not exist at all.
You need to compare the failing XML to the model, and need to figure out what value of keywordClass should be there – or whether to delete the attribute altogether (if it’s not there for that styleID in the model)
along with the Download new models. I fear I may just not know what these new capabilities are supposed to perform, so I don’t want to assume what they are supposed to do.
The Download Newest Model Files grabs the most recent stylers.model.xml and langs.model.xml from the Notepad++ repo, and overwrites your possibly-out-of-date models. This will make sure that the model used when validating is the “current best practice” found in the repo. (I really thought that the README was clear on that one. Is it not?)
since I can’t screenshot the whole text since the box isn’t wide enough and it can’t be copied for inclusion in here under code format.
Created issue #23: I’ll see if I can get Ctrl+C and/or dialog resize to work. (I’ve never done either from C++; I really don’t have a lot of GUI-programming experience, so I’ve always started with “functional enough GUI for me to do what I want” for my plugins, without aiming for super-fancy features.)