builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideBuildConfiguration.java
author timkelly
Fri, 02 Apr 2010 15:38:50 -0500
changeset 1156 1ae1b4979954
parent 1138 352c0236f181
child 1217 51047d48bcd8
permissions -rw-r--r--
bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     1
/*
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     3
* All rights reserved.
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     5
* under the terms of the License "Eclipse Public License v1.0"
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     8
*
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    11
*
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    12
* Contributors:
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    13
*
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    14
* Description: 
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    15
*
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    16
*/
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    17
package com.nokia.carbide.cdt.internal.builder;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    18
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    19
import java.util.ArrayList;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    20
import java.util.List;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    21
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    22
import org.eclipse.cdt.core.CCorePlugin;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    23
import org.eclipse.cdt.core.model.CoreModel;
854
a7d9320cd85e Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
timkelly
parents: 853
diff changeset
    24
import org.eclipse.cdt.core.settings.model.CMacroEntry;
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    25
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    26
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    27
import org.eclipse.cdt.core.settings.model.ICStorageElement;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    28
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    29
import org.eclipse.core.resources.IMarker;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    30
import org.eclipse.core.resources.IProject;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    31
import org.eclipse.core.runtime.CoreException;
853
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
    32
import org.eclipse.core.runtime.IPath;
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    33
import org.eclipse.core.runtime.IStatus;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    34
import org.eclipse.core.runtime.NullProgressMonitor;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    35
import org.eclipse.core.runtime.Status;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    36
109
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
    37
import com.nokia.carbide.cdt.builder.BuildArgumentsInfo;
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    38
import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
853
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
    39
import com.nokia.carbide.cdt.builder.EpocEngineHelper;
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    40
import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    41
import com.nokia.carbide.cdt.builder.project.IBuildArgumentsInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    42
import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    43
import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    44
import com.nokia.carbide.cdt.builder.project.IEnvironmentVarsInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    45
import com.nokia.carbide.cdt.builder.project.IROMBuilderInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    46
import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    47
import com.nokia.carbide.cdt.internal.api.builder.SISBuilderInfo2;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    48
import com.nokia.carbide.cpp.internal.api.sdk.SDKManagerInternalAPI;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    49
import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    50
import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    51
import com.nokia.carbide.cpp.sdk.core.ISymbianSDK;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    52
import com.nokia.cpp.internal.api.utils.core.TrackedResource;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    53
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    54
public class CarbideBuildConfiguration extends SymbianBuildContext implements ICarbideBuildConfiguration {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    55
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    56
	static final String NOT_INSTALLED = "(SDK not found)"; //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    57
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    58
	protected static final String CARBIDE_STORAGE_ID = "CarbideConfigurationDataProvider"; //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    59
	protected final static String SIS_BUILDER_DATA_ID = "SIS_BUILDER_DATA_ID"; //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    60
	protected final static String ENV_VAR_DATA_ID = "ENV_VAR_DATA_ID"; //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    61
	protected final static String ARGUMENTS_DATA_ID = "ARGUMENTS_DATA_ID"; //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    62
	protected final static String ROM_BUILDER_DATA_ID = "ROM_BUILDER_DATA_ID"; //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    63
	
1156
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
    64
	// SBSv2 only config settings 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
    65
	protected final static String SBSV2_DATA_ID = "SBSV2_DATA_ID"; //$NON-NLS-1$ 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
    66
	protected final static String ATRRIB_CONFIG_BASE_PLATFORM = "CONFIG_BASE_PLATFORM"; //$NON-NLS-1$ 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
    67
	protected final static String ATTRIB_CONFIG_TARGET = "CONFIG_TARGET"; //$NON-NLS-1$ 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
    68
	protected final static String ATTRIB_SBSV2_BUILD_ALIAS = "SBSV2_BUILD_ALIAS"; //$NON-NLS-1$ 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
    69
	protected final static String ATTRIB_SBSV2_CONFIG_DISPLAY_STRING = "SBSV2_CONFIG_DISPLAY_STRING"; //$NON-NLS-1$ 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
    70
	
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    71
	protected TrackedResource projectTracker;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    72
	protected List<ISISBuilderInfo> sisBuilderInfoList;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    73
	protected EnvironmentVarsInfo2 envVarsInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    74
	protected BuildArgumentsInfo buildArgumentsInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    75
	protected BuildConfigurationData buildConfigData;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    76
	protected ROMBuilderInfo romBuilderInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    77
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    78
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    79
	public CarbideBuildConfiguration(IProject project, ISymbianBuildContext context) {
1134
081b99cb271a bug 10674. Add support for long alias names from Carbide.xml (initial support)
timkelly
parents: 854
diff changeset
    80
		super(context.getSDK(), context.getPlatformString(), context.getTargetString(), context.getSBSv2Alias());
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    81
		projectTracker = new TrackedResource(project);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    82
		sisBuilderInfoList = new ArrayList<ISISBuilderInfo>(0);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    83
		envVarsInfo = new EnvironmentVarsInfo2(project, context);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    84
		buildArgumentsInfo = new BuildArgumentsInfo(getSDK());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    85
		buildConfigData = new BuildConfigurationData(this);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    86
		romBuilderInfo = new ROMBuilderInfo(getSDK());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    87
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    88
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    89
	public void loadFromStorage(ICConfigurationDescription projDes) throws CoreException {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    90
		// get the storage for our data
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    91
		ICStorageElement rootStorage = projDes.getStorage(CARBIDE_STORAGE_ID, false);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    92
		if (rootStorage != null) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    93
			for (ICStorageElement se : rootStorage.getChildren()) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    94
				if (se.getName().equals(SIS_BUILDER_DATA_ID)) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    95
					SISBuilderInfo2 sisInfo = new SISBuilderInfo2(projectTracker.getProject());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    96
					sisInfo.loadFromStorage(se);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    97
					
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    98
					// ignore old 1.2.x style entries
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    99
					if (!sisInfo.getPKGFileString().equals("(none)")) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   100
						sisBuilderInfoList.add(sisInfo);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   101
					}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   102
				} else if (se.getName().equals(ENV_VAR_DATA_ID)) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   103
					envVarsInfo.loadFromStorage(se);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   104
				} else if (se.getName().equals(ARGUMENTS_DATA_ID)) {
109
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   105
					loadBuildArgsFromStorage(se);
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   106
				} else if (se.getName().equals(ROM_BUILDER_DATA_ID)) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   107
					romBuilderInfo.loadFromStorage(se);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   108
				}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   109
			}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   110
		} else {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   111
			throw new CoreException(new Status(IStatus.ERROR, CarbideBuilderPlugin.PLUGIN_ID, IStatus.OK, "Unable to load Carbide settings for project " + projectTracker.getProject().getName() + ", " + getDisplayString(), null));
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   112
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   113
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   114
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   115
	public void saveToStorage(ICConfigurationDescription configDes) throws CoreException {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   116
		ICStorageElement rootStorage = configDes.getStorage(CARBIDE_STORAGE_ID, true);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   117
		if (rootStorage != null) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   118
			rootStorage.clear();
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   119
			
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   120
			for (ISISBuilderInfo sisInfo : sisBuilderInfoList) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   121
				SISBuilderInfo2 info = (SISBuilderInfo2)sisInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   122
				info.saveToStorage(rootStorage.createChild(SIS_BUILDER_DATA_ID));
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   123
			}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   124
			
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   125
			envVarsInfo.saveToStorage(rootStorage.createChild(ENV_VAR_DATA_ID));
109
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   126
			saveBuildArgsToStorage(rootStorage.createChild(ARGUMENTS_DATA_ID));
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   127
			romBuilderInfo.saveToStorage(rootStorage.createChild(ROM_BUILDER_DATA_ID));
1156
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   128
			
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   129
			if (getSBSv2Alias() != null){ 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   130
				saveSBSv2DataToStorage(rootStorage.createChild(SBSV2_DATA_ID)); 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   131
			}
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   132
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   133
	}
109
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   134
	
1156
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   135
	private void saveSBSv2DataToStorage(ICStorageElement createChild) {
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   136
		createChild.setAttribute(ATRRIB_CONFIG_BASE_PLATFORM, getPlatformString()); 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   137
		createChild.setAttribute(ATTRIB_CONFIG_TARGET, getTargetString()); 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   138
		createChild.setAttribute(ATTRIB_SBSV2_BUILD_ALIAS, getSBSv2Alias()); 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   139
		createChild.setAttribute(ATTRIB_SBSV2_CONFIG_DISPLAY_STRING, getDisplayString()); 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   140
	}
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   141
	
109
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   142
	private void loadBuildArgsFromStorage(ICStorageElement rootStorage) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   143
		String value = rootStorage.getAttribute(BuildArgumentsInfo.BLDMAKEBLDFILESARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   144
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   145
			buildArgumentsInfo.bldmakeBldFilesArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   146
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   147
		
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   148
		value = rootStorage.getAttribute(BuildArgumentsInfo.BLDMAKECLEANARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   149
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   150
			buildArgumentsInfo.bldmakeCleanArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   151
		}
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   152
109
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   153
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDBUILDARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   154
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   155
			buildArgumentsInfo.abldBuildArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   156
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   157
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   158
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDEXPORTARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   159
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   160
			buildArgumentsInfo.abldExportArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   161
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   162
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   163
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDMAKEFILEARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   164
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   165
			buildArgumentsInfo.abldMakefileArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   166
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   167
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   168
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDLIBRARYARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   169
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   170
			buildArgumentsInfo.abldLibraryArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   171
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   172
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   173
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDRESOURCEARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   174
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   175
			buildArgumentsInfo.abldResourceArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   176
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   177
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   178
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDTARGETARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   179
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   180
			buildArgumentsInfo.abldTargetArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   181
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   182
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   183
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDFINALARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   184
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   185
			buildArgumentsInfo.abldFinalArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   186
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   187
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   188
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDCLEANARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   189
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   190
			buildArgumentsInfo.abldCleanArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   191
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   192
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   193
		value = rootStorage.getAttribute(BuildArgumentsInfo.ABLDFREEZEARGSSTORAGE);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   194
		if (value != null) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   195
			buildArgumentsInfo.abldFreezeArgs = value;
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   196
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   197
	}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   198
	
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   199
	public void saveBuildArgsToStorage(ICStorageElement rootStorage) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   200
		if (buildArgumentsInfo.bldmakeBldFilesArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   201
			rootStorage.setAttribute(BuildArgumentsInfo.BLDMAKEBLDFILESARGSSTORAGE, buildArgumentsInfo.bldmakeBldFilesArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   202
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   203
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   204
		if (buildArgumentsInfo.bldmakeCleanArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   205
			rootStorage.setAttribute(BuildArgumentsInfo.BLDMAKECLEANARGSSTORAGE, buildArgumentsInfo.bldmakeCleanArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   206
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   207
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   208
		if (buildArgumentsInfo.abldBuildArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   209
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDBUILDARGSSTORAGE, buildArgumentsInfo.abldBuildArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   210
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   211
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   212
		if (buildArgumentsInfo.abldExportArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   213
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDEXPORTARGSSTORAGE, buildArgumentsInfo.abldExportArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   214
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   215
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   216
		if (buildArgumentsInfo.abldMakefileArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   217
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDMAKEFILEARGSSTORAGE, buildArgumentsInfo.abldMakefileArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   218
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   219
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   220
		if (buildArgumentsInfo.abldLibraryArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   221
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDLIBRARYARGSSTORAGE, buildArgumentsInfo.abldLibraryArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   222
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   223
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   224
		if (buildArgumentsInfo.abldResourceArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   225
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDRESOURCEARGSSTORAGE, buildArgumentsInfo.abldResourceArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   226
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   227
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   228
		if (buildArgumentsInfo.abldTargetArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   229
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDTARGETARGSSTORAGE, buildArgumentsInfo.abldTargetArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   230
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   231
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   232
		if (buildArgumentsInfo.abldFinalArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   233
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDFINALARGSSTORAGE, buildArgumentsInfo.abldFinalArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   234
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   235
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   236
		if (buildArgumentsInfo.abldCleanArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   237
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDCLEANARGSSTORAGE, buildArgumentsInfo.abldCleanArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   238
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   239
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   240
		if (buildArgumentsInfo.abldFreezeArgs.trim().length() > 0) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   241
			rootStorage.setAttribute(BuildArgumentsInfo.ABLDFREEZEARGSSTORAGE, buildArgumentsInfo.abldFreezeArgs);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   242
		}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   243
	}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   244
	
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   245
	public ICarbideProjectInfo getCarbideProject() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   246
		// we need to get the project info from the build manager to ensure we
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   247
		// have the correct object.
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   248
		return CarbideBuilderPlugin.getBuildManager().getProjectInfo(projectTracker.getProject());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   249
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   250
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   251
	public String[] getErrorParserList(){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   252
		return CarbideCPPBuilder.getParserIdArray(getErrorParserId());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   253
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   254
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   255
	public boolean saveConfiguration(boolean refreshFileSystem) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   256
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   257
		try {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   258
			ICProjectDescription projDes = CoreModel.getDefault().getProjectDescription(projectTracker.getProject());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   259
			if (projDes != null) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   260
				ICConfigurationDescription configDes = projDes.getConfigurationById(getDisplayString());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   261
				if (configDes != null) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   262
					// save the CDT project description.  this saves all configs but that's the
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   263
					// only thing CDT allows at this point.
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   264
					CCorePlugin.getDefault().setProjectDescription(projectTracker.getProject(), projDes, true, new NullProgressMonitor());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   265
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   266
					return true;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   267
				}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   268
			}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   269
		} catch (CoreException e) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   270
			CarbideBuilderPlugin.log(e.getStatus());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   271
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   272
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   273
		return false;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   274
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   275
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   276
	public List<ISISBuilderInfo> getSISBuilderInfoList() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   277
		return sisBuilderInfoList;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   278
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   279
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   280
	public String toString(){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   281
		return getDisplayString();
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   282
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   283
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   284
	public IEnvironmentVarsInfo getEnvironmentVarsInfo() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   285
		return envVarsInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   286
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   287
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   288
	public void setEnvironmentVarsInfo(IEnvironmentVarsInfo envVarsInfo) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   289
		if (envVarsInfo instanceof EnvironmentVarsInfo2) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   290
			this.envVarsInfo = (EnvironmentVarsInfo2)envVarsInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   291
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   292
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   293
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   294
	public boolean equals(Object obj) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   295
		if (obj instanceof ICarbideBuildConfiguration || obj instanceof ISymbianBuildContext){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   296
			ISymbianBuildContext context = (ISymbianBuildContext)obj;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   297
			if (context.getDisplayString().equals(this.getDisplayString())){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   298
				return true;
1156
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   299
			} else if (context.getPlatformString().equals(this.getPlatformString()) && 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   300
					context.getTargetString().equals(this.getTargetString()) && 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   301
					context.getSDK().equals(this.getSDK()) && context.getSBSv2Alias() != null && context.getSBSv2Alias().split("_").length == 2){ 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   302
				return true; 
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   303
			} else {
1ae1b4979954 bug 10674 continuation. Allow SBSv1-style build config names to co-exist with newer SBSv2 configuraiton names that use aliases. This does not use project converstion, just adds the support to differentiate between the two. Also, write new .cproject data to a SBSV2_DATA_ID node (which is not currently read, but to be used for future purposes)
timkelly
parents: 1138
diff changeset
   304
				return false;
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   305
			}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   306
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   307
		return false;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   308
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   309
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   310
	public int getErrorParserId(){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   311
		String plat = this.getPlatformString();
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   312
		
1138
352c0236f181 bug 10674. Sort sbsv2 configuration names with same platform_target alias prefix. ensure gcce error parser is used for sbsv2 GCCE4 build configs, add a project specific (sbsv2 only) edit box that allows user to append whatever they want to the -c parameter (the build alias). Also, fixed SDK support for TB kits now that TB92SF appears as a prefix rather than a suffix in the buildinfo.txt file.
timkelly
parents: 1134
diff changeset
   313
		if (this.getSBSv2Alias() != null && this.getSBSv2Alias().toUpperCase().contains(ISymbianBuildContext.GCCE_PLATFORM)){
352c0236f181 bug 10674. Sort sbsv2 configuration names with same platform_target alias prefix. ensure gcce error parser is used for sbsv2 GCCE4 build configs, add a project specific (sbsv2 only) edit box that allows user to append whatever they want to the -c parameter (the build alias). Also, fixed SDK support for TB kits now that TB92SF appears as a prefix rather than a suffix in the buildinfo.txt file.
timkelly
parents: 1134
diff changeset
   314
			return ERROR_PARSERS_GCCE;
352c0236f181 bug 10674. Sort sbsv2 configuration names with same platform_target alias prefix. ensure gcce error parser is used for sbsv2 GCCE4 build configs, add a project specific (sbsv2 only) edit box that allows user to append whatever they want to the -c parameter (the build alias). Also, fixed SDK support for TB kits now that TB92SF appears as a prefix rather than a suffix in the buildinfo.txt file.
timkelly
parents: 1134
diff changeset
   315
		}
352c0236f181 bug 10674. Sort sbsv2 configuration names with same platform_target alias prefix. ensure gcce error parser is used for sbsv2 GCCE4 build configs, add a project specific (sbsv2 only) edit box that allows user to append whatever they want to the -c parameter (the build alias). Also, fixed SDK support for TB kits now that TB92SF appears as a prefix rather than a suffix in the buildinfo.txt file.
timkelly
parents: 1134
diff changeset
   316
		
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   317
		if (plat.equals(ISymbianBuildContext.EMULATOR_PLATFORM)){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   318
			return ERROR_PARSERS_WINSCW;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   319
		} else if (plat.startsWith("ARMV")){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   320
			return ERROR_PARSERS_ARMVx;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   321
		} else if (plat.equals(ISymbianBuildContext.THUMB_PLATFORM) ||
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   322
				   plat.equals(ISymbianBuildContext.ARMI_PLATFORM) ||
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   323
				   plat.equals(ISymbianBuildContext.ARM4_PLATFORM)){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   324
			return ERROR_PARSERS_ARM_EKA1;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   325
		} else if (plat.equals(ISymbianBuildContext.GCCE_PLATFORM)){
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   326
			return ERROR_PARSERS_GCCE;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   327
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   328
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   329
		return ERROR_PARSERS_ALL;  
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   330
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   331
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   332
	public List<String> getBuiltinMacros() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   333
		List<String> macros = new ArrayList<String>();
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   334
		
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   335
		// add the macros that should always be defined
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   336
		macros.add("__SYMBIAN32__"); //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   337
		macros.add("_UNICODE"); //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   338
		
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   339
		ISymbianSDK sdk = getSDK();
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   340
		if (sdk != null && sdk.getOSVersion().getMajor() >= 9) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   341
			macros.add("__SUPPORT_CPP_EXCEPTIONS__"); //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   342
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   343
		
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   344
		if (getTargetString().equals(DEBUG_TARGET)) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   345
			macros.add("_DEBUG"); //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   346
		} else {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   347
			macros.add("NDEBUG"); //$NON-NLS-1$
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   348
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   349
		
854
a7d9320cd85e Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
timkelly
parents: 853
diff changeset
   350
		if (hasSTDCPPSupport()){
a7d9320cd85e Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
timkelly
parents: 853
diff changeset
   351
			macros.add("__SYMBIAN_STDCPP_SUPPORT__");
a7d9320cd85e Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
timkelly
parents: 853
diff changeset
   352
		}
a7d9320cd85e Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
timkelly
parents: 853
diff changeset
   353
		
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   354
		return macros;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   355
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   356
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   357
	public CConfigurationData getBuildConfigurationData() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   358
		return buildConfigData;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   359
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   360
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   361
	public boolean valid() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   362
		return (SDKManagerInternalAPI.getMissingSdk(this.getSDK().getUniqueId()) == null);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   363
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   364
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   365
	public void validateAndSetProjectMarker() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   366
		if (valid() == false) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   367
			CarbideBuilderPlugin.createCarbideProjectMarker(this.getCarbideProject().getProject(), IMarker.SEVERITY_ERROR, "SDK " + this.getSDK().getUniqueId() + " from project \"" + this.getCarbideProject().getProject().getName() + "\" is unavailable. Please remap configurations by choosing Project > Properties > Carbide Build Configurations > Manage...", IMarker.PRIORITY_HIGH);
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   368
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   369
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   370
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   371
	public static String badSdkString() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   372
		return NOT_INSTALLED;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   373
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   374
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   375
	// Internal helper for missing SDK marking
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   376
	public static String toMarkedConfig(String config) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   377
		if (config == null)
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   378
			return null;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   379
		if (SDKManagerInternalAPI.getMissingSdk(SymbianBuildContext.getSDKIDFromConfigName(config)) != null) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   380
			return badSdkString() + config;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   381
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   382
		return config;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   383
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   384
	
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   385
	// Internal helper for converting back configurations with missing SDK marking
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   386
	public static  String fromMarkedConfig (String config) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   387
		if (config == null)
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   388
			return null;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   389
		if (config.startsWith(badSdkString())) {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   390
			return config.substring(badSdkString().length());
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   391
		}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   392
		return config;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   393
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   394
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   395
	public IBuildArgumentsInfo getBuildArgumentsInfo() {
109
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   396
		return (IBuildArgumentsInfo)buildArgumentsInfo;
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   397
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   398
	
109
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   399
	public BuildArgumentsInfo getBuildArgumentsInfoCopy() {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   400
		return new BuildArgumentsInfo(buildArgumentsInfo);
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   401
	}
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   402
	
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   403
	public void setBuildArgumentsInfo(BuildArgumentsInfo buildArgumentsInfo) {
2a4136280275 Fix again for bug 8902. Give direct access to BuildArgumentsInfo class and deprecate IBuildArgumentsInfo.
timkelly
parents: 0
diff changeset
   404
		this.buildArgumentsInfo = buildArgumentsInfo;
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   405
	}
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   406
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   407
	public IROMBuilderInfo getROMBuildInfo() {
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   408
		return romBuilderInfo;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   409
	}
853
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   410
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   411
854
a7d9320cd85e Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
timkelly
parents: 853
diff changeset
   412
	private boolean hasSTDCPPSupport() {
853
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   413
		
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   414
		ICarbideProjectInfo cpi = getCarbideProject();
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   415
		
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   416
		List<ISymbianBuildContext> buildConfig = new ArrayList<ISymbianBuildContext>();
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   417
		List<IPath> normalMakMakePaths = new ArrayList<IPath>();
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   418
		List<IPath> testMakMakePaths = new ArrayList<IPath>();
854
a7d9320cd85e Don't make hasSTDCPPSupport API. Review fixes for bug 10460.
timkelly
parents: 853
diff changeset
   419
		buildConfig.add(this);
853
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   420
		EpocEngineHelper.getMakMakeFiles(cpi.getAbsoluteBldInfPath(), buildConfig, normalMakMakePaths, testMakMakePaths, new NullProgressMonitor());
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   421
		
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   422
		for (IPath mmpPath : normalMakMakePaths){
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   423
			if (EpocEngineHelper.hasSTDCPPSupport(cpi, mmpPath)){
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   424
				return true;
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   425
			}
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   426
		}
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   427
		
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   428
		return false;
6c8527cdaa2e Add STDCPP keyword and targettype support. Bug 10460.
timkelly
parents: 140
diff changeset
   429
	}
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
   430
}