Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator DND
Common Navigator DND [message #333894] Tue, 13 January 2009 02:04 Go to next message
Eclipse UserFriend
Hi,

I am trying to add Drag and Drop support to my CN implementation.
Is there any tutorial / guide to get started on this particular issue?
I read on eclipse help that CommonDropAdapterAssistant and
CommonDragAdapterAssistant are the classes to start with but am a little
lost.
Any help would be appreciated.

Thank you,

~Adil.
Re: Common Navigator DND [message #333977 is a reply to message #333894] Wed, 14 January 2009 19:25 Go to previous messageGo to next message
Eclipse UserFriend
Just wanted to provide an update.

1.

I added dragAssistant to my viewer Extension and supplied the class.
This class is a subclass of CommonDragAdapterAssistant

So when i start to drag, the getSupportedTransferTypes() method is called.

The problem now is setDragData() method is never called where i could
set the get hold of the data to be dragged.

Any help would be good. Thanks.

~Adil.


Adil Fulara wrote:
> Hi,
>
> I am trying to add Drag and Drop support to my CN implementation.
> Is there any tutorial / guide to get started on this particular issue?
> I read on eclipse help that CommonDropAdapterAssistant and
> CommonDragAdapterAssistant are the classes to start with but am a little
> lost.
> Any help would be appreciated.
>
> Thank you,
>
> ~Adil.
Re: Common Navigator DND [message #334019 is a reply to message #333977] Thu, 15 January 2009 19:06 Go to previous messageGo to next message
Eclipse UserFriend
What are you trying to accomplish by adding the drag assistant?

In general, if you are using the LocalSelectionTransferType (which can
cover anything selected by the navigator), then you don't need to do
anything on the drag side.

You only need to add the special drag support if you want a different
transfer type.

Francis

(ps - please reply to the newsgroup, but you may copy me on the reply so
I get it quickly).

Adil Fulara wrote:
> Just wanted to provide an update.
>
> 1.
>
> I added dragAssistant to my viewer Extension and supplied the class.
> This class is a subclass of CommonDragAdapterAssistant
>
> So when i start to drag, the getSupportedTransferTypes() method is called.
>
> The problem now is setDragData() method is never called where i could
> set the get hold of the data to be dragged.
>
> Any help would be good. Thanks.
>
> ~Adil.
>
>
> Adil Fulara wrote:
>> Hi,
>>
>> I am trying to add Drag and Drop support to my CN implementation.
>> Is there any tutorial / guide to get started on this particular issue?
>> I read on eclipse help that CommonDropAdapterAssistant and
>> CommonDragAdapterAssistant are the classes to start with but am a
>> little lost.
>> Any help would be appreciated.
>>
>> Thank you,
>>
>> ~Adil.


--
Common Navigator Framework section in Platform Plugin Developer Guide
(Programmer's Guide)

http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.isv/guide/cnf.htm

http://dev.eclipse.org/blogs/francis
http://wiki.eclipse.org/Common_Navigator_Framework
http://wiki.eclipse.org/Common_Navigator_Framework_Use_Cases


You have brains in your head.
You have feet in your shoes.
- Dr Seuss, Oh the Places You'll Go
[Common Navigator]Re: Common Navigator DND [message #334023 is a reply to message #334019] Thu, 15 January 2009 19:25 Go to previous messageGo to next message
Eclipse UserFriend
I am actually trying to drag an object from one common navigator and
drop it onto another common navigator.

I thought at the drag side, we need to get hold of the drag object and
have a reference to it on the drop side. Hence i added the dragAssistant
and dropAssitant.

So as per your reply, if i understand correctly, i just need to add a
dropAssistant at the receiving side and handle the drop?

~Adil.



Francis Upton (News) wrote:
> What are you trying to accomplish by adding the drag assistant?
>
> In general, if you are using the LocalSelectionTransferType (which can
> cover anything selected by the navigator), then you don't need to do
> anything on the drag side.
>
> You only need to add the special drag support if you want a different
> transfer type.
>
> Francis
>
> (ps - please reply to the newsgroup, but you may copy me on the reply so
> I get it quickly).
>
> Adil Fulara wrote:
>> Just wanted to provide an update.
>>
>> 1.
>>
>> I added dragAssistant to my viewer Extension and supplied the class.
>> This class is a subclass of CommonDragAdapterAssistant
>>
>> So when i start to drag, the getSupportedTransferTypes() method is
>> called.
>>
>> The problem now is setDragData() method is never called where i could
>> set the get hold of the data to be dragged.
>>
>> Any help would be good. Thanks.
>>
>> ~Adil.
>>
>>
>> Adil Fulara wrote:
>>> Hi,
>>>
>>> I am trying to add Drag and Drop support to my CN implementation.
>>> Is there any tutorial / guide to get started on this particular issue?
>>> I read on eclipse help that CommonDropAdapterAssistant and
>>> CommonDragAdapterAssistant are the classes to start with but am a
>>> little lost.
>>> Any help would be appreciated.
>>>
>>> Thank you,
>>>
>>> ~Adil.
>
>
Re: [Common Navigator]Re: Common Navigator DND [message #334027 is a reply to message #334023] Thu, 15 January 2009 22:05 Go to previous messageGo to next message
Eclipse UserFriend
Yes, that's all you should need. And if you are using resources, then
you don't even need that.

Adil Fulara wrote:
> I am actually trying to drag an object from one common navigator and
> drop it onto another common navigator.
>
> I thought at the drag side, we need to get hold of the drag object and
> have a reference to it on the drop side. Hence i added the dragAssistant
> and dropAssitant.
>
> So as per your reply, if i understand correctly, i just need to add a
> dropAssistant at the receiving side and handle the drop?
>
> ~Adil.
>
>
>
> Francis Upton (News) wrote:
>> What are you trying to accomplish by adding the drag assistant?
>>
>> In general, if you are using the LocalSelectionTransferType (which can
>> cover anything selected by the navigator), then you don't need to do
>> anything on the drag side.
>>
>> You only need to add the special drag support if you want a different
>> transfer type.
>>
>> Francis
>>
>> (ps - please reply to the newsgroup, but you may copy me on the reply
>> so I get it quickly).
>>
>> Adil Fulara wrote:
>>> Just wanted to provide an update.
>>>
>>> 1.
>>>
>>> I added dragAssistant to my viewer Extension and supplied the class.
>>> This class is a subclass of CommonDragAdapterAssistant
>>>
>>> So when i start to drag, the getSupportedTransferTypes() method is
>>> called.
>>>
>>> The problem now is setDragData() method is never called where i could
>>> set the get hold of the data to be dragged.
>>>
>>> Any help would be good. Thanks.
>>>
>>> ~Adil.
>>>
>>>
>>> Adil Fulara wrote:
>>>> Hi,
>>>>
>>>> I am trying to add Drag and Drop support to my CN implementation.
>>>> Is there any tutorial / guide to get started on this particular issue?
>>>> I read on eclipse help that CommonDropAdapterAssistant and
>>>> CommonDragAdapterAssistant are the classes to start with but am a
>>>> little lost.
>>>> Any help would be appreciated.
>>>>
>>>> Thank you,
>>>>
>>>> ~Adil.
>>
>>


--
Common Navigator Framework section in Platform Plugin Developer Guide
(Programmer's Guide)

http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.isv/guide/cnf.htm

http://dev.eclipse.org/blogs/francis
http://wiki.eclipse.org/Common_Navigator_Framework
http://wiki.eclipse.org/Common_Navigator_Framework_Use_Cases


You have brains in your head.
You have feet in your shoes.
- Dr Seuss, Oh the Places You'll Go
Re: [Common Navigator]Re: Common Navigator DND [message #334029 is a reply to message #334027] Thu, 15 January 2009 22:57 Go to previous message
Eclipse UserFriend
Great. This is awesome.

It works fine. Thanks very much Francis.

Guess the SWT DND tutorial took me on the wrong path and confused me.

I now can handle DnD in my views.

~Adil.


Francis Upton (News) wrote:
> Yes, that's all you should need. And if you are using resources, then
> you don't even need that.
>
> Adil Fulara wrote:
>> I am actually trying to drag an object from one common navigator and
>> drop it onto another common navigator.
>>
>> I thought at the drag side, we need to get hold of the drag object and
>> have a reference to it on the drop side. Hence i added the
>> dragAssistant and dropAssitant.
>>
>> So as per your reply, if i understand correctly, i just need to add a
>> dropAssistant at the receiving side and handle the drop?
>>
>> ~Adil.
>>
>>
>>
>> Francis Upton (News) wrote:
>>> What are you trying to accomplish by adding the drag assistant?
>>>
>>> In general, if you are using the LocalSelectionTransferType (which
>>> can cover anything selected by the navigator), then you don't need to
>>> do anything on the drag side.
>>>
>>> You only need to add the special drag support if you want a different
>>> transfer type.
>>>
>>> Francis
>>>
>>> (ps - please reply to the newsgroup, but you may copy me on the reply
>>> so I get it quickly).
>>>
>>> Adil Fulara wrote:
>>>> Just wanted to provide an update.
>>>>
>>>> 1.
>>>>
>>>> I added dragAssistant to my viewer Extension and supplied the class.
>>>> This class is a subclass of CommonDragAdapterAssistant
>>>>
>>>> So when i start to drag, the getSupportedTransferTypes() method is
>>>> called.
>>>>
>>>> The problem now is setDragData() method is never called where i
>>>> could set the get hold of the data to be dragged.
>>>>
>>>> Any help would be good. Thanks.
>>>>
>>>> ~Adil.
>>>>
>>>>
>>>> Adil Fulara wrote:
>>>>> Hi,
>>>>>
>>>>> I am trying to add Drag and Drop support to my CN implementation.
>>>>> Is there any tutorial / guide to get started on this particular issue?
>>>>> I read on eclipse help that CommonDropAdapterAssistant and
>>>>> CommonDragAdapterAssistant are the classes to start with but am a
>>>>> little lost.
>>>>> Any help would be appreciated.
>>>>>
>>>>> Thank you,
>>>>>
>>>>> ~Adil.
>>>
>>>
>
>
Previous Topic:superseding existing label/content providers in the common navigator framework
Next Topic:Error Attaching Source beginRule does not match outer scope rule ...
Goto Forum:
  


Current Time: Fri May 02 16:16:19 EDT 2025

Powered by FUDForum. Page generated in 0.03027 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top