Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Workspace location - saving at first use
Workspace location - saving at first use [message #323962] Mon, 14 January 2008 19:23 Go to next message
Andreas Winkler is currently offline Andreas WinklerFriend
Messages: 14
Registered: July 2009
Junior Member
Hi!

I am trying to use the workspace in a similar manner as the IDE uses
the workspace, for that I went through the source code.
But I encountered the problem that I could not find where the
workspace location is saved in the IDE, especially when I start the
application the first time.

So now I have two questions: first where will the location be saved,
second how could I save the location so that my application( eclipse
RCP ) knows where the location is located at the beginning with
Platform.getInstanceLocation(). I don't want to use the -data command
line add - and there has to be a way, because it seems as the IDE
doesn't use it either.

Thanks in advance
Andreas

P.s.: Maybe someone could give me the location where to look in the
source code of the IDE too. Thanks.
Re: Workspace location - saving at first use [message #323966 is a reply to message #323962] Mon, 14 January 2008 19:57 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
The default value is "workspace" in the current directory.
You can change this in the config.ini file using the osgi.instance.area
option.

Snjeza

Andreas Winkler wrote:
> Hi!
>
> I am trying to use the workspace in a similar manner as the IDE uses
> the workspace, for that I went through the source code.
> But I encountered the problem that I could not find where the
> workspace location is saved in the IDE, especially when I start the
> application the first time.
>
> So now I have two questions: first where will the location be saved,
> second how could I save the location so that my application( eclipse
> RCP ) knows where the location is located at the beginning with
> Platform.getInstanceLocation(). I don't want to use the -data command
> line add - and there has to be a way, because it seems as the IDE
> doesn't use it either.
>
> Thanks in advance
> Andreas
>
> P.s.: Maybe someone could give me the location where to look in the
> source code of the IDE too. Thanks.
Re: Workspace location - saving at first use [message #323971 is a reply to message #323966] Tue, 15 January 2008 00:56 Go to previous messageGo to next message
Andreas Winkler is currently offline Andreas WinklerFriend
Messages: 14
Registered: July 2009
Junior Member
Thanks, I already have seen the value, but when you start eclipse and
choose a workspace this value must be saved somewhere else then in
config.ini. Maybe user.home is the value which points to my chosen
workspace? Do you know where this value is stored?

But since I want to save the value programmatically I would need to
know which class is responsible for storing the location in the right
place. And since in the IDE it is done, there must be a way ;-). But I
didn't find it in the source code.

I guess there must be a more or less simple way to achieve this.

On Mon, 14 Jan 2008 20:57:08 +0100, Snjezana Peco
<snjeza.peco@gmail.com> wrote:

>The default value is "workspace" in the current directory.
>You can change this in the config.ini file using the osgi.instance.area
>option.
>
>Snjeza
>
>Andreas Winkler wrote:
>> Hi!
>>
>> I am trying to use the workspace in a similar manner as the IDE uses
>> the workspace, for that I went through the source code.
>> But I encountered the problem that I could not find where the
>> workspace location is saved in the IDE, especially when I start the
>> application the first time.
>>
>> So now I have two questions: first where will the location be saved,
>> second how could I save the location so that my application( eclipse
>> RCP ) knows where the location is located at the beginning with
>> Platform.getInstanceLocation(). I don't want to use the -data command
>> line add - and there has to be a way, because it seems as the IDE
>> doesn't use it either.
>>
>> Thanks in advance
>> Andreas
>>
>> P.s.: Maybe someone could give me the location where to look in the
>> source code of the IDE too. Thanks.
Re: Workspace location - saving at first use [message #323977 is a reply to message #323971] Tue, 15 January 2008 11:36 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
The IDE saves data about the selected workspaces in

<ECLIPSE_HOME>/configuration/.settings/org.eclipse.ui.ide.prefs
See the ChooseWorkspaceData.writePersistedData() method.

Snjeza

Andreas Winkler wrote:
> Thanks, I already have seen the value, but when you start eclipse and
> choose a workspace this value must be saved somewhere else then in
> config.ini. Maybe user.home is the value which points to my chosen
> workspace? Do you know where this value is stored?
>
> But since I want to save the value programmatically I would need to
> know which class is responsible for storing the location in the right
> place. And since in the IDE it is done, there must be a way ;-). But I
> didn't find it in the source code.
>
> I guess there must be a more or less simple way to achieve this.
>
> On Mon, 14 Jan 2008 20:57:08 +0100, Snjezana Peco
> <snjeza.peco@gmail.com> wrote:
>
>> The default value is "workspace" in the current directory.
>> You can change this in the config.ini file using the osgi.instance.area
>> option.
>>
>> Snjeza
>>
>> Andreas Winkler wrote:
>>> Hi!
>>>
>>> I am trying to use the workspace in a similar manner as the IDE uses
>>> the workspace, for that I went through the source code.
>>> But I encountered the problem that I could not find where the
>>> workspace location is saved in the IDE, especially when I start the
>>> application the first time.
>>>
>>> So now I have two questions: first where will the location be saved,
>>> second how could I save the location so that my application( eclipse
>>> RCP ) knows where the location is located at the beginning with
>>> Platform.getInstanceLocation(). I don't want to use the -data command
>>> line add - and there has to be a way, because it seems as the IDE
>>> doesn't use it either.
>>>
>>> Thanks in advance
>>> Andreas
>>>
>>> P.s.: Maybe someone could give me the location where to look in the
>>> source code of the IDE too. Thanks.
Re: Workspace location - saving at first use [message #323978 is a reply to message #323977] Tue, 15 January 2008 11:59 Go to previous message
Andreas Winkler is currently offline Andreas WinklerFriend
Messages: 14
Registered: July 2009
Junior Member
I know I already saw the class and the prefs file BUT the workspace
is not saved there. Only the recently chosen Workspaces which should
be displayed in the dropdown menu of the changeWorkspace Dialog are
saved there.
AND readPersistedData is called after Platform.getInstanceLocation()
where the workspace is already read. So the workspace as such must be
saved in a different class.

Regards
Andreas

On Tue, 15 Jan 2008 12:36:59 +0100, Snjezana Peco
<snjeza.peco@gmail.com> wrote:

>The IDE saves data about the selected workspaces in
>
><ECLIPSE_HOME>/configuration/.settings/org.eclipse.ui.ide.prefs
>See the ChooseWorkspaceData.writePersistedData() method.
>
>Snjeza
>
>Andreas Winkler wrote:
>> Thanks, I already have seen the value, but when you start eclipse and
>> choose a workspace this value must be saved somewhere else then in
>> config.ini. Maybe user.home is the value which points to my chosen
>> workspace? Do you know where this value is stored?
>>
>> But since I want to save the value programmatically I would need to
>> know which class is responsible for storing the location in the right
>> place. And since in the IDE it is done, there must be a way ;-). But I
>> didn't find it in the source code.
>>
>> I guess there must be a more or less simple way to achieve this.
>>
>> On Mon, 14 Jan 2008 20:57:08 +0100, Snjezana Peco
>> <snjeza.peco@gmail.com> wrote:
>>
>>> The default value is "workspace" in the current directory.
>>> You can change this in the config.ini file using the osgi.instance.area
>>> option.
>>>
>>> Snjeza
>>>
>>> Andreas Winkler wrote:
>>>> Hi!
>>>>
>>>> I am trying to use the workspace in a similar manner as the IDE uses
>>>> the workspace, for that I went through the source code.
>>>> But I encountered the problem that I could not find where the
>>>> workspace location is saved in the IDE, especially when I start the
>>>> application the first time.
>>>>
>>>> So now I have two questions: first where will the location be saved,
>>>> second how could I save the location so that my application( eclipse
>>>> RCP ) knows where the location is located at the beginning with
>>>> Platform.getInstanceLocation(). I don't want to use the -data command
>>>> line add - and there has to be a way, because it seems as the IDE
>>>> doesn't use it either.
>>>>
>>>> Thanks in advance
>>>> Andreas
>>>>
>>>> P.s.: Maybe someone could give me the location where to look in the
>>>> source code of the IDE too. Thanks.
Previous Topic:Question about width of SWT component
Next Topic:Scrollable TableViewer in Form
Goto Forum:
  


Current Time: Sat Dec 21 14:54:24 GMT 2024

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

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

Back to the top