merge
authorfturovic <frank.turovich@nokia.com>
Wed, 24 Jun 2009 10:28:30 -0500
changeset 296 ad429850197e
parent 295 fb456bb938f9 (current diff)
parent 294 652205e6022b (diff)
child 297 192fda8b2d77
child 298 ef192f2b7aee
merge
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java	Tue Jun 23 14:54:20 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java	Wed Jun 24 10:28:30 2009 -0500
@@ -1235,7 +1235,7 @@
 
 		for (IMMPReference mmp : mmps) {
 			if (buildConfiguration != null) {
-				if (buildComponents == null || EpocEngineHelper.containsStringIgnoreCase(buildComponents, mmp.getPath().lastSegment())) { 
+				if (buildComponents == null || TextUtils.listContainsIgnoreCase(buildComponents, mmp.getPath().lastSegment())) { 
 					getMMPIncludePaths(projectInfo.getProject(), 
 							mmp.getPath(), buildConfiguration, userPaths, systemPaths);
 				}
@@ -1462,7 +1462,7 @@
 			buildComponents = info.isBuildingFromInf() ? null : info.getInfBuildComponents();
 	
 		for (IMMPReference mmp : mmps) {
-			if (buildComponents != null && !EpocEngineHelper.containsStringIgnoreCase(buildComponents, mmp.getPath().lastSegment()))
+			if (buildComponents != null && !TextUtils.listContainsIgnoreCase(buildComponents, mmp.getPath().lastSegment()))
 				continue;
 			
 			EpocEnginePathHelper helper = new EpocEnginePathHelper(info.getProject());
@@ -1587,14 +1587,6 @@
 		return plugin.getPluginPreferences().getBoolean("indexAll"); //$NON-NLS-1$
 	}
 
-	public static boolean containsStringIgnoreCase(List<String> list, String s) {
-		for (String string : list) {
-			if (string.equalsIgnoreCase(s))
-				return true;
-		}
-		return false;
-	}
-
 	/**
 	 * Get the list of all mmp file paths for any and all build configurations of a project.
 	 * @param projectInfo
@@ -2012,7 +2004,7 @@
 			buildComponents = buildConfig.getCarbideProject().isBuildingFromInf() ? null : buildConfig.getCarbideProject().getInfBuildComponents();
 
 		for (IPath mmpPath : getMMPFilesForBuildConfiguration(buildConfig)) {
-			if (buildComponents != null && !containsStringIgnoreCase(buildComponents, mmpPath.lastSegment()))
+			if (buildComponents != null && !TextUtils.listContainsIgnoreCase(buildComponents, mmpPath.lastSegment()))
 				continue;
 			
 			EpocEnginePlugin.runWithMMPData(mmpPath, 
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java	Tue Jun 23 14:54:20 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java	Wed Jun 24 10:28:30 2009 -0500
@@ -47,6 +47,7 @@
 import com.nokia.carbide.cdt.builder.EpocEngineHelper;
 import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
 import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
+import com.nokia.cpp.internal.api.utils.core.TextUtils;
 
 /**
  * Class used to supply the new CDT 4.0 project model with the data it
@@ -251,7 +252,7 @@
 			buildComponents = carbideBuildConfig.getCarbideProject().isBuildingFromInf() ? null : carbideBuildConfig.getCarbideProject().getInfBuildComponents();
 
 		for (IPath mmpPath : EpocEngineHelper.getMMPFilesForBuildConfiguration(carbideBuildConfig)) {
-			if (buildComponents == null || EpocEngineHelper.containsStringIgnoreCase(buildComponents, mmpPath.lastSegment()))
+			if (buildComponents == null || TextUtils.listContainsIgnoreCase(buildComponents, mmpPath.lastSegment()))
 				EpocEngineHelper.addIncludedFilesFromMMP(cpi, carbideBuildConfig, mmpPath, pathList);
 		}
 
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManager.java	Tue Jun 23 14:54:20 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildManager.java	Wed Jun 24 10:28:30 2009 -0500
@@ -35,8 +35,7 @@
 import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin;
 import com.nokia.carbide.cpp.sdk.core.ICarbideInstalledSDKChangeListener;
 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
-import com.nokia.cpp.internal.api.utils.core.FileUtils;
-import com.nokia.cpp.internal.api.utils.core.MultiResourceChangeListenerDispatcher;
+import com.nokia.cpp.internal.api.utils.core.*;
 import com.nokia.cpp.internal.api.utils.core.MultiResourceChangeListenerDispatcher.IResourceChangeHandler;
 
 /**
@@ -343,7 +342,7 @@
 				buildComponents = config.getCarbideProject().isBuildingFromInf() ? null : config.getCarbideProject().getInfBuildComponents();
 
 			for (IPath mmpPath : EpocEngineHelper.getMMPFilesForBuildConfiguration(config)) {
-				if (buildComponents == null || EpocEngineHelper.containsStringIgnoreCase(buildComponents, mmpPath.lastSegment()))
+				if (buildComponents == null || TextUtils.listContainsIgnoreCase(buildComponents, mmpPath.lastSegment()))
 					EpocEngineHelper.addIncludedFilesFromMMP(cpi, config, mmpPath, pathList);
 			}
 		}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java	Tue Jun 23 14:54:20 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideLanguageData.java	Wed Jun 24 10:28:30 2009 -0500
@@ -36,6 +36,7 @@
 import com.nokia.carbide.cpp.sdk.core.IBSFPlatform;
 import com.nokia.carbide.cpp.sdk.core.ISBVPlatform;
 import com.nokia.cpp.internal.api.utils.core.FileUtils;
+import com.nokia.cpp.internal.api.utils.core.TextUtils;
 /**
  * Part of the new CDT 4.0 project model requirements.  All this class
  * really does is provide path entries for this build configuration to CDT.
@@ -270,7 +271,7 @@
 		if (cpi.shouldUseMMPMacros()) {
 			List<IPath> mmps = EpocEngineHelper.getMMPFilesForBuildConfiguration(carbideBuildConfig);
 			for (IPath mmp : mmps) {
-				if (buildComponents != null && !EpocEngineHelper.containsStringIgnoreCase(buildComponents, mmp.lastSegment()))
+				if (buildComponents != null && !TextUtils.listContainsIgnoreCase(buildComponents, mmp.lastSegment()))
 					continue;
 				
 				List<String> mmpMacros = EpocEngineHelper.getMMPMacrosForBuildConfiguration(mmp, carbideBuildConfig);
@@ -291,7 +292,7 @@
 		EpocEngineHelper.addIncludedFilesFromBldInf(cpi, carbideBuildConfig, cpi.getAbsoluteBldInfPath(), pathList);
 
 		for (IPath mmpPath : EpocEngineHelper.getMMPFilesForBuildConfiguration(carbideBuildConfig)) {
-			if (buildComponents == null || EpocEngineHelper.containsStringIgnoreCase(buildComponents, mmpPath.lastSegment()))
+			if (buildComponents == null || TextUtils.listContainsIgnoreCase(buildComponents, mmpPath.lastSegment()))
 				EpocEngineHelper.addIncludedFilesFromMMP(cpi, carbideBuildConfig, mmpPath, pathList);
 		}
 
--- a/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SymbianContextTest.java	Tue Jun 23 14:54:20 2009 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core.test/src/com/nokia/carbide/cpp/sdk/core/test/SymbianContextTest.java	Wed Jun 24 10:28:30 2009 -0500
@@ -58,7 +58,7 @@
 		
 		// test that get get the macros
 		List<String> platMacros = contextSDK.getPlatformMacros("WINSCW");
-		assertTrue(platMacros.size() > 0);
+		assertTrue("WINSCW platform macros should be > 0", platMacros.size() > 0);
 		
 		// test that we get the SDK version
 		Version sdkVer = contextSDK.getSDKVersion();
--- a/core/com.nokia.carbide.templatewizard/src/com/nokia/carbide/templatewizard/processes/CopyFiles.java	Tue Jun 23 14:54:20 2009 -0500
+++ b/core/com.nokia.carbide.templatewizard/src/com/nokia/carbide/templatewizard/processes/CopyFiles.java	Wed Jun 24 10:28:30 2009 -0500
@@ -49,6 +49,7 @@
 	protected static final String LOWER_SUFFIX = "$lower"; //$NON-NLS-1$
 	protected static final String TITLE_SUFFIX = "$title"; //$NON-NLS-1$
 	protected static final String TITLELOWER_SUFFIX = "$titlelower"; //$NON-NLS-1$
+	protected static final String C_ESCAPED_SUFFIX = "$c_escaped"; //$NON-NLS-1$
 	protected static final String SOURCE_PATH_ATTRIBUTE = "sourcePath"; //$NON-NLS-1$
 	protected static final String TARGET_PATH_ATTRIBUTE = "targetPath"; //$NON-NLS-1$
 	protected static final String SUBSTITUTE_ATTRIBUTE = "substitute"; //$NON-NLS-1$
@@ -110,6 +111,11 @@
 			public String convert(String value) {
 				return TextUtils.titleCase(value.toLowerCase());
 			}
+		}),
+		new SuffixOperator(C_ESCAPED_SUFFIX, new IConvert() {
+			public String convert(String value) {
+				return TextUtils.escape(value, '\"');
+			}
 		})
 	};
 	
--- a/core/com.nokia.cpp.utils.core/src/com/nokia/cpp/internal/api/utils/core/TextUtils.java	Tue Jun 23 14:54:20 2009 -0500
+++ b/core/com.nokia.cpp.utils.core/src/com/nokia/cpp/internal/api/utils/core/TextUtils.java	Wed Jun 24 10:28:30 2009 -0500
@@ -555,4 +555,20 @@
 		}
 		return builder.toString();
 	}
+
+	/**
+	 * Returns true if s is contained in list when case is ignored.
+	 * 
+	 * @param list
+	 * @param s
+	 * @return boolean
+	 */
+	public static boolean listContainsIgnoreCase(List<String> list, String s) {
+		for (String string : list) {
+			if (string.equalsIgnoreCase(s))
+				return true;
+		}
+		return false;
+	}
+
 }
--- a/templates/com.nokia.carbide.cpp.templates/templates/projecttemplates/S60-PlatsecApp/data/baseName.rls	Tue Jun 23 14:54:20 2009 -0500
+++ b/templates/com.nokia.carbide.cpp.templates/templates/projecttemplates/S60-PlatsecApp/data/baseName.rls	Wed Jun 24 10:28:30 2009 -0500
@@ -34,6 +34,6 @@
 
 #define qtn_about_dialog_title "About"
 
-#define qtn_about_dialog_text "$(baseName) Version 1.0.0\n\nAuthor: $(author)\n\nSupport: $(supportEmail)\n\n(c) $(copyright)"
+#define qtn_about_dialog_text "$(baseName) Version 1.0.0\n\nAuthor: $(author)\n\nSupport: $(supportEmail)\n\n(c) $(copyright$c_escaped)"
 
 // End of File
--- a/templates/com.nokia.carbide.cpp.templates/templates/projecttemplates/S60-TouchUIApplication/data/baseName.rls	Tue Jun 23 14:54:20 2009 -0500
+++ b/templates/com.nokia.carbide.cpp.templates/templates/projecttemplates/S60-TouchUIApplication/data/baseName.rls	Wed Jun 24 10:28:30 2009 -0500
@@ -34,6 +34,6 @@
 
 #define qtn_about_dialog_title "About"
 
-#define qtn_about_dialog_text "$(baseName) Version 1.0.0\n\nAuthor: $(author)\n\nSupport: $(supportEmail)\n\n(c) $(copyright)"
+#define qtn_about_dialog_text "$(baseName) Version 1.0.0\n\nAuthor: $(author)\n\nSupport: $(supportEmail)\n\n(c) $(copyright$c_escaped)"
 
 // End of File