How to hide src folder from Eclipse Project Explorer? - eclipse

I use a maven standard directory layout for my projects.
The image Below is a typical project explorer view of a "not so minimum working example" of the view I want to customize.
As you can see, all the relevant folders are marked as source folders, so there is no need to show the src folder hierarchy as it is shown below the included libraries.
So the question is, how can I get rid of the redundant src folder showing, i.e. how to show only source folders and libraries?
I've playing around with filters and content configuration of the view but couldn't find the way to do it.

Click to the third right top button, then "Filters" and then check "Name filter patterns" and write "src". Then the second src folder is hidden.

This is actually not added twice it is because of the explorer view you are using, just change it to navigator view and your problem will get solved.
Check this post might help you more, it is not related to you answer but show how to select navigator view
Hope this will help you :).

The description in Andreas B.'s answer refers to the Package Explorer view. In Project Explorer view it's:
View Menu → Filters and Customization... → User filters → New → src → activate/check it → OK

Related

Eclipse: Hide files excluded from source folder

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.
If you want the file to be hidden from the view, then do the following
Open the context menu on the "src" folder and select Properties
Choose Resource > Resource Filters page
Click the "Add" button.
In the dialog, select "Exclude all" filter type option, "Files" applies
to option, and type in the file name config1.xml (Name matches)
Close all the dialogs and refresh your project in the Project Explorer
view.
The file config1.xml should no longer be visible

Show the name of the containing folder in the Eclipse tab of a file

I have the same set of files in N folders, one of them, say, blank.xhtml. The files contain somewhat similar information and it is becoming overwhelming to figure out which file comes from which folder every time I switch between the tabs. When I open one of them to edit and happen to open a file with the same name from another folder I get confused and more often than not end up editing the wrong file: nullifying my hard work. So I am wondering if there is a way to show the name of a containing folder in the tab like this G-06/blank.xhtml or G-07/blank.xhtml. I will be very very thankful to anybody who has pointers to how I can make this happen.
As an addition to the Maroun's answer there is an alternative solution.
It's not exactly what you want (full name in the tab's title), but may be useful sometimes.
In the "Project Explore" view (the same goes to "Navigator" view) click the "Link with Editor" button. That way, whenever you choose some file opened in the editor, it will be automatically selected/highlighted (see the picture) in the "Project Explorer" view.
Here is the picture:
Maybe this will be useful to you too.
If you hover the mouse over the tab containing the file name then a popup appears showing the full path. Not exactly what you wanted, but it should help. (This with Eclipse Neon.3 Release 4.6.3 on a Mac).
Not quite what you're looking for, but ctrl+shft+e will open the switch editor window that shows all the open editors with their filepaths. I use this shortcut for the same reason. I'll have multiple build.gradle files open from multiple projects and this helps pick the correct one

How to exclude files/folder from Markers view in eclipse?

Is there a way in eclipse to stop markers from showing in the Markers view for files in a certain folder? I.e. I imported a Javascript library that I didn't write myself but it is going to be part of my project and I don't want to have to look at all the "TODO" and "FIXME" markers in those files and would just want to see my markers only... Is there a way to exclude certain folders or files form being scanned by the markers process?
Apparently, I was able to resolve this by adding the folders I wanted to exclude to the exclusion list under Project->Properties->Validation. (Click settings beside each validation, Add Exclude Group button, Add Rule button, select folder option, browse for relative folder)
You can configure the content of the Markers view (the one displaying errors and warning in source code) and the content of the Tasks view (the one displaying "TODO" and "FIXME") by clicking on the "small down arrow" in the top right of the view (near the minimize and maximize buttons) and then clicking on Configure Contents ... entry.
Hope this can help,
Manu
By selecting Configure Contents like Manu said, there is also the option to list the tasks for a specific working set, using the Scope area at the right.
That worked for me, and I'm not annoyed anymore by all Zend Framework #todo.
Hope this helped, Stéphane
I'm doing a node app and wanted to exclude my node modules folder. I found the only way to do this is to create a working set that excludes that directory and set the Task -> configure contents to that working set.
How to exclude a folder that is producing warnings/errors in an Eclipse project?

what can I do to make display the bin folder on eclipse?

can anyone help me solve the issue that I have ?
in fact when I create a project on eclipse, the bin folder doesn't display and I am able to create a javadoc for my project. I need help please.
I don't know what the reason for your question but you can see the bin directory in Project Explorer (not Package Explorer). Here you click the triangle and select Customize View... and remove the click on Java output folders
To change this behaviour and hide the “.class” files you need to do the following.
Find your class output folder in the “Project explorer” window. This is usually called “bin” or “target” for Maven projects
Right-click this folder and click “Properties”
Tick the “Derived” checkbox and click “OK”
“.class” files will now be hidden in future.
Source: http://ayubmalik.co.uk/2011/12/hide-class-files-when-opening-a-type-or-resource-in-eclipse-ide/
If your Eclipse version doesn't allow you to show "Java Output Folders" as mentioned by nanda, then try the Navigator View (From the main menu: Window > Show View > Navigator). The Navigator View shows the bin folder.
Your question is a bit vague but try right clicking on the project and choosing build path, and see if the output directory for your java classes is set to bin. It may not appear in your unless you add some Java source code

eclipse: Do not show references from binary types in call hierarchy

Is there any way to remove binary references from "call hierarchy" (Ctrl-Alt-H) ?
Our project setup is such that for many members we have duplicated references (one reference from source file and one from the jar file with class compiled from that source file). The navigation is inconvenient and I wondering if any ways to fix that is available.
Call hierarchy can be limited in scope to a working set. You just need to set one up to exclude all your libraries.
If you click on the white down arrow in the top right of the Call Hierarchy window a popup menu will appear. Choose Search Scope/Working set and then select or set up the working set you want. A working set can include a source folder or a jar. Once set up your working sets will appear at the bottom of the Search Scope menu so you can access them quickly in future.
I've discovered another way to accomplish this, and since this question is one of the top results in google, I thought it would be good to add it as an answer.
In the Call Hierarchy view, one can click the 'View Menu' (the downward facing arrow) and select "Search In...". In the window that pops up, the user can un-check the options they want to exclude. For example, I only have 'Sources' and 'Required projects' checked.