IntelliJ equivalent to "inclusion and exclusion patterns"?

I have an Eclipse project in which the Java build path is defined (in the project properties) to contain the "src" folder with specific inclusion patterns ("com / example / package1 / **", "com / example / package3 / **" ) The reason is that, say, “package2” contains things that are not related to this project, but are related to another project that shares its source tree.

I would like to try using IntelliJ IDEA, but I cannot find an equivalent function. Is there this or is there another way to do what I want?

+4
source share
3 answers

Under the root of the content you can

-Include the source folders (folders containing the com package) with the blue folder button.

-Disable folders with red folder. It will completely delete files from intellij eyes. Not just for the java compiler.

-If this is not enough, you have / setting / compiler / exclude, where you can exclude packages or files individually, but only for the eyes of the compiler. You can quickly add a file to these exceptions by right-clicking on a java compilation error. It can also work for compilers other than java.

+2
source

In the "Project Structure" window, in the "Modules" section of the "Sources" tab, you can mark some directories as "excluded" by selecting it and clicking the "red folder" button.

+1
source

Look at Settings ... / File Types / Ignored Files and Folders

This applies to all projects.

+1
source

Source: https://habr.com/ru/post/1345959/


All Articles