abrakadabrda
abrakadabrda

Reputation: 25

Can't rename packages in Intellij idea

I want to create some folder structure in Intellij IDEA IDE. But, when I am trying to create some folder in other folder, root folder renaming.

For example: There is a folder src/test/java. I want to create folder com/tests. com folder renaming to com.tests.

Why is it happening?

Upvotes: 1

Views: 725

Answers (2)

Jörn Buitink
Jörn Buitink

Reputation: 2916

This is how IntelliJ IDEA displays packages a per default.

To change it:

In your Project Browser, click the Settings Button and deselect Compact empty Middle Packages.

Screenshot: IntelliJ compact middle packages

Upvotes: 5

  Meegoo
Meegoo

Reputation: 417

To complete jörn-buitink's answer

There's a little gear on top of Project tab. If you press on that gear you will see Compact Empty Middle Packges button. That's the one you want to deselect

enter image description here

Upvotes: 2

Related Questions