Reputation: 2100
I have multiple files of different types in a source folder in my Eclipse project (not a Java project). I know how to hide files from the Project Explorer view (using view filters). But I did not find a way to hide (not exclude) a file from the source folder. Is that possible to achieve?
Example:
Say my project has a folder: src, which contains three files: Main.java, and config1.xml, config2.xml. Once I add src as a source folder, it along with its file children show up as source folder (see upper balloon in image) and also a simple folder (separately) (see lower balloon in image) under the same project in Project Explorer.
I know that I can set an inclusion filter so that I build only the java file, and not the xml. But how can I set a view filter so that the config1.xml file is hidden, but not config2.xml? (Clearly, I do not want to set a filter on *.xml, because that would hide both xml files.
UPDATE: When I attempt to add a resource filter according to Simon's solution, the file gets hidden from both the source folder and the folder view. I want to hide it only from the source folder view (upper balloon) and not the simple folder view (lower balloon). That way we know about the existence of config1.xml, but its exclusion from source.
Upvotes: 2
Views: 2019
Reputation: 1261
If you want the file to be hidden from the view, then do the following
The file config1.xml should no longer be visible
Upvotes: 4