user1679709
user1679709

Reputation: 11

How to build a new view explorer

I am trying to build my own view explorer in Eclipse, but I can't find an example of one explorer completed built. I would like to show the workspace of eclipse in the new view, and then add a filter to show only the '.launch' extension. Does anybody know if there is any tutorial or example already built?

Upvotes: 0

Views: 95

Answers (2)

Bananeweizen
Bananeweizen

Reputation: 22080

First of all: For just filtering workspace contents it is enough to create a filter on the already existing project explorer. No need to implement anything, but you can implement a common navigator content provider to have that filter as pre-existing selection in the filter menu of the project explorer.

Second: Implementing yet another project explorer is really bad, even if it is the most often seen. The project explorer is just an implementation of the so called common navigator framework and you should extend that common navigator framework. The big advantage of this second approach is that the user of your plugin can use exactly one project explorer, which can show contents of different project types correctly in one view.

So if I want to see Java projects (with their package hierarchy) and I want to see your projects, then I can see both logical presentations in one view.

Upvotes: 1

Tobias Willig
Tobias Willig

Reputation: 1144

You can use the ProjectExplorer class provided by Eclipse.

Upvotes: 1

Related Questions