Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Change eclipse workspace programmatically(How to change eclipse workspace (similar to switch workspace in IDE) programmatically?)
Change eclipse workspace programmatically [message #539639] Fri, 11 June 2010 15:03 Go to next message
Raja Kannappan is currently offline Raja KannappanFriend
Messages: 24
Registered: July 2009
Junior Member
We have an eclipse RCP application and we would like to set the default eclipse working directory to user home directory (right now the default is current directory)

I understand that I can do this using -data option. But, I see that it does not work when I put this option in .ini file. It only works when I pass it as an option in command line to .exe file.

Also, is there a way to set this option programmatically?

Thanks in advance,

- Raja.

[Updated on: Fri, 11 June 2010 15:04]

Report message to a moderator

Re: Change eclipse workspace programmatically [message #539676 is a reply to message #539639] Fri, 11 June 2010 19:59 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
"-data" should work in the eclipse.ini file, make sure to place the argument
on the next line:

-data
/path/to/workspace

It is also possible to put it in the config.ini:
osgi.instance.area=/path/to/workspace

Raja Kannappan wrote:

> We have an eclipse RCP application and we would like to set the default
> eclipse working directory to user home directory (right now the default is
> current directory)
>
> I understand that I can do this using -data option. But, I see that it
> does not work when I put this option in .ini file. It only works when I
> pass it as an option in command line to .exe file.
>
> Also, is there a way to set this option programmatically?
>
> Thanks in advance,
>
> - Raja.
Re: Change eclipse workspace programmatically [message #539679 is a reply to message #539676] Fri, 11 June 2010 20:13 Go to previous messageGo to next message
Raja Kannappan is currently offline Raja KannappanFriend
Messages: 24
Registered: July 2009
Junior Member
Yes. It works when I put it in the next line. I initially put it in the same line and it did not like it.

I would like to set it to user's home directory and not hard code the location. That's why I was wondering if there is a way to set this programmatically. Or, is there a way to point data location to user home directory from ini file?

Thanks.
Re: Change eclipse workspace programmatically [message #539710 is a reply to message #539679] Sat, 12 June 2010 01:34 Go to previous message
Raja Kannappan is currently offline Raja KannappanFriend
Messages: 24
Registered: July 2009
Junior Member
Found how to point workspace to user home directory:

-data
@user.home

The above works.
Previous Topic:Link a custom EditorInput to a resource type
Next Topic:How can I modify existing Package Explorer view
Goto Forum:
  


Current Time: Fri Apr 26 10:04:33 GMT 2024

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

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

Back to the top