Path macros substitution

Hi all,

How do you substitute path macros when exporting a plugin configuration ?

I mean use $PROJECT_DIR$ instead of an absolute path for example.

I've found the JDOMUtil#substitutePathMacros and the StringUtil#replacePathMacros methods but you have to pass a map with macro replacements ! This map doesn't seem to be available with OpenAPI.

Am I wrong ? Otherwise do you plan to open this feature for next versions ?

Thanks

Sylvain

5 comments

You're right, the map used by IDEA isn't available through OpenAPI, you
have to create it by your own. Hopefully this will be opened in future
versions.

Sylvain FRANCOIS wrote:

Hi all,

How do you substitute path macros when exporting a plugin configuration ?

I mean use $PROJECT_DIR$ instead of an absolute path for example.

I've found the JDOMUtil#substitutePathMacros and the StringUtil#replacePathMacros methods but you have to pass a map with macro replacements ! This map doesn't seem to be available with OpenAPI.

Am I wrong ? Otherwise do you plan to open this feature for next versions ?

Thanks

Sylvain

0

If you'd like this to be opened, please submit an SCR

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Martin Fuhrer" <mf@fuhrer.com> wrote in message news:cigfov$so2$1@is.intellij.net...

You're right, the map used by IDEA isn't available through OpenAPI, you have to create it by your own. Hopefully this will be
opened in future versions.

>

Sylvain FRANCOIS wrote:

>> Hi all,
>>
>> How do you substitute path macros when exporting a plugin configuration ?
>>
>> I mean use $PROJECT_DIR$ instead of an absolute path for example.
>>
>> I've found the JDOMUtil#substitutePathMacros and the StringUtil#replacePathMacros methods but you have to pass a
>> map with macro replacements ! This map doesn't seem to be available with OpenAPI.
>>
>> Am I wrong ? Otherwise do you plan to open this feature for next versions ?
>>
>> Thanks
>>
>> Sylvain


0

The macros are substituted automatically on configuration saving and expanded on loading. Why would you need this functionality in
open api?

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Sylvain FRANCOIS" <sylfradevSpamTonClebs@yahoo.fr> wrote in message news:5171113.1095442477715.JavaMail.itn@is.intellij.net...

Hi all,

>

How do you substitute path macros when exporting a plugin configuration ?

>

I mean use $PROJECT_DIR$ instead of an absolute path for example.

>

I've found the JDOMUtil#substitutePathMacros and the StringUtil#replacePathMacros methods but you have to pass a map
with macro replacements ! This map doesn't seem to be available with OpenAPI.

>

Am I wrong ? Otherwise do you plan to open this feature for next versions ?

>

Thanks

>

Sylvain



0

If I understand correctly Sylvain, it is when you want to export the settings outside of IDEA project files that you cannot do the replacement of the Path Macros. You will end up with absolute path.
Is there a standard IDEA utility class to load/save a Configuration from/to a specified file that would convert Path Macros and project/module path from/to their associated variables?

Thanks

Jacques

0

It is possible to substitute macros via JDOMUtil, but there's no way to obtain a list of configured macro substitutions via OpenApi.
We recently changed the behaviour so that External Resources and Global Libraries URLs are substituted with corresponding macros.
So the settings on disk will be with macros substituted.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Jacques Morel" <bibou644-jetbrains@yahoo.com> wrote in message news:5125788.1098435678904.JavaMail.itn@is.intellij.net...

If I understand correctly Sylvain, it is when you want to export the settings outside of IDEA project files that you cannot do the
replacement of the Path Macros. You will end up with absolute path.
Is there a standard IDEA utility class to load/save a Configuration from/to a specified file that would convert Path Macros and
project/module path from/to their associated variables?

>

Thanks

>

Jacques



0

Please sign in to leave a comment.