Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Getting path to project clicked on
Getting path to project clicked on [message #548399] Wed, 21 July 2010 17:12 Go to next message
Philip Dexter is currently offline Philip DexterFriend
Messages: 6
Registered: July 2010
Junior Member
Hey all,
I have a plugin where a context menu pops up when the user right clicks on a project. In the plugin I want to be able to get the path to the project. How would I go about doing this?
Thank you.

Edit:
I know that you can get the path from the IProject class, but I don't know how to get that class.
I also know you can get a list of projects through the runtime library or something, which I've done, but I don't know how to get the specific one that was clicked on.

[Updated on: Wed, 21 July 2010 20:05]

Report message to a moderator

Re: Getting path to project clicked on [message #548661 is a reply to message #548399] Thu, 22 July 2010 15:07 Go to previous messageGo to next message
Philip Dexter is currently offline Philip DexterFriend
Messages: 6
Registered: July 2010
Junior Member
How can nobody know this. Am I going at this the wrong way then?
Re: Getting path to project clicked on [message #548839 is a reply to message #548661] Fri, 23 July 2010 09:05 Go to previous messageGo to next message
HagenFriend
Messages: 90
Registered: April 2010
Member
On 7/22/2010 5:07 PM, Philip Dexter wrote:
> How can nobody know this. Am I going at this the wrong way then?

(1) http://catb.org/esr/faqs/smart-questions.html

(2) How about looking at an existing plug-in that does what you want,
and learning from it?
Re: Getting path to project clicked on [message #548981 is a reply to message #548399] Fri, 23 July 2010 15:21 Go to previous messageGo to next message
Philip Dexter is currently offline Philip DexterFriend
Messages: 6
Registered: July 2010
Junior Member
Ok here's the answer for anybody else.
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/api/org/eclipse/jface/viewers/ISe lection.html
You get that interface from the selectionchanged function. From there you can loop through that and get the project. In my case the only entry is the project.
Re: Getting path to project clicked on [message #606301 is a reply to message #548399] Thu, 22 July 2010 15:07 Go to previous messageGo to next message
Philip Dexter is currently offline Philip DexterFriend
Messages: 6
Registered: July 2010
Junior Member
How can nobody know this. Am I going at this the wrong way then?
Re: Getting path to project clicked on [message #606303 is a reply to message #606301] Fri, 23 July 2010 09:05 Go to previous messageGo to next message
HagenFriend
Messages: 90
Registered: April 2010
Member
On 7/22/2010 5:07 PM, Philip Dexter wrote:
> How can nobody know this. Am I going at this the wrong way then?

(1) http://catb.org/esr/faqs/smart-questions.html

(2) How about looking at an existing plug-in that does what you want,
and learning from it?
Re: Getting path to project clicked on [message #606307 is a reply to message #548399] Fri, 23 July 2010 15:21 Go to previous message
Philip Dexter is currently offline Philip DexterFriend
Messages: 6
Registered: July 2010
Junior Member
Ok here's the answer for anybody else.
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. platform.doc.isv/reference/api/org/eclipse/jface/viewers/ISe lection.html
You get that interface from the selectionchanged function. From there you can loop through that and get the project. In my case the only entry is the project.
Previous Topic:Button in Toolbar
Next Topic:PDE Build with p2.gathering and root files fails.
Goto Forum:
  


Current Time: Thu Apr 18 14:05:21 GMT 2024

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

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

Back to the top