How to apply path variables to file path stored in .iml file

hello

I'm currently storing a file path as a setting in the modules file (as part of a JDOMExternalizable).

Is there an API through which I can go that will a) apply any path variables that are set in IDEA and b) make the path relative to the modules root directory if configured this way by the user?

Thanks for any hints.

etienne

0
2 comments

Hello etienne,

I'm currently storing a file path as a setting in the modules file (as
part of a JDOMExternalizable).

Is there an API through which I can go that will a) apply any path
variables that are set in IDEA and b) make the path relative to the
modules root directory if configured this way by the user?


Both of these things will happen automatically for any path stored in the
IDEA configs. You don't need any APIs for that.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

hello dmitry

Thanks for your reply. Since this is not the behavior I observe, I guess I'm doing something wrong. What I see in the .iml file of my persisted component is...

]]>

...where ARCHIVE_PATH is a field of type String in my component.

Or does ARCHIVE_PATH need to be of type File? Or do I have to use a different file path format (forward slashes/protocol/etc.)?

Thanks for helping me out.

etienne

0

Please sign in to leave a comment.