On Fri, 10 Jul 2026 12:51:10 GMT, Kevin Rushforth <[email protected]> wrote:
>> RichEditorDemoWindow:118 >> >> this is a convenience method for DnD. I think this class is the right place >> to expose this functionality, but I am open to suggestions. > > I see what this is doing now. This is not the right place to put this > convenience method. It is in a class that otherwise isn't accessed by > applications. Further, it is a static method that does not operate on a > DataFormatHandler at all; it operates on a RichTextArea not on the model, so > I don't see why it would even be anywhere in the model package. > > The method also is not named well. The fact that an application can use it to > handle a drop operation doesn't describe what it does. > > How about moving this static helper method to be an instance method in > RichTextArea and renaming it something like `insertImages` or > `insertImageFiles` or ... ? I see that the implementation of this method constructs an instance of the private `FileListStyledInput` class, so if the helper method moves out of this class, it would need to change slightly, calling `FileListFormatHandler.getInstance().createStyledInput(files, null)`. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/2196#discussion_r3559367924
