# HG changeset patch # User timkelly # Date 1240243565 18000 # Node ID de4b04f4ec5715c801c0cde554a71ae6bb5b6a08 # Parent 508f2f2592b22c5993e91a1ede1b25cfe7a74792 merge from default. Fix for bug 8902. diff -r 508f2f2592b2 -r de4b04f4ec57 builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java --- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java Mon Apr 20 10:47:45 2009 -0500 +++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java Mon Apr 20 11:06:05 2009 -0500 @@ -27,6 +27,7 @@ import org.eclipse.core.runtime.NullProgressMonitor; import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; +import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo; import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier; @@ -250,6 +251,89 @@ assertEquals(false, readSisInfo.isCreateStubFormat()); } + public void testSBSv1BuildArgsReadWrite(){ + + final String build_ARG = "-testbuild"; + final String clean_ARG = "-testclean"; + final String export_ARG = "-testexport"; + final String final_ARG = "-testfinal"; + final String freeze_ARG = "-testfreeze"; + final String library_ARG = "-testlibrary"; + final String makefile_ARG = "-testmakefile"; + final String resource_ARG = "-testresource"; + final String target_ARG = "-testtarget"; + + ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project); + assertNotNull("Ooops, ICarbideProjectInfo is null, something bad happened.", cpi); + + ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration(); + IBuildArgumentsInfo argInfo = defaultConfig.getBuildArgumentsInfo(); + + // read the arguments + String abldBuildArgs = argInfo.getAbldBuildArgs(); + String abldCleanArgs = argInfo.getAbldCleanArgs(); + String abldExportArgs = argInfo.getAbldExportArgs(); + String abldFinalArgs = argInfo.getAbldFinalArgs(); + String abldFreezeArgs = argInfo.getAbldFreezeArgs(); + String abldLibraryArgs = argInfo.getAbldLibraryArgs(); + String abldMakefileArgs = argInfo.getAbldMakefileArgs(); + String abldResourceArgs = argInfo.getAbldResourceArgs(); + String abldTargetArgs = argInfo.getAbldTargetArgs(); + + abldBuildArgs += build_ARG; + abldCleanArgs += clean_ARG; + abldExportArgs += export_ARG; + abldFinalArgs += final_ARG; + abldFreezeArgs += freeze_ARG; + abldLibraryArgs += library_ARG; + abldMakefileArgs += makefile_ARG; + abldResourceArgs += resource_ARG; + abldTargetArgs += target_ARG; + + // set the argument + argInfo.setAbldBuildArgs(abldBuildArgs); + argInfo.setAbldCleanArgs(abldCleanArgs); + argInfo.setAbldExportArgs(abldExportArgs); + argInfo.setAbldFinalArgs(abldFinalArgs); + argInfo.setAbldFreezeArgs(abldFreezeArgs); + argInfo.setAbldLibraryArgs(abldLibraryArgs); + argInfo.setAbldMakefileArgs(abldMakefileArgs); + argInfo.setAbldResourceArgs(abldResourceArgs); + argInfo.setAbldTargetArgs(abldTargetArgs); + + // make sure to update the entire object + defaultConfig.setBuildArgumentsInfo(argInfo); + + // read the args from memory, make sure it's OK + assertTrue("Failed to re-read build args", argInfo.getAbldBuildArgs().contains(build_ARG)); + assertTrue("Failed to re-read clean args", argInfo.getAbldCleanArgs().contains(clean_ARG)); + assertTrue("Failed to re-read export args", argInfo.getAbldExportArgs().contains(export_ARG)); + assertTrue("Failed to re-read final args", argInfo.getAbldFinalArgs().contains(final_ARG)); + assertTrue("Failed to re-read freeze args", argInfo.getAbldFreezeArgs().contains(freeze_ARG)); + assertTrue("Failed to re-read library args", argInfo.getAbldLibraryArgs().contains(library_ARG)); + assertTrue("Failed to re-read makefile args", argInfo.getAbldMakefileArgs().contains(makefile_ARG)); + assertTrue("Failed to re-read resource args", argInfo.getAbldResourceArgs().contains(resource_ARG)); + assertTrue("Failed to re-read target args", argInfo.getAbldTargetArgs().contains(target_ARG)); + + // now write to files + defaultConfig.saveConfiguration(false); + + // now read again + defaultConfig = cpi.getDefaultConfiguration(); + argInfo = defaultConfig.getBuildArgumentsInfo(); + + // read the args now that were pulled from disk, make sure it's OK + assertTrue("Failed to re-read build args", argInfo.getAbldBuildArgs().contains(build_ARG)); + assertTrue("Failed to re-read clean args", argInfo.getAbldCleanArgs().contains(clean_ARG)); + assertTrue("Failed to re-read export args", argInfo.getAbldExportArgs().contains(export_ARG)); + assertTrue("Failed to re-read final args", argInfo.getAbldFinalArgs().contains(final_ARG)); + assertTrue("Failed to re-read freeze args", argInfo.getAbldFreezeArgs().contains(freeze_ARG)); + assertTrue("Failed to re-read library args", argInfo.getAbldLibraryArgs().contains(library_ARG)); + assertTrue("Failed to re-read makefile args", argInfo.getAbldMakefileArgs().contains(makefile_ARG)); + assertTrue("Failed to re-read resource args", argInfo.getAbldResourceArgs().contains(resource_ARG)); + assertTrue("Failed to re-read target args", argInfo.getAbldTargetArgs().contains(target_ARG)); + } + public void testChangesNotApplied() { ICarbideProjectModifier cpm = CarbideBuilderPlugin.getBuildManager().getProjectModifier(project); cpm.writeProjectSetting(ICarbideProjectInfo.PROJECT_RELATIVE_INFFILE_PROPS_KEY, "test"); diff -r 508f2f2592b2 -r de4b04f4ec57 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IBuildArgumentsInfo.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IBuildArgumentsInfo.java Mon Apr 20 10:47:45 2009 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IBuildArgumentsInfo.java Mon Apr 20 11:06:05 2009 -0500 @@ -18,6 +18,7 @@ /** * IBuildArgumentsInfo represents one instance of configuration data for the Arguments tab. + * This interface only applies for the Symbian 'abld' build system (SBSv1) * @see ICarbideBuildConfiguration */ public interface IBuildArgumentsInfo { @@ -87,4 +88,61 @@ * @return string of arguments which may be empty */ String getAbldFreezeArgs(); + + /** + * Set the arguments to pass to bldmake bldfiles + */ + void setBldmakeBldFilesArgs(String args); + + /** + * Get the arguments to pass to bldmake clean + * @return string of arguments which may be empty + */ + void setBldmakeCleanArgs(String args); + + /** + * Set the arguments to pass to abld build + */ + void setAbldBuildArgs(String args); + + /** + * Set the arguments to pass to abld export + */ + void setAbldExportArgs(String args); + + /** + * Set the arguments to pass to abld freeze + */ + void setAbldFreezeArgs(String args); + + /** + * Set the arguments to pass to abld makefile + */ + void setAbldMakefileArgs(String args); + + /** + * Set the arguments to pass to abld library + */ + void setAbldLibraryArgs(String args); + + /** + * Set the arguments to pass to abld resource + */ + void setAbldResourceArgs(String args); + + /** + * Set the arguments to pass to abld target + */ + void setAbldTargetArgs(String args); + + /** + * Set the arguments to pass to abld final + */ + void setAbldFinalArgs(String args); + + /** + * Set the arguments to pass to abld clean + */ + void setAbldCleanArgs(String args); + } diff -r 508f2f2592b2 -r de4b04f4ec57 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Mon Apr 20 10:47:45 2009 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Mon Apr 20 11:06:05 2009 -0500 @@ -65,12 +65,19 @@ List getSISBuilderInfoList(); /** - * Get the build arguments info. Contains pref settings from the Arguments tab. + * Get the (abld)build arguments info. Contains pref settings from the Arguments tab. + * This only applies when building with SBSv1 (bldmake, abld) * @return IBuildArgumentsInfo instance, never null */ IBuildArgumentsInfo getBuildArgumentsInfo(); /** + * Set the build arguments info for SBSv2 build arguments + * @return IBuildArgumentsInfo instance, never null + */ + void setBuildArgumentsInfo(IBuildArgumentsInfo bldArgInfo); + + /** * Get the parent Carbide project of this configuration. * @return ICarbideProjectInfo */ diff -r 508f2f2592b2 -r de4b04f4ec57 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildArgumentsInfo.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildArgumentsInfo.java Mon Apr 20 10:47:45 2009 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildArgumentsInfo.java Mon Apr 20 11:06:05 2009 -0500 @@ -232,4 +232,54 @@ public String getAbldFreezeArgs() { return abldFreezeArgs; } + + public void setBldmakeBldFilesArgs(String args) { + bldmakeBldFilesArgs = args; + } + + public void setAbldBuildArgs(String args) { + abldBuildArgs = args; + } + + public void setAbldCleanArgs(String args) { + abldCleanArgs = args; + } + + public void setAbldExportArgs(String args) { + abldExportArgs = args; + } + + public void setAbldFreezeArgs(String args) { + abldFreezeArgs = args; + } + + public void setAbldFinalArgs(String args) { + abldFinalArgs = args; + + } + + public void setAbldLibraryArgs(String args) { + abldLibraryArgs = args; + } + + public void setAbldMakefileArgs(String args) { + abldMakefileArgs = args; + } + + public void setAbldResourceArgs(String args) { + abldResourceArgs = args; + } + + public void setAbldTargetArgs(String args) { + abldTargetArgs = args; + + } + + public void setBldmakeCleanArgs(String args) { + abldBuildArgs = args; + + } + + + } diff -r 508f2f2592b2 -r de4b04f4ec57 carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm --- a/carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm Mon Apr 20 10:47:45 2009 -0500 +++ b/carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm Mon Apr 20 11:06:05 2009 -0500 @@ -53,6 +53,15 @@ enums in, mark them @Deprecated, and add the correct ones, since this would violate uniqueness in the EMMPLanguage#values() array.) + +

Since Carbide 2.0.4

+ + +

Deprecated APIs

The following Carbide APIs have been deprecated and should not be used anymore. Please see the JavaDoc for these classes and methods for more information.

Since Carbide 1.2.0