@Override protected boolean supportsContext(BundleManifestValidationContext context) { IResource resource = context.getRootElement().getElementResource(); IJavaProject javaProject = JavaCore.create(resource.getProject()); return FacetUtils.isBundleProject(context.getRootElement().getElementResource()) && (resource.equals(BundleManifestUtils.locateManifest(javaProject, false)) || resource.equals(BundleManifestUtils.locateManifest(javaProject, true))); }
/** * Gets notified for every change of the given <code>runtime</code>'s {@link BundleRepository}. On * every notification it will update <i>all</i> bundle project's {@link BundleManifest}. */ public void bundleRepositoryChanged(IRuntime runtime) { for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) { if (FacetUtils.isBundleProject(project) && Arrays.asList(ServerUtils.getTargettedRuntimes(project)).contains(runtime)) { ServerClasspathContainerUpdateJob.scheduleClasspathContainerUpdateJob( JavaCore.create(project), BundleManifestManager.IMPORTS_CHANGED); } } }