IntelliJ IDEA does not show some files? Know the hiding-places
April 28th, 2011 by Anna KozlovaHave you ever found yourself in a situation when there is a file that exists on the disc but IntelliJ IDEA doesn’t show it anywhere? You press synchronize but nothing happens? OK, may be the next few tips will be helpful.
- Check “Ignored files and folders” in File | Settings | File Types:
- Check “Excluded roots” in File | Project Structure
Your files are shown in Project View but they are missed at runtime?
- Check compilation patterns in File | Settings | Compiler
- Check that they were not excluded from compilation in File | Settings | Compiler | Excludes

We hope that these simple tricks will save your time as well as ours. ![]()
Tags: Configuration

April 28th, 2011 at 5:43 am
The default of compilation patterns in Intellij 10 is really bad (something like *.png;*.jpg;*.properties).
It should really be changed to “!*.java” or what you’re showing there.
April 28th, 2011 at 7:33 am
Can we use this to hide the intellij files like *.iml ;*.ipr or will that have a negative sideeffect?
April 28th, 2011 at 9:13 am
Thanks for your blog entry. However, the information given in this entry did not solve my problem, which is following:
My test sources are located under a folder src/main/java/ (Yes, it is a Maven project). The sources are visible in the project view. When I try to run all tests of a project, Idea finds only two test classes and executes the tests found from them. The rest of my unit tests are ignored. I can run the tests from the ignored classes, if ran the tests by selecting only a single class and selecting ‘Run FooTest’. Maven executes all of my unit tests without problems.
I am using IntelliJ Idea 10.0.3 and Maven 3.0.2. Any idea what could be wrong?
April 28th, 2011 at 1:57 pm
One other catch I came across is that if file extension is not registered in “File Types” it won’t be included in “Find In Path” textual search. Not obvious if you don’t know about it.
April 28th, 2011 at 7:45 pm
Some files show but really slowly in IDEA, sometimes you need to reopen the filechooser so many times that they finally show, how do I handle it
April 29th, 2011 at 3:45 am
@Petri Could you please check how created junit/testng run configuration is configured. It may be a problem with classpath where tests are searched. Thank you
April 29th, 2011 at 7:52 am
@Martin - I hide my .ipr, .iml, and .iws files and the .idea directory on the File | Settings | File Types screen. I find it saves hassles since searches don’t find things in settings files. And it reduces clutter in the project view. I’ve been doing it for 8 years and have never had an issue.
My entry: …;*.ipr;*.iws;*.iml;.idea;
April 29th, 2011 at 11:34 am
@Anna, the test run configuration is following (I selected run all tests from the popup menu, which appears when I click the right mouse button on the project view):
Test: All in package
Search for tests: Across module dependencies
Working directory: /Users/loke/Projects/Java/example
Use classpath and JDK of module: example
The rest of the fields are empty. I am running Idea on OS X 10.6.7. The weirdest thing about this problem is that it appeared between two test runs. In the first test run Idea could find all my test classes, but the second test run found only two test classes. The problem has been the same after that. Do you think that cleaning the caches of Idea could help?
April 29th, 2011 at 11:46 am
@Petri Actually I do not think so. Could you please send me e-mail/contact our support/file an issue in YouTrack, as this question seems to be specific to your set up and has nothing to do with this blog entry? Thank you
April 29th, 2011 at 12:00 pm
@Anna, I contacted the support team as you suggested. Thank you for your help.
May 18th, 2011 at 12:24 pm
It is very easy to exclude files by right-clicking and choosing exclude in the error dialog. It should be as easy to include them. Therefore, it would be very useful to have IntelliJ do two actions:
1) When a make error occurs for a file that does exist but is included, a warning or note next to that error would be nice telling you that the compile failed due to the exclusion.
2) Allow a user to right click on a file and exclude or include it for compilation.
June 23rd, 2011 at 11:00 pm
Hi Anna,
Thanks for the helpful hints.
Where do these config files get stored? I’ve looked everywhere and Xena seems to put them somewhere that previous versions didn’t.
I tried to log on to YouTrack, but it seems to be down.
June 24th, 2011 at 3:57 am
Exclude folders are stored in corresponding .iml files; ecluded files from compilation and resource patterns are stored in compile.xml in .idea (or in .ipr file). Ignored file patterns are stored in filetypes.xml in your config directory.
I hope that you do not need this information anyway
October 13th, 2011 at 3:21 pm
I would like Maven’s output dir to show in the project view so i can verify the contents of built artifacts, copy them to servers, etc. how do I get IntelliJ to stop automatically excluding the Maven output dir which is useful for development?
March 21st, 2012 at 7:47 am
I can see the java source file in project scope, I can compile them if there is no package scoped source file, but when switch to package view I cannot see them.
It’s really-really annoying.
December 11th, 2012 at 4:48 am
@Mark:
THANKS man! It’s old thread but I was looking for a way to hide *.iml etc. Your tip is worth gold. I do not get however why IntellJ sometimes does not show these files by default and sometimes it does! Gotta be me…
Thanks man!
May 25th, 2013 at 5:08 pm
I’m having an odd situation where I have a project with a structure on disk like so:
- project_root/
- .idea/
- module/
- src/
module.iml
pom.xml
When I open the project in IDEA (13 Cardea IU-130.555) the Project Files window shows the module as a top level folder, however, the .idea directory in the project root is no present. It looks something like this:
-> module/
-> src/
module.iml
pom.xml
Is there a reason for this? How and I set things up so that the Profile Files view will include the .idea directory?
Thanks,
-Noah
May 25th, 2013 at 5:10 pm
It looks like I can’t edit my previous comment, but the formatting was not preserved in my last comment. The module/ and lines below it should have all been indented under -project_root/