Test sources mixed in with main source folders

I decided to give IntelliJ a try, since my company has a license for it.  I'm using version 9 and trying to import my projects from Eclipse.  I was able to get everything imported, but when I'm viewing Packages in the Project tab, there's no separation of main and test source folders.  For many of our projects, we have our main source classes in something like src/main/java/com/ClassName, and we have a corresponding test class in src/main/test/com/ClassNameTest.  Both of these classes show up under the same folder in the Packages view, since they have the same package name.  In Eclipse's package view, there's  a src/main/java folder and src/main/test folder, with all the packages listed underneath each of those folders.  Is there anyway to do something similar in IntelliJ?

3 comments
Comment actions Permalink

Hello Matt,

Sure. You should simply switch from the Packages view to the Project view.

I decided to give IntelliJ a try, since my company has a license for
it.  I'm using version 9 and trying to import my projects from
Eclipse.  I was able to get everything imported, but when I'm viewing
Packages in the Project tab, there's no separation of main and test
source folders.  For many of our projects, we have our main source
classes in something like src/main/java/com/ClassName, and we have a
corresponding test class in src/main/test/com/ClassNameTest.  Both of
these classes show up under the same folder in the Packages view,
since they have the same package name.  In Eclipse's package view,
there's  a src/main/java folder and src/main/test folder, with all the
packages listed underneath each of those folders.  Is there anyway to
do something similar in IntelliJ?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

So there's no way to do this within the Packages view?  I MUCH prefer the Packages view because it's not nearly as cluttered.

0
Comment actions Permalink

Hello Matt,

The Packages view shows the package structure of your project. Since your
production and test sources are in the same package, it displays them together.

So there's no way to do this within the Packages view?  I MUCH prefer
the Packages view because it's not nearly as cluttered.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.