Project Explorer navigator content dropAssistant validate drop not being called [message #758870] |
Thu, 24 November 2011 16:02  |
Eclipse User |
|
|
|
Is it even possible? If so what am I missing?
Requirements:
Drag file(s) from outside Eclipse into Project Explorer. If dragged file(s) are over one of my IProject with ProjectNature OR is over a IFolder inside one of my IProject with ProjectNature then validateDrop in my drop assistant. If valid then let Eclipse's ImportTypeDialog handle the drop.
The Project Explorer can have a mix of projects. Java, PyDev, My Project with Nature, etc.
Currently when I drag a file into Project Explorer from outside Eclipse the only time my drop assistant's validateDrop is called is when the target is WorkspaceRoot. As soon as the dragged item is over anything other than WorkspaceRoot it stops using my drop assistant.
When I drag a file from one of my IProject with ProjectNature (ProjectA) it only calls validateDrop when inside the originating IProject (ProjectA). If you drag the file from ProjectA to a different IProject with my Project Nature (ProjectB) my validateDrop in my drop assistant is not called.
Here is my content extension:
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
contentProvider="com.custom.navigator.providers.ContentProvider"
id="com.custom.navigator.navigatorContent"
labelProvider="com.custom.navigator.providers.LabelProvider"
name="Navigator Content"
priority="highest">
<triggerPoints>
<or>
<and>
<instanceof
value="org.eclipse.core.resources.IProject">
</instanceof>
<test
property="org.eclipse.core.resources.projectNature"
value="com.ui.ide.projectNature">
</test>
</and>
<instanceof
value="org.eclipse.core.resources.IResource">
</instanceof>
</or>
</triggerPoints>
<dropAssistant
class="com.custom.navigator.dnd.CommonDropAdapterAssistant"
id="com.custom.navigator.dropAssistant">
<possibleDropTargets>
<or>
<instanceof
value="org.eclipse.core.resources.IProject">
</instanceof>
<instanceof
value="org.eclipse.core.resources.IResource">
</instanceof>
<instanceof
value="org.eclipse.core.resources.IContainer">
</instanceof>
</or>
</possibleDropTargets>
</dropAssistant>
<possibleChildren>
<or>
<instanceof
value="org.eclipse.core.resources.IResource">
</instanceof>
</or>
</possibleChildren>
</navigatorContent>
</extension>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 1.04047 seconds