Can one remove .class files from open file list in

2019-02-07 19:24发布

问题:

I have an Android project in IntelliJ IDEA. When I hit Ctrl+Shift+N to open a file, the drop-down of file names includes both .class and .java files. The .class files are in the bin directory of my project.

I can see wanting .class files for external libraries (like a linked in jar file) but I don't want them for my own sources. I'm new to IDEA and assume this is a simple thing I just didn't do right, but I can't seem find it and it's driving me crazy. Any ideas?

回答1:

Set bin directory as Excluded, normally IDEA excludes all the output folders by default and doesn't show you any .class files.



回答2:

For Android Studio, there is a blue triangle when 'enter file name' (CMD + SHIFT + O) window is active. Clicking on the triangle brings down a drop down list of file types to be included/excluded in search



回答3:

When you hit Ctrl+Shift+N to open a file, you'll find the below drop down with the list of files and deselect class files under filter.

https://i.stack.imgur.com/AmhxD.png