Fixing Bug 418043. Dependency resolution refactor.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=418043
Signed-off-by: André Pinto <andredasilvapinto@gmail.com>