From 479670d59f00643089d539f20c164cd9603d66c8 Mon Sep 17 00:00:00 2001 From: Rahul Mohanan Date: Thu, 26 Sep 2024 14:36:51 +0530 Subject: [PATCH] Backport : Do not build unrelated projects #1214 Backporting fix to 4_31 Maintenance Branch. --- ui/org.eclipse.pde.core/META-INF/MANIFEST.MF | 2 +- .../org/eclipse/pde/internal/core/MinimalState.java | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF b/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF index 423c3028e1..1f66fb716a 100644 --- a/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF +++ b/ui/org.eclipse.pde.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %name Bundle-SymbolicName: org.eclipse.pde.core; singleton:=true -Bundle-Version: 3.18.0.qualifier +Bundle-Version: 3.18.1.qualifier Bundle-Activator: org.eclipse.pde.internal.core.PDECore Bundle-Vendor: %provider-name Bundle-Localization: plugin diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java index 9dc87031b8..0f85b9314c 100644 --- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java +++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/MinimalState.java @@ -52,6 +52,7 @@ import org.eclipse.pde.core.plugin.IPluginModelBase; import org.eclipse.pde.internal.build.BundleHelper; import org.eclipse.pde.internal.build.IPDEBuildConstants; +import org.eclipse.pde.internal.core.builders.PDEBuilderHelper; import org.eclipse.pde.internal.core.util.ManifestUtils; import org.eclipse.pde.internal.core.util.UtilMessages; import org.osgi.framework.BundleException; @@ -335,12 +336,14 @@ public static IStatus reloadSystemPackagesIntoState() { // Perform PDE-Manifest build, to re-validate all Manifests MultiStatus status = new MultiStatus(MinimalState.class, 0, "Reload of JRE system-packages encountered issues"); //$NON-NLS-1$ for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) { - try { - project.build(IncrementalProjectBuilder.FULL_BUILD, PDE_MANIFEST_BUILDER, null, null); - } catch (CoreException e) { // ignore + if (PDEBuilderHelper.isPDEProject(project)) { + try { + project.build(IncrementalProjectBuilder.FULL_BUILD, PDE_MANIFEST_BUILDER, null, null); + } catch (CoreException e) { // ignore status.add(e.getStatus()); + } } - } + } return status; }