Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorbjörn Svensson2018-03-16 22:05:34 +0000
committerJonah Graham2021-05-12 16:44:47 +0000
commit39a517931196b94d6b755ed564129fa58cb9cb5b (patch)
tree23d71a0e149e2235a88a57e6b35d17ab72acefdb
parent41de69b06c185d9a0f7c2e0ab388b567f8eb05e4 (diff)
downloadorg.eclipse.cdt-master.tar.gz
org.eclipse.cdt-master.tar.xz
org.eclipse.cdt-master.zip
Bug 571134 - Use the builder argument for cleanHEADmaster
This allows to clean the correct configuration Contributed by STMicroelectronics Change-Id: Ia47f3694809579f8d6fa6d6e6b0dd46f553d256d Also-by: Torbjörn Svensson <torbjorn.svensson@st.com> Also-by: Jonah Graham <jonah@kichwacoders.com> Signed-off-by: Torbjörn Svensson <torbjorn.svensson@st.com> Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java18
2 files changed, 14 insertions, 6 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
index 542c4b327cf..b1bec18d4b2 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
@@ -33,7 +33,7 @@ Export-Package: org.eclipse.cdt.build.core.scannerconfig,
org.eclipse.cdt.managedbuilder.templateengine.processes,
org.eclipse.cdt.newmake.core
Require-Bundle: org.eclipse.cdt.core;bundle-version="[7.0.0,8.0.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.14.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.variables;bundle-version="[3.1.100,4.0.0)",
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
index f453a2c979f..caa200bf558 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2019 Intel Corporation and others.
+ * Copyright (c) 2007, 2021 Intel Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -16,6 +16,7 @@
* Andrew Gvozdev (Quoin Inc) - Saving build output implemented in different way (bug 306222)
* Umair Sair (Mentor Graphics) - Project dependencies are not built in the correct order (bug 546407)
* Umair Sair (Mentor Graphics) - Setting current project for markers creation (bug 545976)
+ * Torbjörn Svensson (STMicroelectronics) - bug #571134
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.core;
@@ -61,6 +62,7 @@ import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator2;
import org.eclipse.cdt.newmake.core.IMakeBuilderInfo;
import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IIncrementalProjectBuilder2;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceDelta;
@@ -83,7 +85,7 @@ import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
-public class CommonBuilder extends ACBuilder {
+public class CommonBuilder extends ACBuilder implements IIncrementalProjectBuilder2 {
public final static String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".genmakebuilder"; //$NON-NLS-1$
private static final String ERROR_HEADER = "GeneratedmakefileBuilder error ["; //$NON-NLS-1$
@@ -1033,16 +1035,22 @@ public class CommonBuilder extends ACBuilder {
}
@Override
- protected void clean(IProgressMonitor monitor) throws CoreException {
+ protected final void clean(IProgressMonitor monitor) throws CoreException {
+ throw new IllegalStateException(
+ "Unexpcted/incorrect call to old clean method. Client code must call clean(Map,IProgressMonitor)"); //$NON-NLS-1$
+ }
+
+ @Override
+ public void clean(Map<String, String> args, IProgressMonitor monitor) throws CoreException {
if (DEBUG_EVENTS)
- printEvent(IncrementalProjectBuilder.CLEAN_BUILD, null);
+ printEvent(IncrementalProjectBuilder.CLEAN_BUILD, args);
IProject curProject = getProject();
if (!isCdtProjectCreated(curProject))
return;
- IBuilder[] builders = ManagedBuilderCorePlugin.createBuilders(curProject, null);
+ IBuilder[] builders = ManagedBuilderCorePlugin.createBuilders(curProject, args);
for (IBuilder builder : builders) {
CfgBuildInfo bInfo = new CfgBuildInfo(builder, true);
clean(bInfo, monitor);

Back to the top