Bug 565624 - [CommonNavigator][DND] Custom Common Drop Adapter Assistant is not prioritized
Summary: [CommonNavigator][DND] Custom Common Drop Adapter Assistant is not prioritized
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.17   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 03:06 EDT by Cindy Putri CLA
Modified: 2020-08-09 17:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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