Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Common Navigator DND
Common Navigator DND [message #333894] Tue, 13 January 2009 07:04 Go to next message
Adil Fulara is currently offline Adil FularaFriend
Messages: 14
Registered: July 2009
Junior Member
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] Thu, 15 January 2009 00:25 Go to previous messageGo to next message
Adil Fulara is currently offline Adil FularaFriend
Messages: 14
Registered: July 2009
Junior Member
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] Fri, 16 January 2009 00:06 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
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] Fri, 16 January 2009 00:25 Go to previous messageGo to next message
Adil Fulara is currently offline Adil FularaFriend
Messages: 14
Registered: July 2009
Junior Member
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] Fri, 16 January 2009 03:05 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
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] Fri, 16 January 2009 03:57 Go to previous message
Adil Fulara is currently offline Adil FularaFriend
Messages: 14
Registered: July 2009
Junior Member
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: Sat Nov 09 03:34:24 GMT 2024

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

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

Back to the top