|
|
|
[Common Navigator]Re: Common Navigator DND [message #334023 is a reply to message #334019] |
Fri, 16 January 2009 00:25 |
Adil Fulara 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 |
Francis Upton IV 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
Platform UI Committer for Common Navigator
http://wiki.eclipse.org/index.php/Common_Navigator_Framework
http://help.eclipse.org/galileo/topic/org.eclipse.platform.d oc.isv/guide/cnf.htm
|
|
|
Re: [Common Navigator]Re: Common Navigator DND [message #334029 is a reply to message #334027] |
Fri, 16 January 2009 03:57 |
Adil Fulara 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.
>>>
>>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04488 seconds