This seems overly complicated to me. I see 2 concerns mixed in this method:
* checking in the version passed in Xsource is compatible with the running Scala IDE.
* checking that the cross-compiled version of a library is compatible with the project version.

Why not do the Xsource value check outside of this method, and only the compatibility in here.