I have java source files in /src/main/java/mypackage and tests for them in /src/test/java/mypackage. When in package view, Intellij displays these files all together, since they are technically the same package. I would like them to appear separately. I have tried a few configuration options with no luck.
I would greatly appreciate any suggestions for this.
to toggle the Skip tests mode. On the Runner page, select Skip tests and click OK. IntelliJ IDEA de-activates the test goal under the Lifecycle node. The appropriate message notifying that tests are skipped is displayed in the Run tool window when you execute other goals.
To change settings of a module that hosts the file you are currently editing, just press Alt+F1, 7 or open the View menu, select Select In and click Project Structure. IntelliJ IDEA will open the Project Structure dialog and jump to the required module.
Click on the gear icon at the top right on the package view, and make sure that "Flatten Packages" and "Compact empty middle packages" are unchecked. Show activity on this post. This screen shot taken from IntelliJ IDEA 2017. Most of the time the answer will be same on every Intellij IDE.
I think that Andrii solution is the best but if you want to use package view, you can split types inner package checking "Sort by Type" option in menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With