Bug 565624

Summary: [CommonNavigator][DND] Custom Common Drop Adapter Assistant is not prioritized
Product: [Eclipse Project] Platform Reporter: Cindy Putri <cindy.pr.putri>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: rolf.theunissen
Version: 4.17   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Cindy Putri CLA 2020-07-29 03:06:23 EDT
I created a DropAdapterAssistant extending CommonDropAdapterAssistant in Content Navigator. I set this content navigator to high priority with hope that any transfer data which is dropped to an instance of IResource with specific name and extension will be validated and handled by my custom assistant.
This assistant works nicely on non-IResource drop targets.

Reading through the NavigatorDnDService, I found out that there's a comment "// TODO Make sure descriptors are sorted by priority" in findCommonDropAdapterAssistants() and that in getAssistantsByTransferData(), at the end the assistants will be sorted, and resource drop assistant will always be the first on the list.

It may just be something I missed, or it may be something we thought we were getting for free which we are not.
Comment 1 Rolf Theunissen CLA 2020-07-30 16:56:13 EDT
The TODO is left over from Bug 126658 the current sorting is introduced in Bug 292354

Seems that the functionality you expected has never been implemented yet. Would you be able to provide a patch to fix this issue?
Comment 2 Cindy Putri CLA 2020-08-09 17:05:07 EDT
Hi Rolf,

Thanks for the answer and the confirmation.
It would be my first open-source contribution.
But yes, I would like to give it a try.

Cindy