Prioritize Drop Adapter Assistant for Common Navigator [message #1830557] |
Wed, 29 July 2020 03:37  |
Eclipse User |
|
|
|
I created a DropAdapterAssistant extending CommonDropAdapterAssistant in a Content Navigator extension. I set this content navigator to high priority.
I included instance of "org.eclipse.core.resources.IResource" in <possibleDropTargets>. I'm hoping that any transfer data which is dropped to an instance of IResource with specific name and extension will be first validated and handled by my custom assistant.
This assistant works nicely on non-IResource drop targets.
Unfortunately, no matter how high I set the priority for my Content Navigator, it will keep getting into org.eclipse.ui.navigator.resources.ResourceDropAdapterAssistant.
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.
In sortAssistants(CommonDropAdapterAssistant[] array) method, there's a comment stating that Resource Drop Assistant will always be the first on the list.
So, I am not sure, maybe this feature is not yet implemented.
Any suggestion what did I miss or what can I do next?
Cindy
|
|
|
|
Powered by
FUDForum. Page generated in 0.27677 seconds