SeniorJD
SeniorJD

Reputation: 7212

Hide excluded folders from tree in IntelliJ IDEA

After updating to IntellijIdea 14 I have discovered that an excluded folder in my project is now visible.

Image of intelliJ folder structure with hidden folder visable

How do I hide it?

Upvotes: 137

Views: 41623

Answers (5)

Line
Line

Reputation: 1651

In Idea 2022.2.2: project view -> gear icon -> Tree Appearance -> Show Excluded Files enter image description here

Upvotes: 3

Joseph Tesfaye
Joseph Tesfaye

Reputation: 874

In case you want to show excluded files instead of hiding them, you can invoke the Find action Window (e.g. Shift+Shift), search for Show Excluded Files and then turn it on or off. Sometimes there may not be this option in the Find action window somehow (such as me using the version 2019.3.3), but you can still toggle it by adding <option name="showExcludedFiles" value="true" /> to the node in .idea/workspace.xml:

<component name="ProjectViewState">
  ...
  <option name="showExcludedFiles" value="true" />
</component>

Then restart the project window.

Upvotes: 0

SeniorJD
SeniorJD

Reputation: 7212

The answer is close, in the Project gear menu: enter image description here

PS: Yes, it's a self-learning post

Also, you may have switched on the Show Excluded Files option. If so, use Shift + Shift and type excluded and do the obvious thing. show excluded files toggle

Upvotes: 272

Aaron
Aaron

Reputation: 427

1: Intellij IDEA > Preferences.

2: Go to File Types.

3: Add *.iml and *.idea to the Ignore files and folders list box at the bottom of this window.

Upvotes: 14

Hunter Zhao
Hunter Zhao

Reputation: 4659

Right click at the directory you want to exclude to mark it as excluded, enter image description here, and then uncheck the Show Excluded Files option. enter image description here

Upvotes: 24

Related Questions