How to store project component settings in seperate file ?
My project componet settings are saved in *.iws file.
I'm trying now to save them in speparet file:
@State(
name = "WFUserDefinedOptionsManager",
storages = {
@Storage(id = "dir",
file = "$PROJECT_CONFIG_DIR$/user_run_options.xml",
scheme = StorageScheme.DIRECTORY_BASED)
}
)
But i got exception in runtime saying that macro PROJECT_CONFIG_DIR is undefined.
Can any one give me example how should i do it correctly ?
Thanks
Boaz
Attachment not added (content type not allowed): "att1.html"
请先登录再写评论。
Hello Boaz,
This directory-based settings storage scheme is not available for public
use in Selena. It's a fully different mode of storing project settings -
you don't have the .ipr/.iws files at all, instead the settings of different
components are stored in separate files under the .idea directory. This will
(hopefully) become available and fully supported in Diana.
You can't have one component storing settings in a separate file and all
others in .ipr/.iws.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Tnaks Dmitry for your response.
While waiting, I play with it and chnage it to :
@State(
name = "WFUserDefinedOptionsManager",
storages = {
@Storage(id = "dir",
file = "$PROJECT_FILE$/../wf_run_local_options.xml",
scheme = StorageScheme.DIRECTORY_BASED)
}
)
and it works great for me. It store the component configuration in separate file in same folder as project file.
Do you think it will break in next version of Selena (7.04) ?
Thanks
Boaz
"Dmitry Jemerov" <yole@jetbrains.com> wrote in message news:63d8c2cca29118ca9dbab20eff82@news.jetbrains.com...
>> My project componet settings are saved in *.iws file.
>>
>> I'm trying now to save them in speparet file:
>>
>> @State(
>> name = "WFUserDefinedOptionsManager",
>> storages = {
>> @Storage(id = "dir",
>> file = "$PROJECT_CONFIG_DIR$/user_run_options.xml",
>> scheme = StorageScheme.DIRECTORY_BASED)
>> }
>> )
>> But i got exception in runtime saying that macro PROJECT_CONFIG_DIR is
>> undefined.
>>
>> Can any one give me example how should i do it correctly ?
>>
>> Thanks
>> Boaz
>
Attachment not added (content type not allowed): "att1.html"
Hello Boaz,
I don't think it will necessarily break, but it's a completely unsupported
way of working which could cause weird side-effects in some situations. If
you really need to store your settings in a separate file, a supported way
to do this is to implement SettingsSavingComponent and implement the save()
logic completely by yourself.
>> Hello Boaz,
>>
>> This directory-based settings storage scheme is not available for
>> public use in Selena. It's a fully different mode of storing project
>> settings - you don't have the .ipr/.iws files at all, instead the
>> settings of different components are stored in separate files under
>> the .idea directory. This will (hopefully) become available and fully
>> supported in Diana.
>>
>> You can't have one component storing settings in a separate file and
>> all others in .ipr/.iws.
>>
>>> My project componet settings are saved in *.iws file.
>>>
>>> I'm trying now to save them in speparet file:
>>>
>>> @State(
>>> name = "WFUserDefinedOptionsManager",
>>> storages = {
>>> @Storage(id = "dir",
>>> file = "$PROJECT_CONFIG_DIR$/user_run_options.xml",
>>> scheme = StorageScheme.DIRECTORY_BASED)
>>> }
>>> )
>>> But i got exception in runtime saying that macro PROJECT_CONFIG_DIR
>>> is
>>> undefined.
>>> Can any one give me example how should i do it correctly ?
>>>
>>> Thanks
>>> Boaz
>> --
>> Dmitry Jemerov
>> Development Lead
>> JetBrains, Inc.
>> http://www.jetbrains.com/
>> "Develop with Pleasure!"
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks, that what I was looking for.
Is there a way I could figured it my self (I guess I'm asking for some kind
of documentation) ?
Thanks & B.R
Boaz
"Dmitry Jemerov" <yole@jetbrains.com> wrote in message
news:63d8c2cca2fd88ca9e9087f5fb20@news.jetbrains.com...
>
>
>> Tnaks Dmitry for your response.
>>
>> While waiting, I play with it and chnage it to :
>>
>> @State(
>> name = "WFUserDefinedOptionsManager",
>> storages = {
>> @Storage(id = "dir",
>> file =
>> "$PROJECT_FILE$/../wf_run_local_options.xml",
>> scheme = StorageScheme.DIRECTORY_BASED)
>> }
>> )
>> and it works great for me. It store the component configuration in
>> separate file in same folder as project file.
>> Do you think it will break in next version of Selena (7.04) ?
>>
>> Thanks
>> Boaz
>> "Dmitry Jemerov" <yole@jetbrains.com> wrote in message
>> news:63d8c2cca29118ca9dbab20eff82@news.jetbrains.com...
>>
>>> Hello Boaz,
>>>
>>> This directory-based settings storage scheme is not available for
>>> public use in Selena. It's a fully different mode of storing project
>>> settings - you don't have the .ipr/.iws files at all, instead the
>>> settings of different components are stored in separate files under
>>> the .idea directory. This will (hopefully) become available and fully
>>> supported in Diana.
>>>
>>> You can't have one component storing settings in a separate file and
>>> all others in .ipr/.iws.
>>>
>>>> My project componet settings are saved in *.iws file.
>>>>
>>>> I'm trying now to save them in speparet file:
>>>>
>>>> @State(
>>>> name = "WFUserDefinedOptionsManager",
>>>> storages = {
>>>> @Storage(id = "dir",
>>>> file = "$PROJECT_CONFIG_DIR$/user_run_options.xml",
>>>> scheme = StorageScheme.DIRECTORY_BASED)
>>>> }
>>>> )
>>>> But i got exception in runtime saying that macro PROJECT_CONFIG_DIR
>>>> is
>>>> undefined.
>>>> Can any one give me example how should i do it correctly ?
>>>>
>>>> Thanks
>>>> Boaz
>>> --
>>> Dmitry Jemerov
>>> Development Lead
>>> JetBrains, Inc.
>>> http://www.jetbrains.com/
>>> "Develop with Pleasure!"
>