im trying to create a sub directories under one directory in intellij but somehow it creates them all under each other like the image shows.
i want to create security and auth under config, when creating packages it gives you the full packages path but in directories it just creates them under each other.
i can create them from the terminal or file explorer but i wanted to know if you know how this works in intellij.
#how to create sub directories in intellij
1 messages · Page 1 of 1 (latest)
<@&987246527741304832> please have a look, thanks.
do i get u right that u want this:
config
|- security
|- auth
then u need to click next to it and not under it. for the package creation dialog enter config.security and config.auth
nerver mind i just has to hit refactor and move the directory that's the only solution i found
for packages it gives you full path so you can choose where to create it, the problem is with directories
i dont quite follow what ur talking about as i cant see what ur seeing
u can click on the view settings on the explorer to not collapse the folders like that but expand it
then u can drag something onto the config folder instead of hitting security or auth
yeah you kind of have to create it outside and drag it into config, when clicking on a directory to create a new one it just creates it under the bottom sub directory, for example if i try to create a directory under security and click config.security.auth it will create it under auth, so the only solution is to create it and then refactor. sorry if that seem confusing more than it is actually.
as said
if u change the view setting u can click on config
and it will create it under config then
🙂
but yeah i get you
thanks that works in my case was appearance -> compact middle packages
on creation you can also just change the name properly, it should give you a dialog including the config.security.auth and there you just remove the auth part and put the name for the folder under security
it does that only with package creation with directories it doesn't include them
i guess ur not talking about packages then but for example resource folders?
ao far it sounded like u want to create packages
hm I am wondering why it separates them with dot in the first place, I thought intellij only does that for packages/modules
yeah exactly
you can turn it off by unchecking appearance -> compact middle packages it will stop compacting them packages or directories
yeah I am aware, I thought it doesn't do that for normal directories to begin with
thought the same. odd choice but oh well
this kinda late lol but when I create a new packageI just delete the "auth" part or "security" part ( I think the same )
config.security.auth
config.new
config.security.new
they arent creating packages but resource folders