|
|
Re: Workspace location - saving at first use [message #323971 is a reply to message #323966] |
Tue, 15 January 2008 00:56 |
Andreas Winkler 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 |
Snjezana Peco 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 |
Andreas Winkler 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.
|
|
|
Powered by
FUDForum. Page generated in 0.03752 seconds