Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to get folder of current project
How to get folder of current project [message #176175] Wed, 01 September 2004 02:42 Go to next message
Eclipse UserFriend
Originally posted by: baiyanbin.163.com

Hi,

I am writing a plug-in that needs to know the folder of current project
in run method. How to get it by some simple calls?

Thanks,

Jack
Re: How to get folder of current project [message #176229 is a reply to message #176175] Wed, 01 September 2004 10:24 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

There technically isn't a definition of current project. There is a
current selection for a workbench page. Since you can have more than one
workbench page you can also have more than one selection.

If you have a View or an Editor or Workbench page that you are
interested in (for example your run method was kicked off from a view or
an editor, so it should have access to it), then you can get the current
selection for the page that the view/editor is in. But what is selected
may not be able to give you a project. If it is an IResource or is
adaptable to an IResource, then selection can give you a project.

However, there could be more than one selected IResource and they can
come from different projects, so which project is then the current project?

Maybe a little more info like who kicked off your runnable and what your
definition is of the current project (i.e. the selection in what
viewer). That could point to how to answer question.


--
Thanks, Rich Kulp

Previous Topic:J2EE javadoc integration
Next Topic:equals swap
Goto Forum:
  


Current Time: Mon May 12 08:30:56 EDT 2025

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

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

Back to the top