In the winter here (Canada) we don’t just ask, “Would you like fries with that?”, we ask “Would you like poutine with that?” You may not be able to get poutine where you are but now you can get source code wherever you are. You just have to ask.
In the Eclipse 3.7M4 build that was released yesterday PDE has a new “Include Source” option available when using Software Sites (aka p2 repositories) in your target definition. If you check that box, PDE will look in the available repositories for source bundles that correspond to the binary bundles you have selected. No need to manually find/select them.
This change is part of a bigger story. A while ago I was putting together a development/build workflow for a customer. They wanted to use their build output as a PDE Target Platform much like we do by default in the Eclipse project. Makes total sense. Unfortunately, setting it up is not as easy as you’d hope.
First you’d have to have source features in the build. These would generate source bundles corresponding to your binary bundles. You’d also have to figure out how to get them built in your product build. Then, when populating a target platform, your developers need to select a special “SDK” or “Target Components” feature that includes the source. Now they just point at the binary features they want and “Include Source”.
The story is not quite complete however. You still have to create the source bundles in the first place. When exporting features from the workspace there is a handy “Generate Source” check box. Simple. Unfortunately, we never added a convenience option like that in PDE Build. Bug 329162 seeks to change that. While it did not make it into M4, the patch attached to the bug allows you to generate source bundles with one property setting. I’ll be working with Andrew to get that in for M5 and will post here when the fix is in.
Even without the PDE Build changes the ability to include source is already useful. You can pick your desired runtime feature, check the box and get just the source you need. Sorta like poutine when it’s -30C and windy…