Fix for part of bug 11563: show project name when building
authorEd Swartz <ed.swartz@nokia.com>
Fri, 16 Jul 2010 10:17:30 -0500
changeset 1626 18e19084258a
parent 1625 23cbab40ecdd
child 1627 769102b0e024
Fix for part of bug 11563: show project name when building
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java
builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java	Fri Jul 16 09:55:08 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManagerUtils.java	Fri Jul 16 10:17:30 2010 -0500
@@ -1,10 +1,14 @@
 package com.nokia.carbide.cdt.internal.builder;
 
+import java.text.MessageFormat;
+
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.core.ILaunchManager;
 
+import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
+
 public class CarbideBuildManagerUtils {
 	
 	/**
@@ -34,4 +38,9 @@
 		}
 	}
 
+	public static String getBuildLabel(ICarbideBuildConfiguration buildConfig, String componentName) {
+		return MessageFormat.format("Building {0}: {1}", 
+					buildConfig.getCarbideProject().getProject().getName(), 
+					componentName != null ? componentName : buildConfig.getDisplayString());
+	}
 }
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java	Fri Jul 16 09:55:08 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv1Builder.java	Fri Jul 16 10:17:30 2010 -0500
@@ -134,7 +134,7 @@
 		if (areWeManagingTheMakeFiles || buildConfig.getCarbideProject().isConcurrentBuildingEnabled()) {
 			
 			SubMonitor progress = SubMonitor.convert(monitor, 7);
-			progress.setTaskName("Building " + componentName);
+			progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName));
 
 			// run abld export or test export
 			List<String> args = new ArrayList<String>();
@@ -265,7 +265,7 @@
 			
 		} else {
 			SubMonitor progress = SubMonitor.convert(monitor, 1);
-			progress.setTaskName("Building " + componentName);
+			progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName));
 
 			List<String> argsList = new ArrayList<String>();
 			if (isTest) {
@@ -792,7 +792,7 @@
 			// because the dependency info is in the makefiles.
 			
 			SubMonitor progress = SubMonitor.convert(monitor, 3);
-			progress.setTaskName("Building " + buildConfig.getDisplayString());
+			progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
 
 			if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
 				return false;
@@ -866,7 +866,7 @@
 		}
 		
 		SubMonitor progress = SubMonitor.convert(monitor, unitsOfWork);
-		progress.setTaskName("Building " + buildConfig.getDisplayString());
+		progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
 
 		if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
 			return false;
@@ -1108,7 +1108,7 @@
 			// because the dependency info is in the makefiles.
 			
 			SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size());
-			progress.setTaskName("Building " + buildConfig.getDisplayString());
+			progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
 
 			if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
 				return false;
@@ -1201,7 +1201,7 @@
 		}
 		
 		SubMonitor progress = SubMonitor.convert(monitor, 4 + (normalMakMakePaths.size()*4) + (testMakMakePaths.size()*4));
-		progress.setTaskName("Building " + buildConfig.getDisplayString());
+		progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
 
 		if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
 			return false;
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java	Fri Jul 16 09:55:08 2010 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideSBSv2Builder.java	Fri Jul 16 10:17:30 2010 -0500
@@ -46,7 +46,7 @@
     public boolean buildAllComponents(ICarbideBuildConfiguration buildConfig, List<IPath> normalMakMakePaths, List<IPath> testMakMakePaths, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
 		
 		SubMonitor progress = SubMonitor.convert(monitor, 3);
-		progress.setTaskName("Building " + buildConfig.getDisplayString());
+		progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
 
 		if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
 			return false;
@@ -112,7 +112,7 @@
 		}
 
 		SubMonitor progress = SubMonitor.convert(monitor, 1);
-		progress.setTaskName("Building " + componentName);
+		progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, componentName));
 
 		List<String> argsList = new ArrayList<String>();
 		argsList.add(COMPONENT_ARG);
@@ -135,7 +135,7 @@
 	public boolean buildComponentSubset(ICarbideBuildConfiguration buildConfig, List<IPath> normalMakMakePaths, List<IPath> testMakMakePaths, CarbideCommandLauncher launcher, IProgressMonitor monitor) {
 
 		SubMonitor progress = SubMonitor.convert(monitor, 1 + normalMakMakePaths.size() + testMakMakePaths.size());
-		progress.setTaskName("Building " + buildConfig.getDisplayString());
+		progress.setTaskName(CarbideBuildManagerUtils.getBuildLabel(buildConfig, null));
 
 		if (!CarbideCPPBuilder.generateBldmakeMakefilesIfNecessary(buildConfig, launcher)) {
 			return false;