Lots and lots has already been told about the Common Navigator framework. I'm not going to add any more explanation about the framework, but will tell you a tip on how to easily create one with the Workspace resources as the default contents.
Open your plugin.xml and go to Extensions tab. Click on Add and select the Extension Wizards. Select 'Common Navigator' and click Next.
Configure the options and press Finish.
You are done. Can it get any simpler than this?
In case you didn't find the Common Navigator in the list of Extension Wizards, you may want to download the Cypal Eclipse Utils and drop the jar into your plugins/dropins folder.
For those who are interested the background:
Few days back, I was working on creating a Common Navigator for an RCP application. Just like most of the RCP apps out there, I want to start with Workspace resources first. It didn't work as expected. I spent around 30 mins debugging only to find out that I've missed the "org.eclipse.ui.navigator.resources" in the dependencies. That is when I thought how good if some has already implemented a template for this extension. Instead of complaining, I thought why not to create on. Less than an hour of hacking existing PDE Extension Wizards, the base code was ready. Another half-an-hour at Google Project Hosting, the download is ready to serve. Thanks to PDE guys and Google for making things much simpler.
I plan to add few other handy utilities like this. Let me know the usefulness of this one.
[Update] This funcationality has been checked into Eclipse CVS. You should be seeing this wizard in 3.5 from M1 onwards. To have this wizard in 3.3 or 3.4 you can download from the above link and use it.



2 comments:
If you want to contribute this to the set of PDE templates we already have, let me know.
The best way to do it would be to file a bug against PDE UI and we can add the template in 3.5 so everyone can benefit ;)
Opening a bug against PDE?
hmmm, on a second thought, I should have done that instead of doing this. Anyways, better late than never. I'll open a bug right away
Post a Comment