Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to override double click even of a folder in the Resources view of Eclipse
How to override double click even of a folder in the Resources view of Eclipse [message #329833] Mon, 07 July 2008 16:54 Go to next message
Divya Nair is currently offline Divya NairFriend
Messages: 1
Registered: July 2009
Junior Member
I want to open an XML file when a folder is double clicked in the
Resources Views (Project Explorer / Package Explorer / Navigator) of
Eclipse. I do not want to create a new view, i just want to override the
folder double click event.
Re: How to override double click even of a folder in the Resources view of Eclipse [message #329881 is a reply to message #329833] Wed, 09 July 2008 10:51 Go to previous message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
You can get the actual viewer associated with the navigator and use the
OpenStrategy class to handle the double click event on the viewer.

For the project explorer (common navigator), you can get the viewer like
this:

CommonNavigator nav = (CommonNavigator)getWorkbenchPage()
.findView(ProjectExplorer.VIEW_ID);
CommonViewer viewer = nav.getCommonViewer();

I will leave it as an exercised for the reader for how to get the
ResourceNavigator (Package Explorer) and it's viewer.


Divya wrote:
> I want to open an XML file when a folder is double clicked in the
> Resources Views (Project Explorer / Package Explorer / Navigator) of
> Eclipse. I do not want to create a new view, i just want to override the
> folder double click event.
>


--
*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:Selecting a package from the project
Next Topic:Where does Ganymede's SW update feature put updated files?
Goto Forum:
  


Current Time: Sat Jul 13 20:22:46 GMT 2024

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

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

Back to the top