Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Defining DropTargetListener to ProjectExplorer tree
Defining DropTargetListener to ProjectExplorer tree [message #333224] Mon, 01 December 2008 14:46 Go to next message
Keshavrao  is currently offline Keshavrao Friend
Messages: 34
Registered: July 2009
Member
Hello everyone,

I have been searching a way to add DropTargetListener(drop support) to the
project explorer tree but i could not find one.

Please help me find this.

Thanks and regards,
Keshav Veerapaneni.
Re: Defining DropTargetListener to ProjectExplorer tree [message #333247 is a reply to message #333224] Tue, 02 December 2008 00:02 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
You can add a dropAssistent to a navigatorContent for the project
explorer. You can use the common navigator
org.eclipse.ui.navigator.viewer extension point to hook your
navigatorContent up to the project explorer view.

Look in this file for an example:

/org.eclipse.ui.navigator.resources/plugin.xml

Francis

Keshavrao wrote:
> Hello everyone,
>
> I have been searching a way to add DropTargetListener(drop support) to
> the project explorer tree but i could not find one.
>
> Please help me find this.
>
> Thanks and regards,
> Keshav Veerapaneni.
>


--
*new* Common Navigator Framework section in:
3.4RC4 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: Defining DropTargetListener to ProjectExplorer tree [message #333286 is a reply to message #333247] Wed, 03 December 2008 12:36 Go to previous messageGo to next message
Keshavrao  is currently offline Keshavrao Friend
Messages: 34
Registered: July 2009
Member
Francis Upton (News) wrote:

> You can add a dropAssistent to a navigatorContent for the project
> explorer. You can use the common navigator
> org.eclipse.ui.navigator.viewer extension point to hook your
> navigatorContent up to the project explorer view.

> Look in this file for an example:

> /org.eclipse.ui.navigator.resources/plugin.xml

> Francis

> Keshavrao wrote:
>> Hello everyone,
>>
>> I have been searching a way to add DropTargetListener(drop support) to
>> the project explorer tree but i could not find one.
>>
>> Please help me find this.
>>
>> Thanks and regards,
>> Keshav Veerapaneni.
>>


Hello Francis,

Thanks for the reply.
This solves the problem now for me but i also have to register new
Transfer to the viewer which is specific to our Implementation.

There was no element in the extension point by which i can define new
transfer type. Please let me know how can i do this.


Thanks and regards,
Keshav Veerapaneni.
Re: Defining DropTargetListener to ProjectExplorer tree [message #333320 is a reply to message #333286] Thu, 04 December 2008 04:07 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
Transfer to the viewer which is specific to our Implementation.
>
> There was no element in the extension point by which i can define new
> transfer type. Please let me know how can i do this.

You don't need to register the transfer type with the CNF. You will
subclass COmmonDropAdaptorAssistant which has the mechanism for checking
the transfer type.

If you want to use a new transfer type in your drag, that's an SWT issue.

>
>
> Thanks and regards,
> Keshav Veerapaneni.
>


--
*new* Common Navigator Framework section in:
3.4RC4 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: Defining DropTargetListener to ProjectExplorer tree [message #333323 is a reply to message #333320] Thu, 04 December 2008 07:23 Go to previous messageGo to next message
Keshavrao  is currently offline Keshavrao Friend
Messages: 34
Registered: July 2009
Member
Hello Francis,

We have a new TransferType which is already included in the dragsource.
Also we have contributed our own tree in the project expoler, now our
usecase is to drop a object from one our trees to the nodes we have
contributed in the project explorer tree.

Right now there are only three transfer types defined for the
projectexplorer tree
LocalSelectionTransfer.getTransfer(),
FileTransfer.getInstance(),
PluginTransfer.getInstance()
Also the CommonDropAdapter#dragEnter method only checks for these three
transfertypes.

Our transertype is not one of these and so the project explorer doesnt
allow me to drop an object on the nodes we have contributed.

So i wanted to ask if there is a way i can register my TransferType with
the explorer tree?

Thanks and regards,
Keshav Veerapaneni.
Re: Defining DropTargetListener to ProjectExplorer tree [message #333348 is a reply to message #333323] Thu, 04 December 2008 17:24 Go to previous message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
I'm sorry, when I answered before I did not look into it as much as I
should have.

The answer is (as you suspected) that you can't register your own drop
transfer type.

Please file an enhancement request about this.

Francis

Keshavrao wrote:
> Hello Francis,
>
> We have a new TransferType which is already included in the dragsource.
> Also we have contributed our own tree in the project expoler, now our
> usecase is to drop a object from one our trees to the nodes we have
> contributed in the project explorer tree.
>
> Right now there are only three transfer types defined for the
> projectexplorer tree
> LocalSelectionTransfer.getTransfer(),
> FileTransfer.getInstance(),
> PluginTransfer.getInstance()
> Also the CommonDropAdapter#dragEnter method only checks for these three
> transfertypes.
>
> Our transertype is not one of these and so the project explorer doesnt
> allow me to drop an object on the nodes we have contributed.
>
> So i wanted to ask if there is a way i can register my TransferType with
> the explorer tree?
>
> Thanks and regards,
> Keshav Veerapaneni.
>


--
*new* Common Navigator Framework section in:
3.4RC4 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


Previous Topic:Eclipse x64
Next Topic:Does the Common Navigator Framework (CNF) support Capabilities?
Goto Forum:
  


Current Time: Thu Jan 02 20:53:12 GMT 2025

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

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

Back to the top