<AWT Dev> Patch feedback?

Damjan Jovanovic damjan.jov at gmail.com
Wed Feb 3 10:52:00 PST 2010


On Wed, Feb 3, 2010 at 5:52 PM, Denis S. Fokin <Denis.Fokin at sun.com> wrote:
> Hi Damjan,

Hi Denis

> as for the Windows-specific part, as I know, the similar functionality has
> been implemented in the next changeset
>
> http://hg.openjdk.java.net/jdk7/awt/jdk/rev/fd5bf5955e37

IMO it's quite dangerous to implicitly convert FILEDESCRIPTOR +
FILECONTENTS to temporary files and present them to the caller. If
someone drags a 100MB file from an FTP server or a directory with
hundreds of files into Java, you will block the EDT for a long time
while the files copy. Also AWT allows you to request file contents
many times before the drop, and you could end up writing many copies
out, taking time and wasting disk space.

The different API used in my patch can be asynchronous relative to the
EDT, and only allows 1 transfer attempt, thus avoiding all those
problems where possible. It also happens to be usable on *nix's X
Direct Save and (I suspect) MacOS's promise data flavors, where the
drop target doesn't get the file contents at all, it just tells the
drag source where to write out the file(s) and the drag source writes
them whenever, however, and whatever it likes - something that cannot
possibly work with javaFileListFlavor.

> The implementation has not been promoted yet.

That patch for dragging with an image looks impressive, nice work!

You might also want to look at a short patch I made to support
changing the drag cursor:
https://bugs.openjdk.java.net/show_bug.cgi?id=100121

> Thank you,
>   Denis.

Thank you
Damjan

> Denis S. Fokin wrote:
>>
>> Hi Damjan,
>>
>> Could you provide more details...
>>
>> > 8. Needs jtreg tests.
>>
>> It would be great to look at a sample application, that you used to write
>> your prototype :-)
>> Could you attach it?
>>
>> > It's been tested with Nautilus and File Roller on Linux,
>> > Windows Explorer and Windows Mail on Windows. All work.
>>
>> Could you give us more details about scenarios that you have used for the
>> testing?
>>
>> Thank you,
>>     Denis.
>>
>> Damjan Jovanovic wrote:
>>>
>>> Hi
>>>
>>> Can I please get some feedback and maybe a sponsor for
>>> https://bugs.openjdk.java.net/show_bug.cgi?id=100124
>>>
>>> I've been waiting for the past 6 weeks. I need to at least know
>>> whether it's worth continuing work on this patch.
>>>
>>> Thank you
>>> Damjan
>>
>
>



More information about the awt-dev mailing list