Is there a way in eclipse to filter/hide empty directory trees in the package explorer view?
This is different than filtering directories like '.svn' or maven's target, or filtering empty packages. It's more trying to clean up empty directories trees that show up as a result of filter rules.
Context- We have a generic project in our workspace that uses filters to ignore non text based files(mp3s, jpgs, etc). It allows us to quickly edit our files in eclipse. The problem is because of the filters there are a lot of empty folders present. If eclipse can ignore any empty folders due to filters it would make the project cleaner.
Update- I filed a bug report in eclipse's buzilla system for those that wish to have this feature: https://bugs.eclipse.org/bugs/show_bug.cgi?id=334052
Click to open My Computer. Choose the Search tab at the top line. In the opening Search Menu, set Size filter to Empty (0 KB) and check All subfolders option. From the list of the files and folders that don't take up any disk space, right-click the empty folder(s) and select Delete.
Use the 'find' command along with the '-type' flag that specifies the directory type search using the keyword 'd'. The word '-empty' has been used as a flag to search only empty directories within the home directory as stated below. The dot means the current location which is the home directory of a Linux-based system.
git can't push empty directories. It can only track files. If you try to push a folder with nothing in it, although it will exist on your local machine, nothing will go into your branch. So if someone tries to clone your code, they won't have the same folder structure as you do on your local machine.
An empty directory is a directory that doesn't contain any file or directory. It's fair to say that empty files don't consume space, but we should clean our file system from time to time as a best practice. All the commands discussed in this tutorial are Linux-specific and won't work on Windows.
In Eclipse SDK (I use 3.6.2), to hide empty folders in the "Package Explorer":
At the top-right of the Package Explorer view, there's a downward-pointing triangle. If you hover your mouse pointer over it you'll see "View Menu".
now your empty folders don't show any more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With