}
protected IBuildpathEntry[] getBuildpathEntriesFromDeps(DubBundleDescription bundleDesc) {
ArrayList<IBuildpathEntry> depEntries = new ArrayList<>();
for (DubBundle depBundle : bundleDesc.getBundleDependencies()) {
BundlePath bundlePath = depBundle.getBundlePath();
if(depBundle.hasErrors() || bundlePath == null) {
continue;
}
IProject workspaceProject = findProjectForBundle(depBundle);
if(workspaceProject != null) {
depEntries.add(DLTKCore.newProjectEntry(workspaceProject.getFullPath(), true));
} else {
for (java.nio.file.Path srcFolder : depBundle.getEffectiveSourceFolders()) {
java.nio.file.Path srcFolderAbsolute = bundlePath.resolve(srcFolder);
assertTrue(srcFolderAbsolute.isAbsolute());
depEntries.add(
DubDependenciesBuildpathContainer.createDubBuildpathEntry(EclipseUtils.path(srcFolderAbsolute)));
}
}