I've just noticed that the same method exists in [ClassPathTests](https://github.com/scala-ide/scala-ide/blob/master/org.scala-ide.sdt.core.tests/src/scala/tools/eclipse/classpath/ClasspathTests.scala#L310), not sure if you feel like extracting it in a single place :-)