0

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.

Choosing package for new file

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?

llesha
  • 423
  • 1
  • 15
  • there's a raised question regarding that in IDEA's bug tracker, follow/vote https://youtrack.jetbrains.com/issue/IDEA-301367 – quickfix Dec 16 '22 at 16:57

0 Answers0