Generating updated feature description [message #1850728] |
Tue, 15 March 2022 14:40 |
Alain Picard Messages: 266 Registered: July 2009 |
Senior Member |
|
|
Hi,
We've noticed that our effort to complete and improve our feature description is failing, since it appears that the generator will not update any value in the edit plugin.properties.
I searched and realized that PropertyMerger only ever appends new keys and never updates anything.
I guess it makes sense generally since for many of those keys we wouldn't want to loose any manual edits. But in a case like description for example, it is not very convenient to get staff to edit manually instead of using the nice GenModel editor.
I'm willing to submit a PR but wanted to confirm my understanding first and align approach.
My idea is to provide the ability to define an update predicate that could be used in a custom generator and to have an implementation of the predicate that checks a Generator.Options to provide a property merger update expression that would allow specifying a regular expression to match property keys that should be updated instead of skipped.
Maybe at the same time it would be nice to provide similar functionality to define a delete predicate/option. We often end up with stale entries and since we rarely if eve add anything manually, we could clean up easily.
Cheers,
Alain
[Updated on: Tue, 15 March 2022 14:42] Report message to a moderator
|
|
|
|
|
|
Re: Generating updated feature description [message #1850765 is a reply to message #1850763] |
Wed, 16 March 2022 12:50 |
Alain Picard Messages: 266 Registered: July 2009 |
Senior Member |
|
|
Thanks Ed, I will set myself up. Are you suggesting that I stick to 2020-12?
As for the marker line, the problem IMHO is that you can't know what you want to delete. In order to know it, you need to rename the file, regenerated, sort all entries and then do a diff, and at that point, well the job is done.
As for updates, you again have to manually find everything that you want updated and move them manually first. And if you go on adding new descriptions for example, then you have to remember to go and manually move them for the next time around.
My approach does need a new property in the GenModel (inspired from EditPluginVariables), not setting it is an implicit opt-out, doesn't affect anyone unless it is set.
Cheers,
Alain
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05554 seconds