1

In the Community Edition when I import a module IntelliJ goes through and tries to figure out which directories are what types. The modules I deal with sometimes have a src and a test directory, which work fine, but more often than not the test directory is actually named tst. IntelliJ likes to mark is as a "Sources" directory rather than "Tests". With the tools I am working with, the dependency configuration and generation of the .iml file happens after this, as well as using a modified build system that is not IntelliJ supported. I have to build via commandline which generates a build folder which I would like to have automatically excluded.

So a couple questions.

  1. Can I configure IntelliJ to automatically recognize different folder names "Tests" and mark them as such?
  2. Can I configure IntelliJ to automatically mark a folder as excluded when it is present in a module?
4

1 回答 1

0
  1. You can't configure it, the list is hard-coded. However, I've added "tst" to the list of names that are recognized as test source roots; that fix will be included in IntelliJ IDEA 14.1.

  2. You can add "build" to Settings | File Types | Files and folders to ignore. Then IntelliJ will ignore the directories and files named "build" anywhere in your project structure. Given that "build" is a fairly common name, this may or may not be what you want.

于 2014-12-24T08:01:27.873 回答