Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaltasar Belyavsky2012-02-09 15:18:56 +0000
committerAndrew Gvozdev2012-02-12 14:02:24 +0000
commit6b66aef60bc1a3ee2f5fa862ed63f48721b1c15f (patch)
treeca21d2f6fab5298a6e9c78e20fdbaf8bd0ed3a10 /build/org.eclipse.cdt.make.core
parent088185204c04f304896540521a423111ae2afc36 (diff)
downloadorg.eclipse.cdt-6b66aef60bc1a3ee2f5fa862ed63f48721b1c15f.tar.gz
org.eclipse.cdt-6b66aef60bc1a3ee2f5fa862ed63f48721b1c15f.tar.xz
org.eclipse.cdt-6b66aef60bc1a3ee2f5fa862ed63f48721b1c15f.zip
bug 340219: Project metadata files are saved unnecessarily, patch to
address .project file modifications
Diffstat (limited to 'build/org.eclipse.cdt.make.core')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java32
1 files changed, 26 insertions, 6 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
index 10bbd648e88..52e7f70416b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 QNX Software Systems and others.
+ * Copyright (c) 2000, 2012 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* QNX Software Systems - Initial API and implementation
+ * Baltasar Belyavsky (Texas Instruments) - bug 340219: Project metadata files are saved unnecessarily
*******************************************************************************/
package org.eclipse.cdt.make.internal.core;
@@ -18,6 +19,10 @@ import java.util.Map.Entry;
import java.util.StringTokenizer;
import org.eclipse.cdt.core.ErrorParserManager;
+import org.eclipse.cdt.core.model.CoreModel;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.core.settings.model.extension.CBuildData;
import org.eclipse.cdt.make.core.IMakeBuilderInfo;
import org.eclipse.cdt.make.core.IMakeCommonBuildInfo;
import org.eclipse.cdt.make.core.MakeCorePlugin;
@@ -493,12 +498,27 @@ public class BuildInfoFactory {
BuildInfoProject(IProject project, String builderID) throws CoreException {
this.project = project;
this.builderID = builderID;
- ICommand builder;
- builder = MakeProjectNature.getBuildSpec(project.getDescription(), builderID);
- if (builder == null) {
- throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
- MakeMessages.getString("BuildInfoFactory.Missing_Builder") + builderID, null)); //$NON-NLS-1$
+
+ ICommand builder = null;
+
+ // first, give the build-system a chance to return the build-command overlayed with data managed by it
+ ICProjectDescription cProjectDescription = CoreModel.getDefault().getProjectDescription(project, false);
+ if(cProjectDescription != null) {
+ ICConfigurationDescription cConfigDescription = cProjectDescription.getActiveConfiguration();
+ CBuildData buildData = cConfigDescription.getConfigurationData().getBuildData();
+ if(buildData != null) {
+ builder = buildData.getBuildSpecCommand();
+ }
}
+
+ if(builder == null) {
+ builder = MakeProjectNature.getBuildSpec(project.getDescription(), builderID);
+ if (builder == null) {
+ throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
+ MakeMessages.getString("BuildInfoFactory.Missing_Builder") + builderID, null)); //$NON-NLS-1$
+ }
+ }
+
Map<String, String> builderArgs = builder.getArguments();
args = builderArgs;
}

Back to the top