Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorVivian Kong2008-11-28 18:41:44 +0000
committerVivian Kong2008-11-28 18:41:44 +0000
commitb3f4a2c33c2c4191215823e6029308bf6cb95d80 (patch)
treecd7bbb317783015305455fc36247a8bf25aaf633 /build
parentcbdea1288c379373d94e967c1df1b1c86fbaf19d (diff)
downloadorg.eclipse.cdt-b3f4a2c33c2c4191215823e6029308bf6cb95d80.tar.gz
org.eclipse.cdt-b3f4a2c33c2c4191215823e6029308bf6cb95d80.tar.xz
org.eclipse.cdt-b3f4a2c33c2c4191215823e6029308bf6cb95d80.zip
bug 219337 - option to change how referenced projects are build
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java20
1 files changed, 18 insertions, 2 deletions
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 da03a84236d..88e7542d4e3 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 Intel Corporation and others.
+ * Copyright (c) 2007, 2008 Intel Corporation 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:
* Intel Corporation - Initial API and implementation
+ * IBM Corporation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.core;
@@ -559,7 +560,7 @@ public class CommonBuilder extends ACBuilder {
updateOtherConfigs(info, builders, kind);
monitor.done();
- return project.getReferencedProjects();
+ return refProjects;
}
private Set<IProject> buildReferencedConfigs(IConfiguration[] cfgs, IProgressMonitor monitor){
@@ -574,6 +575,21 @@ public class CommonBuilder extends ACBuilder {
IConfiguration cfg = cfgs[i];
IBuilder builder = cfg.getEditableBuilder();
// CfgBuildInfo bInfo = new CfgBuildInfo(builder, false);
+
+ //bug 219337
+ if (buildRefConfig()){
+ IProject currProject = cfg.getOwner().getProject(); //get the project of the current referenced configuration
+ IBuilder[] builders = new IBuilder[]{builder};
+ IConfiguration[] refConfigs = getReferencedConfigs(builders); //referenced configurations of the current project
+ if (refConfigs.length <=0) { //if this is not a dependent project, then we don't build unless there's a change within the workspace
+ IResourceDelta delta = getDelta(currProject);
+ if (delta != null && delta.getAffectedChildren().length <= 0) { //do not build when there are no changes since last build
+ projSet.addAll(Arrays.asList(currProject.getReferencedProjects()));
+ return projSet;
+ }
+ }
+ }
+
if(VERBOSE)
outputTrace(cfg.getOwner().getProject().getName(), ">>>>building reference cfg " + cfg.getName()); //$NON-NLS-1$

Back to the top