What are Path Macros and how do I use them?
Under "Options" there's now a "Path Macros..." panel, which looks like it lets you bind names to file paths. I can think of a number of cool places this would be handy, but I don't seem to be able to do anything with them. Any insights on how this feature is intended to be used would be greatly appreciated.
Thanks.
Please sign in to leave a comment.
Dave Griffith wrote:
Well, at the moment it is quite limited. It works so that if you setup some
path in your project under one of these macros, that path will be saved
relative to that macro. Different developers can then set different values
for such macro.
Friendly,
Dmitry
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Ah, so it's a try to make Project/Module files realistically shareable, even when your build scripts expect stuff to be somewhere other than in the project directory. Sweet. I don't currently have a use for it, but it's a neat idea.
If, in each project,
- the source and test paths were automatically created as path macros,
and
- path macros were turnable into ant properties
, it could help solve :
http://www.intellij.net/tracker/idea/viewSCR?publicId=18625
Alain
Strong thumb-up for having path macros auto-exported as Ant properties. There's just bunches of configuration tasks that that would simplify.
"Dave Griffith" <dave.griffith@cnn.com> skrev i en meddelelse
news:15718956.1066746211107.JavaMail.itn@is.intellij.net...
There's just bunches of configuration tasks that that would simplify.
But that would mean that the ant script would only work within Idea, thereby
screwing up anthill, cruisecontrol etc.
I really think people could shoot themselves in the foot with this.
It really shouldn't be the default.
Fair enough. Although if there were a "dump ant properties to properties file" command, that would make configuring non-IDEA builds much easier to integrate.
On Tue, 21 Oct 2003 17:37:26 +0200, Niels Ull Harremoës wrote:
Not really, in your ant script define a property with the default value,
then when IDEA passes in the redefined version the script will use that.
We do that in anthill for our 'dist.dir' property, the script sets the
default to './dist' but Anthill passes in the current path to the
publishDir - all works sweet.
--
"It's all in the heat of the moment, it's all in the pain..." Devy.
Mark Derricutt @ mark@talios.com @ talios.blog-city.com
How are they referenced, eg, $dog$, %dog%? Can they be used in run
configurations? For example, I need to specify the location of a
property file with a -D. Can I do a "-D$server.home$/appserver"?
Dmitry Lomov (JetBrains) wrote:
>>Under "Options" there's now a "Path Macros..." panel, which looks like it
>>lets you bind names to file paths. I can think of a number of cool places
>>this would be handy, but I don't seem to be able to do anything with them.
>> Any insights on how this feature is intended to be used would be greatly
>>appreciated.
Exactly :)
+1
Barry Kaplan wrote:
Paths are converted automativally on saving .iml and .ipr files.
Probably we can have that. What would people say?
Friendly,
Dmitry
>> Dave Griffith wrote:
>>
>>
>>>Under "Options" there's now a "Path Macros..." panel, which looks like it
>>>lets you bind names to file paths. I can think of a number of cool
>>>places this would be handy, but I don't seem to be able to do anything
>>>with them.
>>> Any insights on how this feature is intended to be used would be greatly
>>>appreciated.
>>
>>
>> Well, at the moment it is quite limited. It works so that if you setup
>> some path in your project under one of these macros, that path will be
>> saved relative to that macro. Different developers can then set different
>> values for such macro.
>>
>> Friendly,
>> Dmitry
>>
--
Dmitry Lomov
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Hello,
I tried to create a simple macro MY_HOME=/home/myname and passed it to
my application using -Dmy.home=$MY_HOME$ but it wasn't available from the
product.
I also tried %MY_HOME% $ with no result.
--
Best Regards,
Mamado.
"Barry Kaplan" <bkaplan@integratedtrading.com> wrote in message
news:bn45ci$8g5$1@is.intellij.net...
>
>
it
places
them.
greatly
some
values
>
>
That'd be nice !
Guillaume
Dmitry Lomov (JetBrains) wrote:
>
Yes, custom variables in run configurations are definitely a very useful thing.
And of course some of the predefined macros for External Tools that make sense
in a run configuration. I believe there's already an SCR for this, but I can't find it right
now. Here's one that comes pretty close though:
http://www.intellij.net/tracker/idea/viewSCR?publicId=3726
Sascha
Dmitry Lomov (JetBrains) wrote:
>>How are they referenced, eg, $dog$, %dog%? Can they be used in run
>>configurations?
Yes, I tested and saw just after posting. Very nice.
>>For example, I need to specify the location of a
>>property file with a -D. Can I do a "-D$server.home$/appserver"?
Ok, I think this would be nice. But for my immediate need that triggered
my post, the auto relativising of paths handled it nicely.