One suggestion I always make to developers getting started with the Rich Client Platform is to set up a research workspace containing all of the Eclipse IDE plug-ins. The Eclipse IDE (along with the PDE and JDT) is the ultimate RCP application and examining this code is the best way to learn how things should be done.
Are you developing a forms-based editor? Check out the PDE UI plug-ins to see how the Manifest Editor is constructed. Would you like to create a preference page with an unusual UI layout? Look through the many Eclipse IDE preference pages to find something similar. Then go look at the code.
I almost always have my research workspace open as I’m developing applications. It’s like having an RCP code encyclopedia! Follow these steps to create one:
- Create a new workspace called “Research” or whatever you like, and launch Eclipse using that workspace.
- On the
General -> Workspace
preference page, uncheck theBuild automatically
checkbox. This will stop Eclipse from attempting to build the huge pile of code you’re about to import into the workspace. This is also why it’s better to create a separate research workspace rather than importing the code into your programming workspace. - Switch to the
Plug-in Development
perspective. - Select the
Plug-ins
view, which should be stacked behind thePackage Explorer
view. - Select all the plug-ins in the view. Right-click and select
Import as -> Source Project
from the context menu.
Now you can explore the Eclipse source code whenever you like. You can do advanced searches and follow references wherever they lead. Enjoy!