Richy
Richy

Reputation: 73

How to group a folder structure in a common navigator view in an eclipse-rcp application?

I have a question concerning the folder structure of a common navigator view (package explorer) in an eclipse-rcp application.

My goal is to group the source folder of a project.

source folder of the sample project

As you can see in the picture above the source folder of the project “Sample” is src + main + resources. I would like to group that source folder so that there is only one line displaying the text “src.main.resources”. This should not be reached by changing the folder structure in the file system.

So my question is: Is it possible to group the source folder programmatically without touching the physical folder structure?

Any help would be appreciated!

Cheers!


After doing a lot of research, I'm trying a different approach. I am using a decorator class to modify the label of the source folder.

Result after modifying the names of the src folders

To reach the goal of the original question, I would like to hide the first two levels of the source folder so that there is only one line displaying "src/main/resources". Sadly, IFolder.setHidden(true) does not work because it also would hide the children of the node. Is there a possibility to hide these two folders by using a filter for example? Or do I have to modify the Tree of the Navigator?

Thank you in advance!

Upvotes: 2

Views: 1001

Answers (1)

Related Questions