Wednesday, December 10, 2008

Invalid references in system libraries now detected!

It has been a long time since I blogged, but in the upcoming 3.5M4 release there is a new feature that I'd like to talk about.
API Tools provides a new feature to detect invalid references in system libraries. How many times did an Eclipse build fail because some code from a 1.5 library was used in a bundle tagged as 1.4? Too many times!
Now this kind of failures should be gone if all bundles are using API Tools.

Here is what you need to do to be all set:
1) Make sure that API tools is enable for your bundle
2) Then you select your bundle
3) Open the preferences for API Tools:


4) Select Warning or Error for the "Invalid references in system libraries"
5) Once the rebuild is complete, you should get new markers corresponding to this option.

This is especially useful for bundles that have multiple execution environments. It is difficult to make sure that all method invocations, type references or field accesses are included in all the specified execution environments.

Let me know if you have any question regarding this new option. All potential issues should be reported against PDE/API Tools component.

2 comments:

Chris Aniszczyk (zx) said...

Great stuff Olivier!

Andrew Niefer said...

This help with the problem of having to find foundation class libraries if you want to make sure you are sticking to the smaller EEs.