34

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.

My typical project explorer view layout

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.

2
  • 1
    I cannot post it, as an spam prevention policy, until I got 10 points. I will add it when I can. The image shows a "src" folder "twice" (not exactly), first as src/main/java and similar packages and then as a "src" (not source) folder with its hierarchy. Commented Jan 21, 2013 at 11:11
  • 1
    While the response provided by @Andreas B. isn't a complete solution, it works well if you restrict yourself to the Java perspective Commented Jul 8, 2018 at 18:35

3 Answers 3

15

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.

Sign up to request clarification or add additional context in comments.

2 Comments

When you have other non-Maven projects in your workspace you can't see your src folders any more. Not a complete solution.
This worked with me when I used package explorer instead of project explorer. I'm using Eclipse Java EE IDE Version: Photon Release (4.8.0) Build id: 20180619-1200
3

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 :).

3 Comments

Nice one buuut... the navigator hasn't the content extensions (java elements, for example) which package or project explorer views have.
In Juno, AFAIK, the navigator view has no "Customize view..." option in the dropdown config menu(package and project explorer views do have it), where you can choose extensions as the above mentioned "java elements", which allow things like the green java class icon up there in the image.
Best of luck for further search :)
3

The description in Andreas B.'s answer refers to the Package Explorer view. In Project Explorer view it's:

View MenuFilters and Customization...User filtersNewsrc → activate/check it → OK

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.