PreferencesFX
PreferencesFX copied to clipboard
Let Setting support additional description
As of 2.0.2
the Setting
class holds a simple description and a value. It would be great if an additional description could be added to a particular Setting
, see attached screenshot from IntelliJ

100% agree on this. We discussed this already before making PreferencesFX public and due to the limited time we had, we decided to not implement it in favor of other, more important features. Feel free to implement it and submit a PR!
Very well, I'd suggest an API similar to what's provided at https://github.com/dlemmermann/formsfx/pull/21, that is, description
should accept String
or Node
as arguments. If it's a String, then it'll be wrapped with a Label
.
It's unfortunate that Setting
uses description
for what looks more like a name
. Wouldn't make much sense to s/description/name/ as it breaks behavior.
I guess I'll choose explanation
for this "additional description".
It makes sense for https://github.com/dlemmermann/formsfx/pull/21 to be reviewed and hopefully merged, then wait for the next release of FormsFX as Setting
uses the Field
API as is.
I think since description
is an internal name anyways and refactoring that would not result in any signature changes, resulting in only non-breaking API changes I would even propose to refactor description
to title
or name
and then you could use description
, as it would make more sense. What do you think?
Thats somethink I ask me for myself. Why are the parameters in Setting, Group and Category spelled description
when in the JavaDoc they promounced as name
, title
...
One possibility is that the text in the label describes the functionality from the component on the right side, but why isn't that terminology used in the JavaDoc?
@Naoghuman like I mentioned, the name description
may not be ideal. As proposed in my previous comment, I would happily merge a PR that implements such a change if it benefits the readability.