Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » How to get IWorkspace object from the path?
How to get IWorkspace object from the path? [message #1001379] Wed, 16 January 2013 15:42 Go to next message
Latha Shankara is currently offline Latha ShankaraFriend
Messages: 33
Registered: June 2012
Member
Hi,

I am new to plug-in development. I am developing a command line application, which takes workspace path as one of its arguments.

For further processing, I need to get IWorkspace object from the workspace path provided as an argument. How can I get the same?

ResourcesPlugin.getWorkspace() method gives the IWorkspace object of the Eclipse workspace I use. Aad also read that these methods cannot be used if the Eclipse workspace is closed as such.

Which other way can I get the IWorkspace object?

I apologise if my question seems stupid.

Thanks in advance,
Latha
Re: How to get IWorkspace object from the path? [message #1001413 is a reply to message #1001379] Wed, 16 January 2013 16:47 Go to previous message
Greg Pugh is currently offline Greg PughFriend
Messages: 15
Registered: July 2009
Junior Member
On 16/01/2013 15:42, Latha Shankara wrote:
> Hi,
>
> I am new to plug-in development. I am developing a command line application, which takes workspace path as one of its arguments.
>
> For further processing, I need to get IWorkspace object from the workspace path provided as an argument. How can I get the same?
>
> ResourcesPlugin.getWorkspace() method gives the IWorkspace object of the Eclipse workspace I use. Aad also read that these methods cannot be used if
> the Eclipse workspace is closed as such.
>
> Which other way can I get the IWorkspace object?
>
> I apologise if my question seems stupid.
>
> Thanks in advance,
> Latha

You can use ResourcesPlugin.getWorkspace() provided you launch the command line app using org.eclipse.equinox.launcher_xxx.jar with your application
defined using the org.eclipse.core.runtime.applications extension point. Your class needs to implement org.eclipse.equinox.app.IApplication.

The workspace is specified by the "-data path" command parameter which is handled by the launcher jar.
Previous Topic:Tutorials on plugin development
Next Topic:How to get Resource from Handler?
Goto Forum:
  


Current Time: Tue Mar 19 04:35:07 GMT 2024

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

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

Back to the top