Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
--- a/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java Tue Apr 21 01:15:45 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder.test/src/com/nokia/carbide/cdt/builder/test/ProjectPropertiesTest.java Tue Apr 21 14:51:39 2009 -0500
@@ -26,6 +26,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.NullProgressMonitor;
+import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
@@ -267,72 +268,75 @@
assertNotNull("Ooops, ICarbideProjectInfo is null, something bad happened.", cpi);
ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
- IBuildArgumentsInfo argInfo = defaultConfig.getBuildArgumentsInfo();
+ BuildArgumentsInfo argInfoCopyOrig = defaultConfig.getBuildArgumentsInfoCopy();
+ BuildArgumentsInfo argInfoCopyMod = defaultConfig.getBuildArgumentsInfoCopy();
+
+ // Just sanity check to make sure deprecated methods still exist.
+ IBuildArgumentsInfo testDeprecation = defaultConfig.getBuildArgumentsInfo();
+ String test = testDeprecation.getAbldBuildArgs();
+
// 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;
+ argInfoCopyMod.abldBuildArgs += build_ARG;
+ argInfoCopyMod.abldCleanArgs += clean_ARG;
+ argInfoCopyMod.abldExportArgs += export_ARG;
+ argInfoCopyMod.abldFinalArgs += final_ARG;
+ argInfoCopyMod.abldFreezeArgs += freeze_ARG;
+ argInfoCopyMod.abldLibraryArgs += library_ARG;
+ argInfoCopyMod.abldMakefileArgs += makefile_ARG;
+ argInfoCopyMod.abldResourceArgs += resource_ARG;
+ argInfoCopyMod.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);
+ defaultConfig.setBuildArgumentsInfo(argInfoCopyMod);
// 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));
+ BuildArgumentsInfo argInfoCopyVerify = defaultConfig.getBuildArgumentsInfoCopy();
+ assertTrue("Failed to re-read build args", argInfoCopyVerify.abldBuildArgs.contains(build_ARG));
+ assertTrue("Failed to re-read clean args", argInfoCopyVerify.abldCleanArgs.contains(clean_ARG));
+ assertTrue("Failed to re-read export args", argInfoCopyVerify.abldExportArgs.contains(export_ARG));
+ assertTrue("Failed to re-read final args", argInfoCopyVerify.abldFinalArgs.contains(final_ARG));
+ assertTrue("Failed to re-read freeze args", argInfoCopyVerify.abldFreezeArgs.contains(freeze_ARG));
+ assertTrue("Failed to re-read library args", argInfoCopyVerify.abldLibraryArgs.contains(library_ARG));
+ assertTrue("Failed to re-read makefile args", argInfoCopyVerify.abldMakefileArgs.contains(makefile_ARG));
+ assertTrue("Failed to re-read resource args", argInfoCopyVerify.abldResourceArgs.contains(resource_ARG));
+ assertTrue("Failed to re-read target args", argInfoCopyVerify.abldTargetArgs.contains(target_ARG));
// now write to files
defaultConfig.saveConfiguration(false);
// now read again
- defaultConfig = cpi.getDefaultConfiguration();
- argInfo = defaultConfig.getBuildArgumentsInfo();
+
+ // no work, how to know if it loads from disk....
+ BuildArgumentsInfo argInfoFromDisk = defaultConfig.getBuildArgumentsInfoCopy();
// 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));
- }
+ assertTrue("Failed to re-read build args", argInfoCopyVerify.abldBuildArgs.contains(build_ARG));
+ assertTrue("Failed to re-read clean args", argInfoCopyVerify.abldCleanArgs.contains(clean_ARG));
+ assertTrue("Failed to re-read export args", argInfoCopyVerify.abldExportArgs.contains(export_ARG));
+ assertTrue("Failed to re-read final args", argInfoCopyVerify.abldFinalArgs.contains(final_ARG));
+ assertTrue("Failed to re-read freeze args", argInfoCopyVerify.abldFreezeArgs.contains(freeze_ARG));
+ assertTrue("Failed to re-read library args", argInfoCopyVerify.abldLibraryArgs.contains(library_ARG));
+ assertTrue("Failed to re-read makefile args", argInfoCopyVerify.abldMakefileArgs.contains(makefile_ARG));
+ assertTrue("Failed to re-read resource args", argInfoCopyVerify.abldResourceArgs.contains(resource_ARG));
+ assertTrue("Failed to re-read target args", argInfoCopyVerify.abldTargetArgs.contains(target_ARG));
+
+ // Now restore the settings, write to disk and verify
+ defaultConfig.setBuildArgumentsInfo(argInfoCopyOrig);
+ defaultConfig.saveConfiguration(false); // write to disk
+ defaultConfig = cpi.getDefaultConfiguration();
+ argInfoCopyVerify = defaultConfig.getBuildArgumentsInfoCopy();
+ assertFalse("Failed to re-read build args after restore", argInfoCopyVerify.abldBuildArgs.contains(build_ARG));
+ assertFalse("Failed to re-read clean args after restore", argInfoCopyVerify.abldCleanArgs.contains(clean_ARG));
+ assertFalse("Failed to re-read export args after restore", argInfoCopyVerify.abldExportArgs.contains(export_ARG));
+ assertFalse("Failed to re-read final args after restore", argInfoCopyVerify.abldFinalArgs.contains(final_ARG));
+ assertFalse("Failed to re-read freeze args after restore", argInfoCopyVerify.abldFreezeArgs.contains(freeze_ARG));
+ assertFalse("Failed to re-read library args after restore", argInfoCopyVerify.abldLibraryArgs.contains(library_ARG));
+ assertFalse("Failed to re-read makefile args after restore", argInfoCopyVerify.abldMakefileArgs.contains(makefile_ARG));
+ assertFalse("Failed to re-read resource args after restore", argInfoCopyVerify.abldResourceArgs.contains(resource_ARG));
+ assertFalse("Failed to re-read target args after restore", argInfoCopyVerify.abldTargetArgs.contains(target_ARG));
+
+ }
public void testChangesNotApplied() {
ICarbideProjectModifier cpm = CarbideBuilderPlugin.getBuildManager().getProjectModifier(project);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/BuildArgumentsInfo.java Tue Apr 21 14:51:39 2009 -0500
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+package com.nokia.carbide.cdt.builder;
+
+import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
+import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
+
+/*
+ * Wrapper for the build arguments settings in Carbide Build Configuration preferences
+ */
+public class BuildArgumentsInfo implements IBuildArgumentsInfo {
+
+ public static final String BLDMAKEBLDFILESARGSSTORAGE = "BLDMAKEBLDFILESARGSSTORAGE"; //$NON-NLS-1$
+ public static final String BLDMAKECLEANARGSSTORAGE = "BLDMAKECLEANARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDBUILDARGSSTORAGE = "ABLDBUILDARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDEXPORTARGSSTORAGE = "ABLDEXPORTARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDMAKEFILEARGSSTORAGE = "ABLDMAKEFILEARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDLIBRARYARGSSTORAGE = "ABLDLIBRARYARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDRESOURCEARGSSTORAGE = "ABLDRESOURCEARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDTARGETARGSSTORAGE = "ABLDTARGETARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDFINALARGSSTORAGE = "ABLDFINALARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDCLEANARGSSTORAGE = "ABLDCLEANARGSSTORAGE"; //$NON-NLS-1$
+ public static final String ABLDFREEZEARGSSTORAGE = "ABLDFREEZEARGSSTORAGE"; //$NON-NLS-1$
+
+
+ public String bldmakeBldFilesArgs;
+ public String bldmakeCleanArgs;
+ public String abldBuildArgs;
+ public String abldExportArgs;
+ public String abldMakefileArgs;
+ public String abldLibraryArgs;
+ public String abldResourceArgs;
+ public String abldTargetArgs;
+ public String abldFinalArgs;
+ public String abldCleanArgs;
+ public String abldFreezeArgs;
+
+
+ public BuildArgumentsInfo(ISymbianSDK sdk) {
+
+ this.bldmakeBldFilesArgs = ""; //$NON-NLS-1$
+ this.bldmakeCleanArgs = ""; //$NON-NLS-1$
+ this.abldBuildArgs = ""; //$NON-NLS-1$
+ this.abldExportArgs = ""; //$NON-NLS-1$
+ this.abldMakefileArgs = ""; //$NON-NLS-1$
+ this.abldLibraryArgs = ""; //$NON-NLS-1$
+ this.abldResourceArgs = ""; //$NON-NLS-1$
+ this.abldTargetArgs = ""; //$NON-NLS-1$
+ this.abldFinalArgs = ""; //$NON-NLS-1$
+ this.abldCleanArgs = ""; //$NON-NLS-1$
+ this.abldFreezeArgs = ""; //$NON-NLS-1$
+
+ if (sdk.isEKA2()) {
+ this.abldFreezeArgs = "-r"; //$NON-NLS-1$
+
+ }
+ }
+
+ public BuildArgumentsInfo(String bldmakeBldFilesArgs, String bldmakeCleanArgs, String abldBuildArgs, String abldExportArgs,
+ String abldMakefileArgs, String abldLibraryArgs, String abldResourceArgs, String abldTargetArgs, String abldFinalArgs,
+ String abldCleanArgs, String abldFreezeArgs) {
+
+ this.bldmakeBldFilesArgs = bldmakeBldFilesArgs;
+ this.bldmakeCleanArgs = bldmakeCleanArgs;
+ this.abldBuildArgs = abldBuildArgs;
+ this.abldExportArgs = abldExportArgs;
+ this.abldMakefileArgs = abldMakefileArgs;
+ this.abldLibraryArgs = abldLibraryArgs;
+ this.abldResourceArgs = abldResourceArgs;
+ this.abldTargetArgs = abldTargetArgs;
+ this.abldFinalArgs = abldFinalArgs;
+ this.abldCleanArgs = abldCleanArgs;
+ this.abldFreezeArgs = abldFreezeArgs;
+ }
+
+ public BuildArgumentsInfo(BuildArgumentsInfo argInfo) {
+
+ this.bldmakeBldFilesArgs = argInfo.bldmakeBldFilesArgs;
+ this.bldmakeCleanArgs = argInfo.bldmakeCleanArgs;
+ this.abldBuildArgs = argInfo.abldBuildArgs;
+ this.abldExportArgs = argInfo.abldExportArgs;
+ this.abldMakefileArgs = argInfo.abldMakefileArgs;
+ this.abldLibraryArgs = argInfo.abldLibraryArgs;
+ this.abldResourceArgs = argInfo.abldResourceArgs;
+ this.abldTargetArgs = argInfo.abldTargetArgs;
+ this.abldFinalArgs = argInfo.abldFinalArgs;
+ this.abldCleanArgs = argInfo.abldCleanArgs;
+ this.abldFreezeArgs = argInfo.abldFreezeArgs;
+ }
+
+ public String getBldmakeBldFilesArgs() {
+ return bldmakeBldFilesArgs;
+ }
+
+ public String getBldmakeCleanArgs() {
+ return bldmakeCleanArgs;
+ }
+
+ public String getAbldBuildArgs() {
+ return abldBuildArgs;
+ }
+
+ public String getAbldExportArgs() {
+ return abldExportArgs;
+ }
+
+ public String getAbldMakefileArgs() {
+ return abldMakefileArgs;
+ }
+
+ public String getAbldLibraryArgs() {
+ return abldLibraryArgs;
+ }
+
+ public String getAbldResourceArgs() {
+ return abldResourceArgs;
+ }
+
+ public String getAbldTargetArgs() {
+ return abldTargetArgs;
+ }
+
+ public String getAbldFinalArgs() {
+ return abldFinalArgs;
+ }
+
+ public String getAbldCleanArgs() {
+ return abldCleanArgs;
+ }
+
+ public String getAbldFreezeArgs() {
+ return abldFreezeArgs;
+ }
+
+}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IBuildArgumentsInfo.java Tue Apr 21 01:15:45 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/IBuildArgumentsInfo.java Tue Apr 21 14:51:39 2009 -0500
@@ -20,6 +20,9 @@
* IBuildArgumentsInfo represents one instance of configuration data for the Arguments tab.
* This interface only applies for the Symbian 'abld' build system (SBSv1)
* @see ICarbideBuildConfiguration
+ *
+ * @deprecated use BuildArgumentsInfo directly
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface IBuildArgumentsInfo {
@@ -88,61 +91,4 @@
* @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);
-
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Tue Apr 21 01:15:45 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/project/ICarbideBuildConfiguration.java Tue Apr 21 14:51:39 2009 -0500
@@ -18,12 +18,14 @@
import java.util.List;
+import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
/**
* An ICarbideBuildConfiguration interface represents on buildable target for a project. A single
* Carbide.c++ project (ICarbideProjectInfo) contains 1 to N ICarbideBuildConfigation objects.
*
+ * @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICarbideBuildConfiguration extends ISymbianBuildContext {
@@ -68,14 +70,24 @@
* 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
+ *
+ * @deprecated use
*/
IBuildArgumentsInfo getBuildArgumentsInfo();
/**
- * Set the build arguments info for SBSv2 build arguments
+ * Get the (abld)build arguments info. Contains pref settings from the Arguments tab.
+ * This only applies when building with SBSv1 (bldmake, abld)
+ * @return A copy of BuildArgumentsInfo instance, never null
+ */
+ BuildArgumentsInfo getBuildArgumentsInfoCopy();
+
+ /**
+ * Set the build arguments info for SBSv2 build arguments. This only sets values in memory, does
+ * not write settings to disk. See
* @return IBuildArgumentsInfo instance, never null
*/
- void setBuildArgumentsInfo(IBuildArgumentsInfo bldArgInfo);
+ void setBuildArgumentsInfo(BuildArgumentsInfo bldArgInfo);
/**
* Get the parent Carbide project of this configuration.
@@ -111,5 +123,10 @@
* @return
*/
IROMBuilderInfo getROMBuildInfo();
-
+
+ /**
+ * Compares two configurations to see if their display names are equivalent.
+ */
+ boolean equals(Object obj);
+
}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java Tue Apr 21 01:15:45 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/api/builder/CarbideConfigurationDataProvider.java Tue Apr 21 14:51:39 2009 -0500
@@ -40,13 +40,13 @@
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
+import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier;
import com.nokia.carbide.cdt.builder.project.IEnvironmentVariable;
import com.nokia.carbide.cdt.builder.project.IEnvironmentVarsInfo;
-import com.nokia.carbide.cdt.internal.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.internal.builder.BuildConfigurationData;
import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
import com.nokia.carbide.cdt.internal.builder.CarbideProjectInfo;
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildArgumentsInfo.java Tue Apr 21 01:15:45 2009 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,285 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-package com.nokia.carbide.cdt.internal.builder;
-
-import org.eclipse.cdt.core.settings.model.ICStorageElement;
-
-import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
-import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
-
-public class BuildArgumentsInfo implements IBuildArgumentsInfo {
-
- private static final String BLDMAKEBLDFILESARGSSTORAGE = "BLDMAKEBLDFILESARGSSTORAGE"; //$NON-NLS-1$
- private static final String BLDMAKECLEANARGSSTORAGE = "BLDMAKECLEANARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDBUILDARGSSTORAGE = "ABLDBUILDARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDEXPORTARGSSTORAGE = "ABLDEXPORTARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDMAKEFILEARGSSTORAGE = "ABLDMAKEFILEARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDLIBRARYARGSSTORAGE = "ABLDLIBRARYARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDRESOURCEARGSSTORAGE = "ABLDRESOURCEARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDTARGETARGSSTORAGE = "ABLDTARGETARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDFINALARGSSTORAGE = "ABLDFINALARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDCLEANARGSSTORAGE = "ABLDCLEANARGSSTORAGE"; //$NON-NLS-1$
- private static final String ABLDFREEZEARGSSTORAGE = "ABLDFREEZEARGSSTORAGE"; //$NON-NLS-1$
-
-
- private String bldmakeBldFilesArgs;
- private String bldmakeCleanArgs;
- private String abldBuildArgs;
- private String abldExportArgs;
- private String abldMakefileArgs;
- private String abldLibraryArgs;
- private String abldResourceArgs;
- private String abldTargetArgs;
- private String abldFinalArgs;
- private String abldCleanArgs;
- private String abldFreezeArgs;
-
-
- public BuildArgumentsInfo(ISymbianSDK sdk) {
-
- this.bldmakeBldFilesArgs = ""; //$NON-NLS-1$
- this.bldmakeCleanArgs = ""; //$NON-NLS-1$
- this.abldBuildArgs = ""; //$NON-NLS-1$
- this.abldExportArgs = ""; //$NON-NLS-1$
- this.abldMakefileArgs = ""; //$NON-NLS-1$
- this.abldLibraryArgs = ""; //$NON-NLS-1$
- this.abldResourceArgs = ""; //$NON-NLS-1$
- this.abldTargetArgs = ""; //$NON-NLS-1$
- this.abldFinalArgs = ""; //$NON-NLS-1$
- this.abldCleanArgs = ""; //$NON-NLS-1$
- this.abldFreezeArgs = ""; //$NON-NLS-1$
-
- if (sdk.isEKA2()) {
- this.abldFreezeArgs = "-r"; //$NON-NLS-1$
-
- }
- }
-
- public BuildArgumentsInfo(String bldmakeBldFilesArgs, String bldmakeCleanArgs, String abldBuildArgs, String abldExportArgs,
- String abldMakefileArgs, String abldLibraryArgs, String abldResourceArgs, String abldTargetArgs, String abldFinalArgs,
- String abldCleanArgs, String abldFreezeArgs) {
-
- this.bldmakeBldFilesArgs = bldmakeBldFilesArgs;
- this.bldmakeCleanArgs = bldmakeCleanArgs;
- this.abldBuildArgs = abldBuildArgs;
- this.abldExportArgs = abldExportArgs;
- this.abldMakefileArgs = abldMakefileArgs;
- this.abldLibraryArgs = abldLibraryArgs;
- this.abldResourceArgs = abldResourceArgs;
- this.abldTargetArgs = abldTargetArgs;
- this.abldFinalArgs = abldFinalArgs;
- this.abldCleanArgs = abldCleanArgs;
- this.abldFreezeArgs = abldFreezeArgs;
- }
-
- public void loadFromStorage(ICStorageElement rootStorage) {
- String value = rootStorage.getAttribute(BLDMAKEBLDFILESARGSSTORAGE);
- if (value != null) {
- bldmakeBldFilesArgs = value;
- }
-
- value = rootStorage.getAttribute(BLDMAKECLEANARGSSTORAGE);
- if (value != null) {
- bldmakeCleanArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDBUILDARGSSTORAGE);
- if (value != null) {
- abldBuildArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDEXPORTARGSSTORAGE);
- if (value != null) {
- abldExportArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDMAKEFILEARGSSTORAGE);
- if (value != null) {
- abldMakefileArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDLIBRARYARGSSTORAGE);
- if (value != null) {
- abldLibraryArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDRESOURCEARGSSTORAGE);
- if (value != null) {
- abldResourceArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDTARGETARGSSTORAGE);
- if (value != null) {
- abldTargetArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDFINALARGSSTORAGE);
- if (value != null) {
- abldFinalArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDCLEANARGSSTORAGE);
- if (value != null) {
- abldCleanArgs = value;
- }
-
- value = rootStorage.getAttribute(ABLDFREEZEARGSSTORAGE);
- if (value != null) {
- abldFreezeArgs = value;
- }
- }
-
- public void saveToStorage(ICStorageElement rootStorage) {
- if (bldmakeBldFilesArgs.trim().length() > 0) {
- rootStorage.setAttribute(BLDMAKEBLDFILESARGSSTORAGE, bldmakeBldFilesArgs);
- }
-
- if (bldmakeCleanArgs.trim().length() > 0) {
- rootStorage.setAttribute(BLDMAKECLEANARGSSTORAGE, bldmakeCleanArgs);
- }
-
- if (abldBuildArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDBUILDARGSSTORAGE, abldBuildArgs);
- }
-
- if (abldExportArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDEXPORTARGSSTORAGE, abldExportArgs);
- }
-
- if (abldMakefileArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDMAKEFILEARGSSTORAGE, abldMakefileArgs);
- }
-
- if (abldLibraryArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDLIBRARYARGSSTORAGE, abldLibraryArgs);
- }
-
- if (abldResourceArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDRESOURCEARGSSTORAGE, abldResourceArgs);
- }
-
- if (abldTargetArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDTARGETARGSSTORAGE, abldTargetArgs);
- }
-
- if (abldFinalArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDFINALARGSSTORAGE, abldFinalArgs);
- }
-
- if (abldCleanArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDCLEANARGSSTORAGE, abldCleanArgs);
- }
-
- if (abldFreezeArgs.trim().length() > 0) {
- rootStorage.setAttribute(ABLDFREEZEARGSSTORAGE, abldFreezeArgs);
- }
- }
-
- public String getBldmakeBldFilesArgs() {
- return bldmakeBldFilesArgs;
- }
-
- public String getBldmakeCleanArgs() {
- return bldmakeCleanArgs;
- }
-
- public String getAbldBuildArgs() {
- return abldBuildArgs;
- }
-
- public String getAbldExportArgs() {
- return abldExportArgs;
- }
-
- public String getAbldMakefileArgs() {
- return abldMakefileArgs;
- }
-
- public String getAbldLibraryArgs() {
- return abldLibraryArgs;
- }
-
- public String getAbldResourceArgs() {
- return abldResourceArgs;
- }
-
- public String getAbldTargetArgs() {
- return abldTargetArgs;
- }
-
- public String getAbldFinalArgs() {
- return abldFinalArgs;
- }
-
- public String getAbldCleanArgs() {
- return abldCleanArgs;
- }
-
- 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;
-
- }
-
-
-
-}
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Tue Apr 21 01:15:45 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java Tue Apr 21 14:51:39 2009 -0500
@@ -32,6 +32,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
+import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
@@ -91,7 +92,7 @@
} else if (se.getName().equals(ENV_VAR_DATA_ID)) {
envVarsInfo.loadFromStorage(se);
} else if (se.getName().equals(ARGUMENTS_DATA_ID)) {
- buildArgumentsInfo.loadFromStorage(se);
+ loadBuildArgsFromStorage(se);
} else if (se.getName().equals(ROM_BUILDER_DATA_ID)) {
romBuilderInfo.loadFromStorage(se);
}
@@ -112,11 +113,114 @@
}
envVarsInfo.saveToStorage(rootStorage.createChild(ENV_VAR_DATA_ID));
- buildArgumentsInfo.saveToStorage(rootStorage.createChild(ARGUMENTS_DATA_ID));
+ saveBuildArgsToStorage(rootStorage.createChild(ARGUMENTS_DATA_ID));
romBuilderInfo.saveToStorage(rootStorage.createChild(ROM_BUILDER_DATA_ID));
}
}
+
+ private void loadBuildArgsFromStorage(ICStorageElement rootStorage) {
+ String value = rootStorage.getAttribute(BuildArgumentsInfo.BLDMAKEBLDFILESARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.bldmakeBldFilesArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.BLDMAKECLEANARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.bldmakeCleanArgs = value;
+ }
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDBUILDARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldBuildArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDEXPORTARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldExportArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDMAKEFILEARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldMakefileArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDLIBRARYARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldLibraryArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDRESOURCEARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldResourceArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDTARGETARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldTargetArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDFINALARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldFinalArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDCLEANARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldCleanArgs = value;
+ }
+
+ value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDFREEZEARGSSTORAGE);
+ if (value != null) {
+ buildArgumentsInfo.abldFreezeArgs = value;
+ }
+ }
+
+ public void saveBuildArgsToStorage(ICStorageElement rootStorage) {
+ if (buildArgumentsInfo.bldmakeBldFilesArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.BLDMAKEBLDFILESARGSSTORAGE, buildArgumentsInfo.bldmakeBldFilesArgs);
+ }
+
+ if (buildArgumentsInfo.bldmakeCleanArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.BLDMAKECLEANARGSSTORAGE, buildArgumentsInfo.bldmakeCleanArgs);
+ }
+
+ if (buildArgumentsInfo.abldBuildArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDBUILDARGSSTORAGE, buildArgumentsInfo.abldBuildArgs);
+ }
+
+ if (buildArgumentsInfo.abldExportArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDEXPORTARGSSTORAGE, buildArgumentsInfo.abldExportArgs);
+ }
+
+ if (buildArgumentsInfo.abldMakefileArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDMAKEFILEARGSSTORAGE, buildArgumentsInfo.abldMakefileArgs);
+ }
+
+ if (buildArgumentsInfo.abldLibraryArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDLIBRARYARGSSTORAGE, buildArgumentsInfo.abldLibraryArgs);
+ }
+
+ if (buildArgumentsInfo.abldResourceArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDRESOURCEARGSSTORAGE, buildArgumentsInfo.abldResourceArgs);
+ }
+
+ if (buildArgumentsInfo.abldTargetArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDTARGETARGSSTORAGE, buildArgumentsInfo.abldTargetArgs);
+ }
+
+ if (buildArgumentsInfo.abldFinalArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDFINALARGSSTORAGE, buildArgumentsInfo.abldFinalArgs);
+ }
+
+ if (buildArgumentsInfo.abldCleanArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDCLEANARGSSTORAGE, buildArgumentsInfo.abldCleanArgs);
+ }
+
+ if (buildArgumentsInfo.abldFreezeArgs.trim().length() > 0) {
+ rootStorage.setAttribute(BuildArgumentsInfo.ABLDFREEZEARGSSTORAGE, buildArgumentsInfo.abldFreezeArgs);
+ }
+ }
+
public ICarbideProjectInfo getCarbideProject() {
// we need to get the project info from the build manager to ensure we
// have the correct object.
@@ -166,10 +270,6 @@
}
}
- @Override
- /**
- * Compares two configurations to see if their display names are equivalent
- */
public boolean equals(Object obj) {
if (obj instanceof ICarbideBuildConfiguration || obj instanceof ISymbianBuildContext){
ISymbianBuildContext context = (ISymbianBuildContext)obj;
@@ -260,13 +360,15 @@
}
public IBuildArgumentsInfo getBuildArgumentsInfo() {
- return buildArgumentsInfo;
+ return (IBuildArgumentsInfo)buildArgumentsInfo;
}
- public void setBuildArgumentsInfo(IBuildArgumentsInfo buildArgumentsInfo) {
- if (buildArgumentsInfo instanceof BuildArgumentsInfo) {
- this.buildArgumentsInfo = (BuildArgumentsInfo)buildArgumentsInfo;
- }
+ public BuildArgumentsInfo getBuildArgumentsInfoCopy() {
+ return new BuildArgumentsInfo(buildArgumentsInfo);
+ }
+
+ public void setBuildArgumentsInfo(BuildArgumentsInfo buildArgumentsInfo) {
+ this.buildArgumentsInfo = buildArgumentsInfo;
}
public IROMBuilderInfo getROMBuildInfo() {
--- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ArgumentsTabComposite.java Tue Apr 21 01:15:45 2009 -0500
+++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/ui/ArgumentsTabComposite.java Tue Apr 21 14:51:39 2009 -0500
@@ -25,9 +25,9 @@
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;
+import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
-import com.nokia.carbide.cdt.internal.builder.BuildArgumentsInfo;
import com.nokia.carbide.cdt.internal.builder.CarbideBuildConfiguration;
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;