Extract caret and selection to separate classes#526
Extract caret and selection to separate classes#526JordanMartinez merged 6 commits intoFXMisc:masterfrom JordanMartinez:extractCaret3
Conversation
|
@davejarvis What's your feedback on this API? I'm also wondering where the default methods for the caret/selection API that was extracted into I don't have fancier methods like |
|
Regarding Caret.java:
In BoundedSelection.java:
The The Lines 150 to 160 of BoundedSelectionImpl.java contain duplication that can be eliminated with a variable assignment. |
|
Thanks for the feedback! Caret
I agree that documentation should be added to explain the purpose of the code at both the class/interface and method levels. At the same time, I'm not sure about the extent that you're describing when it comes to documenting pre-conditions, post-conditions, and the meaning of parameter values. Tomas believes in self-documenting code; I agree with it in principle, but still would like some documentation to explain what's going on. I think that's accomplished when the purpose is documented along with clear parameter names.
Aye, I'd like to put that in the interface level since this would be the best place to document that. Originally,
I'm iffy on this. I added that in case one needed to use it as a trigger for something else. However, I can't think of any use cases off the top of my head, and I suppose they could just use either the caret's Selection
The right way would be
That's intentional. It allows one to store a list of
True, but that's why |
Not sure I understand you. Could you rewrite the method in your way to explain? |
|
|
in cef005b, I made a typo: |
|
@davejarvis If you have additional feedback, please share. Otherwise, I'll merge this sometime tomorrow. |
|
One issue I just realized: |
I think for now, I'll leave that out. Only those who use custom objects in an area might use it, and of those that create such an area, most will probably not use it. |
On second thought, one could write |
- Necessary when using custom objects and "selectedText" is not enough.
Address #429.