/** * This will check the indirect dependencies of <code>model</code> and install the necessary * workspace plugins if we need to import some of their packages. * * @param model The model of which we wish the dependencies checked. */ private void checkImportPackagesDependencies(IPluginModelBase model) { final BundleDescription desc = model.getBundleDescription(); if (desc == null) { return; } for (ImportPackageSpecification importPackage : desc.getImportPackages()) { for (IPluginModelBase workspaceModel : PluginRegistry.getWorkspaceModels()) { if (workspaceModel != null && workspaceModel.getBundleDescription() != null) { for (ExportPackageDescription export : workspaceModel.getBundleDescription().getExportPackages()) { if (importPackage.isSatisfiedBy(export)) { installBundle(workspaceModel); break; } } } } } }