I want to create a file in a concrete package, no matter where the user clicks in the file tree.
E.g. I want to always create a file inside relations
package. Here I clicked on the entity
package, but I expect to get the resulting file in relations
package nevertheless.
Here is a similar question for Android Studio. I guess, my question will cover a broader audience.
If I mention the full path to desired package (src/main/kotlin/relations
), then in the example I will get a file that has the following path from the root: src/main/kotlin/entity/src/main/kotlin/relations
. I tried writing path prefixes (like ../../src/main/kotlin/relations
), but it does nothing, also the amount of these prefixes may vary depending on where I clicked in the file tree.
Is there any way that a file template creator can distinguish between absolute and relative paths?