Extend CommentsConfiguration to be able to store footer comments
See note below for an idea so that a separate List isn't required everywhere
Extend ConfigurationData(Impl) to hold footer comments
Add support for footer comments in YamlFileResource (hint: Node#endComments)
Add unit tests
Ensure that footer comments are added for a normal configuration file with multiple properties
Ensure that footer comments are added for a config that has only one property at root path ("")
Notes
So that it's not needed to have a separate List just for the footer comments everywhere, one idea is to add a String constant (maybe in ConfigurationData, or CommentsConfiguration?) with a dummy string that is unlikely to be a property path, and to use that as key for footers. For example, ..FOOTER is not a valid path and is guaranteed not to coïncide with a property path. Add a default method addFooterComments to CommentsConfiguration so that a user doesn't need to know about the constant.
Footer comments were added in one of the forks: https://github.com/SkinsRestorer/ConfigMe/commit/82817446380dd68fb71fc9aa90ca7b38c2183839#diff-3ffbfe7dc32739c0f967addeb0cc4cad2edb3bbe196d94d14f43439a08ce6e1f We can easily add this to ConfigMe.
To do
CommentsConfiguration
to be able to store footer commentsConfigurationData(Impl)
to hold footer commentsYamlFileResource
(hint: Node#endComments)""
)Notes
List
just for the footer comments everywhere, one idea is to add aString
constant (maybe inConfigurationData
, orCommentsConfiguration
?) with a dummy string that is unlikely to be a property path, and to use that as key for footers. For example,..FOOTER
is not a valid path and is guaranteed not to coïncide with a property path. Add a default methodaddFooterComments
toCommentsConfiguration
so that a user doesn't need to know about the constant.