1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Externalization fixes

This commit is contained in:
Mikhail Sennikovsky 2007-03-09 19:04:32 +00:00
parent 1a2a80df49
commit eb221bb090
46 changed files with 350 additions and 164 deletions

View file

@ -1,5 +1,5 @@
############################################################################### ###############################################################################
# Copyright (c) 2003, 2005 IBM Corporation and others. # Copyright (c) 2003, 2007 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials # All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0 # are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at # which accompanies this distribution, and is available at
@ -8,12 +8,12 @@
# Contributors: # Contributors:
# IBM Corporation - initial API and implementation # IBM Corporation - initial API and implementation
############################################################################### ###############################################################################
pluginName=C/C++ Managed Builder Core pluginName=CDT Build System Core
providerName=Eclipse.org providerName=Eclipse.org
GeneratedMakefileCBuilder.name=Generated Makefile Builder CommonBuilder.name=CDT Builder
ManagedBuildNature.name=Managed Builder Project CDTBuildNature.name=CDT Builder Project
ManagedMakeProject.name=Managed Make Project CDTBuildProject.name=CDT Builder Project
objectFileName=Object File objectFileName=Object File
executableName=Executable File executableName=Executable File
@ -31,3 +31,18 @@ epGCCSpecsParser.name=GNU C/C++ Compiler Specs Parser
extensionGCCPerProjectProfile.name=GNU C/C++ Scanner Info per project profile extensionGCCPerProjectProfile.name=GNU C/C++ Scanner Info per project profile
extensionGCCPerFileProfile.name=GNU C/C++ Scanner Info per file profile extensionGCCPerFileProfile.name=GNU C/C++ Scanner Info per file profile
InternalBuilder.name=CDT Internal Builder
BuildSystem.name=CDT Build System
ProjectConverter.name=pre-4.0 projects converter
BuildProperty.value.name.debug=Debug;
BuildProperty.value.name.release=Release
BuildProperty.type.name.buildType=Build Type
BuildProperty.type.name.buildArtefactType=Build Artefact Type
BuildProperty.type.name.executable=Executable
BuildProperty.type.name.staticLibrary=Static Library
BuildProperty.type.name.sharedLibrary=Shared Library

View file

@ -25,7 +25,7 @@
<!-- =================================================================================== --> <!-- =================================================================================== -->
<extension <extension
id="genmakebuilder" id="genmakebuilder"
name="%GeneratedMakefileCBuilder.name" name="%CommonBuilder.name"
point="org.eclipse.core.resources.builders"> point="org.eclipse.core.resources.builders">
<builder <builder
hasNature="true" hasNature="true"
@ -43,7 +43,7 @@
<!-- =================================================================================== --> <!-- =================================================================================== -->
<extension <extension
id="managedBuildNature" id="managedBuildNature"
name="%ManagedBuildNature.name" name="%CDTBuildNature.name"
point="org.eclipse.core.resources.natures"> point="org.eclipse.core.resources.natures">
<requires-nature <requires-nature
id="org.eclipse.cdt.core.cnature"> id="org.eclipse.cdt.core.cnature">
@ -65,7 +65,7 @@
</extension> </extension>
<extension <extension
id="managedMake" id="managedMake"
name="%ManagedMakeProject.name" name="%CDTBuildProject.name"
point="org.eclipse.cdt.core.CProject"> point="org.eclipse.cdt.core.CProject">
<cproject <cproject
natureID="org.eclipse.cdt.managedbuilder.core.managedBuildNature" natureID="org.eclipse.cdt.managedbuilder.core.managedBuildNature"
@ -211,7 +211,7 @@
</extension> </extension>
<extension <extension
id="configurationDataProvider" id="configurationDataProvider"
name="CDT Build System" name="%BuildSystem.name"
point="org.eclipse.cdt.core.CConfigurationDataProvider"> point="org.eclipse.cdt.core.CConfigurationDataProvider">
<provider <provider
natures="org.eclipse.cdt.managedbuilder.core.managedBuildNature;org.eclipse.cdt.managedbuilder.core.ScannerConfigNature" natures="org.eclipse.cdt.managedbuilder.core.managedBuildNature;org.eclipse.cdt.managedbuilder.core.ScannerConfigNature"
@ -220,7 +220,7 @@
</extension> </extension>
<extension <extension
id="ProjectConverter" id="ProjectConverter"
name="pre-4.0 projects converter" name="%ProjectConverter.name"
point="org.eclipse.cdt.core.projectConverter"> point="org.eclipse.cdt.core.projectConverter">
<converter <converter
owners="org.eclipse.cdt.managedbuilder.core.managedMake" owners="org.eclipse.cdt.managedbuilder.core.managedMake"
@ -233,30 +233,30 @@
id="baseProperties" id="baseProperties"
name="Base Build Properties Definition" name="Base Build Properties Definition"
point="org.eclipse.cdt.managedbuilder.core.buildProperties"> point="org.eclipse.cdt.managedbuilder.core.buildProperties">
<propertyType id="org.eclipse.cdt.build.core.buildType" name="Build Type"/> <propertyType id="org.eclipse.cdt.build.core.buildType" name="%BuildProperty.type.name.buildType"/>
<propertyType id="org.eclipse.cdt.build.core.buildArtefactType" name="Build Artefact Type"/> <propertyType id="org.eclipse.cdt.build.core.buildArtefactType" name="%BuildProperty.type.name.buildArtefactType"/>
<propertyValue <propertyValue
property="org.eclipse.cdt.build.core.buildType" property="org.eclipse.cdt.build.core.buildType"
id="org.eclipse.cdt.build.core.buildType.debug" id="org.eclipse.cdt.build.core.buildType.debug"
name="Debug"/> name="%BuildProperty.value.name.debug"/>
<propertyValue <propertyValue
property="org.eclipse.cdt.build.core.buildType" property="org.eclipse.cdt.build.core.buildType"
id="org.eclipse.cdt.build.core.buildType.release" id="org.eclipse.cdt.build.core.buildType.release"
name="Release"/> name="%BuildProperty.value.name.release"/>
<propertyValue <propertyValue
property="org.eclipse.cdt.build.core.buildArtefactType" property="org.eclipse.cdt.build.core.buildArtefactType"
id="org.eclipse.cdt.build.core.buildArtefactType.exe" id="org.eclipse.cdt.build.core.buildArtefactType.exe"
name="Executable"/> name="%BuildProperty.type.name.executable"/>
<propertyValue <propertyValue
property="org.eclipse.cdt.build.core.buildArtefactType" property="org.eclipse.cdt.build.core.buildArtefactType"
id="org.eclipse.cdt.build.core.buildArtefactType.staticLib" id="org.eclipse.cdt.build.core.buildArtefactType.staticLib"
name="Static Library"/> name="%BuildProperty.type.name.staticLibrary"/>
<propertyValue <propertyValue
property="org.eclipse.cdt.build.core.buildArtefactType" property="org.eclipse.cdt.build.core.buildArtefactType"
id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" id="org.eclipse.cdt.build.core.buildArtefactType.sharedLib"
name="Shared Library"/> name="%BuildProperty.type.name.sharedLibrary"/>
</extension> </extension>
@ -378,7 +378,7 @@
<builder <builder
id="org.eclipse.cdt.build.core.internal.builder" id="org.eclipse.cdt.build.core.internal.builder"
name="CDT Internal Builder"> name="%InternalBuilder.name">
</builder> </builder>
</extension> </extension>

View file

@ -21,7 +21,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
public final class CfgInfoContext{ public final class CfgInfoContext{
private static final String DELIMITER = ";"; private static final String DELIMITER = ";"; //$NON-NLS-1$
private static final int NULL_OBJ_CODE = 29; private static final int NULL_OBJ_CODE = 29;
private Configuration fCfg; private Configuration fCfg;
private IResourceInfo fRcInfo; private IResourceInfo fRcInfo;

View file

@ -74,7 +74,7 @@ public class ScannerConfigBuilder extends ACBuilder {
if(bInfo != null){ if(bInfo != null){
IConfiguration cfgs[] = bInfo.getManagedProject().getConfigurations(); IConfiguration cfgs[] = bInfo.getManagedProject().getConfigurations();
if(cfgs.length != 0){ if(cfgs.length != 0){
monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), cfgs.length); monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), cfgs.length); //$NON-NLS-1$
for(int i = 0; i < cfgs.length; i++){ for(int i = 0; i < cfgs.length; i++){
build(cfgs[i], 0, new SubProgressMonitor(monitor, 1)); build(cfgs[i], 0, new SubProgressMonitor(monitor, 1));
} }
@ -104,7 +104,7 @@ public class ScannerConfigBuilder extends ACBuilder {
int num = infoMap.size(); int num = infoMap.size();
if(num != 0){ if(num != 0){
Properties envProps = calcEnvironment(cfg); Properties envProps = calcEnvironment(cfg);
monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), num); monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), num); //$NON-NLS-1$
for(Iterator iter = infoMap.entrySet().iterator(); iter.hasNext();){ for(Iterator iter = infoMap.entrySet().iterator(); iter.hasNext();){
try { try {
Map.Entry entry = (Map.Entry)iter.next(); Map.Entry entry = (Map.Entry)iter.next();
@ -144,7 +144,7 @@ public class ScannerConfigBuilder extends ACBuilder {
if (autodiscoveryEnabled2 || ((flags & FORCE_DISCOVERY) != 0)) { if (autodiscoveryEnabled2 || ((flags & FORCE_DISCOVERY) != 0)) {
monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), 100); //$NON-NLS-1$ monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder"), 100); //$NON-NLS-1$
monitor.subTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder") + //$NON-NLS-1$ monitor.subTask(MakeMessages.getString("ScannerConfigBuilder.Invoking_Builder") + //$NON-NLS-1$
project.getName()); project.getName());
if(env == null) if(env == null)

View file

@ -13,7 +13,7 @@ package org.eclipse.cdt.managedbuilder.core;
import org.eclipse.cdt.core.settings.model.extension.CFileData; import org.eclipse.cdt.core.settings.model.extension.CFileData;
public interface IFileInfo extends IResourceConfiguration { public interface IFileInfo extends IResourceConfiguration {
public static final String FILE_INFO_ELEMENT_NAME = "fileInfo"; public static final String FILE_INFO_ELEMENT_NAME = "fileInfo"; //$NON-NLS-1$
CFileData getFileData(); CFileData getFileData();

View file

@ -13,7 +13,7 @@ package org.eclipse.cdt.managedbuilder.core;
import org.eclipse.cdt.core.settings.model.extension.CFolderData; import org.eclipse.cdt.core.settings.model.extension.CFolderData;
public interface IFolderInfo extends IResourceInfo { public interface IFolderInfo extends IResourceInfo {
public final static String FOLDER_INFO_ELEMENT_NAME = "folderInfo"; public final static String FOLDER_INFO_ELEMENT_NAME = "folderInfo"; //$NON-NLS-1$
ITool[] getFilteredTools(); ITool[] getFilteredTools();

View file

@ -50,7 +50,7 @@ public interface ITool extends IBuildObject, IHoldsOptions {
public static final String CONVERT_TO_ID = "convertToId"; //$NON-NLS-1$ public static final String CONVERT_TO_ID = "convertToId"; //$NON-NLS-1$
public static final String OPTIONPATHCONVERTER = "optionPathConverter"; //$NON-NLS-1$ public static final String OPTIONPATHCONVERTER = "optionPathConverter"; //$NON-NLS-1$
public static final String SUPPORTS_MANAGED_BUILD = "supportsManagedBuild"; public static final String SUPPORTS_MANAGED_BUILD = "supportsManagedBuild"; //$NON-NLS-1$
public static final int FILTER_C = 0; public static final int FILTER_C = 0;

View file

@ -43,7 +43,7 @@ public interface IToolChain extends IBuildObject, IHoldsOptions {
public static final String IS_TOOL_CHAIN_SUPPORTED = "isToolChainSupported"; //$NON-NLS-1$ public static final String IS_TOOL_CHAIN_SUPPORTED = "isToolChainSupported"; //$NON-NLS-1$
public static final String CONFIGURATION_ENVIRONMENT_SUPPLIER = "configurationEnvironmentSupplier"; //$NON-NLS-1$ public static final String CONFIGURATION_ENVIRONMENT_SUPPLIER = "configurationEnvironmentSupplier"; //$NON-NLS-1$
public static final String CONFIGURATION_MACRO_SUPPLIER = "configurationMacroSupplier"; //$NON-NLS-1$ public static final String CONFIGURATION_MACRO_SUPPLIER = "configurationMacroSupplier"; //$NON-NLS-1$
public static final String SUPPORTS_MANAGED_BUILD = "supportsManagedBuild"; public static final String SUPPORTS_MANAGED_BUILD = "supportsManagedBuild"; //$NON-NLS-1$
public static final String IS_SYSTEM= "isSystem"; //$NON-NLS-1$ public static final String IS_SYSTEM= "isSystem"; //$NON-NLS-1$
public static final String NON_INTERNAL_BUILDER_ID = "nonInternalBuilderId"; //$NON-NLS-1$ public static final String NON_INTERNAL_BUILDER_ID = "nonInternalBuilderId"; //$NON-NLS-1$
public static final String RESOURCE_TYPE_BASED_DISCOVERY = "resourceTypeBasedDiscovery"; //$NON-NLS-1$ public static final String RESOURCE_TYPE_BASED_DISCOVERY = "resourceTypeBasedDiscovery"; //$NON-NLS-1$

View file

@ -153,7 +153,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
public static final String BUILD_ARTEFACT_TYPE_PROPERTY_STATICLIB = "org.eclipse.cdt.build.core.buildArtefactType.staticLib"; //$NON-NLS-1$ public static final String BUILD_ARTEFACT_TYPE_PROPERTY_STATICLIB = "org.eclipse.cdt.build.core.buildArtefactType.staticLib"; //$NON-NLS-1$
public static final String BUILD_ARTEFACT_TYPE_PROPERTY_SHAREDLIB = "org.eclipse.cdt.build.core.buildArtefactType.sharedLib"; //$NON-NLS-1$ public static final String BUILD_ARTEFACT_TYPE_PROPERTY_SHAREDLIB = "org.eclipse.cdt.build.core.buildArtefactType.sharedLib"; //$NON-NLS-1$
public static final String CFG_DATA_PROVIDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".configurationDataProvider"; public static final String CFG_DATA_PROVIDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".configurationDataProvider"; //$NON-NLS-1$
private static final String NEWLINE = System.getProperty("line.separator"); //$NON-NLS-1$ private static final String NEWLINE = System.getProperty("line.separator"); //$NON-NLS-1$
@ -3639,23 +3639,23 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
} }
public static String locationToFullPath(String path){ public static String locationToFullPath(String path){
if(!path.startsWith("${")) if(!path.startsWith("${")) //$NON-NLS-1$
return null; return null;
int index = path.lastIndexOf('}'); int index = path.lastIndexOf('}');
if(index == -1) if(index == -1)
return null; return null;
String varName = "workspace_loc"; String varName = "workspace_loc"; //$NON-NLS-1$
String str1 = path.substring(2, index); String str1 = path.substring(2, index);
String result = null; String result = null;
if(str1.startsWith(varName)){ if(str1.startsWith(varName)){
str1 = str1.substring(varName.length()); str1 = str1.substring(varName.length());
if(str1.length() != 0){ if(str1.length() != 0){
if(str1.startsWith(":")){ if(str1.startsWith(":")){ //$NON-NLS-1$
result = str1.substring(1); result = str1.substring(1);
} }
} else { } else {
result = "/"; result = "/"; //$NON-NLS-1$
} }
} }
@ -3664,7 +3664,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
public static String fullPathToLocation(String path){ public static String fullPathToLocation(String path){
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
return buf.append("${").append("workspace_loc:").append(path).append("}").toString(); return buf.append("${").append("workspace_loc:").append(path).append("}").toString(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} }
public static IPath getBuildLocation(IConfiguration cfg, IBuilder builder) { public static IPath getBuildLocation(IConfiguration cfg, IBuilder builder) {

View file

@ -707,7 +707,7 @@ public class BuildDescription implements IBuildDescription {
fSourcePaths = fCfg.getSourcePaths(); fSourcePaths = fCfg.getSourcePaths();
if(fSourcePaths.length == 0){ if(fSourcePaths.length == 0){
fSourcePaths = new IPath[]{new Path("")}; fSourcePaths = new IPath[]{Path.EMPTY};
} }
fInputStep = createStep(null,null); fInputStep = createStep(null,null);
fOutputStep = createStep(null,null); fOutputStep = createStep(null,null);
@ -2085,7 +2085,7 @@ public class BuildDescription implements IBuildDescription {
private ToolInfoHolder getToolInfo(BuildResource rc){ private ToolInfoHolder getToolInfo(BuildResource rc){
IPath path = rc.isProjectResource() ? IPath path = rc.isProjectResource() ?
rc.getFullPath().removeFirstSegments(1).makeRelative() : rc.getFullPath().removeFirstSegments(1).makeRelative() :
new Path(""); Path.EMPTY;
return getToolInfo(path); return getToolInfo(path);
} }

View file

@ -94,7 +94,7 @@ public class BuildResource implements IBuildResource {
public void setRemoved(boolean removed) { public void setRemoved(boolean removed) {
if(DbgUtil.DEBUG){ if(DbgUtil.DEBUG){
if(removed) if(removed)
DbgUtil.trace("REMOVED state: resource " + DbgUtil.resourceName(this)); DbgUtil.trace("REMOVED state: resource " + DbgUtil.resourceName(this)); //$NON-NLS-1$
} }
fIsRemoved = removed; fIsRemoved = removed;
if(fIsRemoved) if(fIsRemoved)

View file

@ -78,11 +78,11 @@ public class DescriptionBuilder implements IBuildModelBuilder {
return VISIT_STOP; return VISIT_STOP;
if(DbgUtil.DEBUG) if(DbgUtil.DEBUG)
DbgUtil.trace("visiting step " + DbgUtil.stepName(action)); DbgUtil.trace("visiting step " + DbgUtil.stepName(action)); //$NON-NLS-1$
if(!action.isRemoved() if(!action.isRemoved()
&& (!fBuildIncrementaly || action.needsRebuild())){ && (!fBuildIncrementaly || action.needsRebuild())){
if(DbgUtil.DEBUG) if(DbgUtil.DEBUG)
DbgUtil.trace("step " + DbgUtil.stepName(action) + " needs rebuild" ); DbgUtil.trace("step " + DbgUtil.stepName(action) + " needs rebuild" ); //$NON-NLS-1$ //$NON-NLS-2$
StepBuilder builder = getStepBuilder(action);//new StepBuilder(action, fCWD, fResumeOnErrs, fDir); StepBuilder builder = getStepBuilder(action);//new StepBuilder(action, fCWD, fResumeOnErrs, fDir);
if(fBuild){ if(fBuild){

View file

@ -98,7 +98,7 @@ public class BuildProperties implements IBuildProperties {
public String toStringExistingProperties(){ public String toStringExistingProperties(){
int size = fPropertiesMap.size(); int size = fPropertiesMap.size();
if(size == 0) if(size == 0)
return ""; return ""; //$NON-NLS-1$
else if(size == 1) else if(size == 1)
return fPropertiesMap.values().iterator().next().toString(); return fPropertiesMap.values().iterator().next().toString();

View file

@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Intel Corporation - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.buildproperties;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class BuildPropertiesMessages {
private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.internal.buildproperties.BuildPropertiesMessages"; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
private BuildPropertiesMessages() {
}
public static String getString(String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
}
}
}

View file

@ -0,0 +1,21 @@
###############################################################################
# Copyright (c) 2007 Intel Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Intel Corporation - Initial API and implementation
###############################################################################
BuildProperty.0=the specified type does not exist
BuildProperty.1=invalid value id
BuildPropertyManager.8=property type of the specified id already exists and has different name
BuildPropertyManager.9=specified property type does not exist
BuildPropertyManager.10=property value of the specified id already exists and has different name
BuildPropertyManager.11=specified property type does not exist
BuildPropertyManager.12=id not specified
BuildPropertyManager.13=name not specified
BuildPropertyManager.14=id not specified
BuildPropertyManager.15=name not specified
BuildPropertyManager.16=property not specified

View file

@ -40,7 +40,7 @@ public class BuildProperty implements IBuildProperty{
if(fType == null){ if(fType == null){
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the specified type does not exist")); BuildPropertiesMessages.getString("BuildProperty.0"))); //$NON-NLS-1$
} }
setValue(value); setValue(value);
} }
@ -60,7 +60,7 @@ public class BuildProperty implements IBuildProperty{
if(value == null) if(value == null)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"invalid value id")); BuildPropertiesMessages.getString("BuildProperty.1"))); //$NON-NLS-1$
setValue(value); setValue(value);
} }

View file

@ -29,14 +29,14 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.Status;
public class BuildPropertyManager implements IBuildPropertyManager{ public class BuildPropertyManager implements IBuildPropertyManager{
private static final String PROPERTIES_EXT_POINT_ID = "org.eclipse.cdt.managedbuilder.core.buildProperties"; private static final String PROPERTIES_EXT_POINT_ID = "org.eclipse.cdt.managedbuilder.core.buildProperties"; //$NON-NLS-1$
static final String PROPERTY_VALUE_SEPARATOR = "="; static final String PROPERTY_VALUE_SEPARATOR = "="; //$NON-NLS-1$
static final String PROPERTIES_SEPARATOR = ","; static final String PROPERTIES_SEPARATOR = ","; //$NON-NLS-1$
static final String ELEMENT_PROPERTY_TYPE = "propertyType"; static final String ELEMENT_PROPERTY_TYPE = "propertyType"; //$NON-NLS-1$
static final String ELEMENT_PROPERTY_VALUE = "propertyValue"; static final String ELEMENT_PROPERTY_VALUE = "propertyValue"; //$NON-NLS-1$
static final String ATTRIBUTE_PROPERTY = "property"; static final String ATTRIBUTE_PROPERTY = "property"; //$NON-NLS-1$
static final String ATTRIBUTE_NAME = "name"; static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
static final String ATTRIBUTE_ID = "id"; static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
private static BuildPropertyManager fInstance; private static BuildPropertyManager fInstance;
@ -73,7 +73,7 @@ public class BuildPropertyManager implements IBuildPropertyManager{
if(!name.equals(type.getName())) if(!name.equals(type.getName()))
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"property type of the specified id already exists and has different name")); BuildPropertiesMessages.getString("BuildPropertyManager.8"))); //$NON-NLS-1$
} else { } else {
type = new BuildPropertyType(id, name); type = new BuildPropertyType(id, name);
fPropertyTypeMap.put(id, type); fPropertyTypeMap.put(id, type);
@ -87,7 +87,7 @@ public class BuildPropertyManager implements IBuildPropertyManager{
throw new CoreException(new Status( throw new CoreException(new Status(
IStatus.ERROR, IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"specified property type does not exist")); BuildPropertiesMessages.getString("BuildPropertyManager.9"))); //$NON-NLS-1$
return createPropertyValue(type, id, name); return createPropertyValue(type, id, name);
} }
@ -98,7 +98,7 @@ public class BuildPropertyManager implements IBuildPropertyManager{
if(!name.equals(value.getName())) if(!name.equals(value.getName()))
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"property value of the specified id already exists and has different name")); BuildPropertiesMessages.getString("BuildPropertyManager.10"))); //$NON-NLS-1$
} else { } else {
value = new BuildPropertyValue(id, name); value = new BuildPropertyValue(id, name);
((BuildPropertyType)type).addSupportedValue(value); ((BuildPropertyType)type).addSupportedValue(value);
@ -117,7 +117,7 @@ public class BuildPropertyManager implements IBuildPropertyManager{
throw new CoreException(new Status( throw new CoreException(new Status(
IStatus.ERROR, IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"specified property type does not exist")); BuildPropertiesMessages.getString("BuildPropertyManager.11"))); //$NON-NLS-1$
BuildProperty property = new BuildProperty(type, value); BuildProperty property = new BuildProperty(type, value);
return property; return property;
@ -193,12 +193,12 @@ public class BuildPropertyManager implements IBuildPropertyManager{
if(id == null) if(id == null)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"id not specified")); BuildPropertiesMessages.getString("BuildPropertyManager.12"))); //$NON-NLS-1$
String name = el.getAttribute(ATTRIBUTE_NAME); String name = el.getAttribute(ATTRIBUTE_NAME);
if(name == null) if(name == null)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"name not specified")); BuildPropertiesMessages.getString("BuildPropertyManager.13"))); //$NON-NLS-1$
return createPropertyType(id, name); return createPropertyType(id, name);
} }
@ -208,17 +208,17 @@ public class BuildPropertyManager implements IBuildPropertyManager{
if(id == null) if(id == null)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"id not specified")); BuildPropertiesMessages.getString("BuildPropertyManager.14"))); //$NON-NLS-1$
String name = el.getAttribute(ATTRIBUTE_NAME); String name = el.getAttribute(ATTRIBUTE_NAME);
if(name == null) if(name == null)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"name not specified")); BuildPropertiesMessages.getString("BuildPropertyManager.15"))); //$NON-NLS-1$
String property = el.getAttribute(ATTRIBUTE_PROPERTY); String property = el.getAttribute(ATTRIBUTE_PROPERTY);
if(property == null) if(property == null)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"property not specified")); BuildPropertiesMessages.getString("BuildPropertyManager.16"))); //$NON-NLS-1$
return createPropertyValue(property, id, name); return createPropertyValue(property, id, name);

View file

@ -787,7 +787,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
if(supportsManagedBuild != null) if(supportsManagedBuild != null)
element.setAttribute(ATTRIBUTE_SUPORTS_MANAGED_BUILD, supportsManagedBuild.toString()); element.setAttribute(ATTRIBUTE_SUPORTS_MANAGED_BUILD, supportsManagedBuild.toString());
if(customizedErrorParserIds != null) if(customizedErrorParserIds != null)
element.setAttribute(ATTRIBUTE_CUSTOMIZED_ERROR_PARSERS, CDataUtil.arrayToString(customizedErrorParserIds, ";")); element.setAttribute(ATTRIBUTE_CUSTOMIZED_ERROR_PARSERS, CDataUtil.arrayToString(customizedErrorParserIds, ";")); //$NON-NLS-1$
if(customizedEnvironment != null) if(customizedEnvironment != null)
element.setAttribute(ATTRIBUTE_ENVIRONMENT, MapStorageElement.encodeMap(customizedEnvironment)); element.setAttribute(ATTRIBUTE_ENVIRONMENT, MapStorageElement.encodeMap(customizedEnvironment));
if(appendEnvironment != null) if(appendEnvironment != null)
@ -1566,7 +1566,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider(); IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
try { try {
args = provider.resolveValue(args, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); args = provider.resolveValue(args, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (BuildMacroException e) { } catch (BuildMacroException e) {
} }
@ -1578,7 +1578,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider(); IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
try { try {
command = provider.resolveValue(command, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); command = provider.resolveValue(command, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (BuildMacroException e) { } catch (BuildMacroException e) {
} }
@ -1643,7 +1643,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider(); IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
try { try {
path = provider.resolveValue(path, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); path = provider.resolveValue(path, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (BuildMacroException e) { } catch (BuildMacroException e) {
} }
@ -1719,7 +1719,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider(); IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
try { try {
attr = provider.resolveValue(attr, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); attr = provider.resolveValue(attr, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (BuildMacroException e) { } catch (BuildMacroException e) {
} }
@ -1742,7 +1742,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider(); IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
try { try {
attr = provider.resolveValue(attr, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); attr = provider.resolveValue(attr, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (BuildMacroException e) { } catch (BuildMacroException e) {
} }
@ -1769,7 +1769,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider(); IBuildMacroProvider provider = ManagedBuildManager.getBuildMacroProvider();
try { try {
attr = provider.resolveValue(attr, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); attr = provider.resolveValue(attr, "", " ", IBuildMacroProvider.CONTEXT_CONFIGURATION, getMacroContextData()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (BuildMacroException e) { } catch (BuildMacroException e) {
} }
@ -1957,7 +1957,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
Map.Entry entry = (Map.Entry)iter.next(); Map.Entry entry = (Map.Entry)iter.next();
String value = (String)entry.getValue(); String value = (String)entry.getValue();
try { try {
value = mngr.resolveValue(value, "", separator, cfgDes); value = mngr.resolveValue(value, "", separator, cfgDes); //$NON-NLS-1$
entry.setValue(value); entry.setValue(value);
} catch (CdtVariableException e){ } catch (CdtVariableException e){
} }
@ -2201,7 +2201,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
String name = getName(); String name = getName();
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId()); String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
if(version != null && version.length() != 0){ if(version != null && version.length() != 0){
return new StringBuffer().append(name).append(" (").append(version).append("").toString(); return new StringBuffer().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
} }
return name; return name;
} }
@ -2344,7 +2344,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(ids[0]); buf.append(ids[0]);
for(int i = 1; i < ids.length; i++){ for(int i = 1; i < ids.length; i++){
buf.append(";").append(ids[i]); buf.append(";").append(ids[i]); //$NON-NLS-1$
} }
errorParserIds = buf.toString(); errorParserIds = buf.toString();
} }
@ -2367,7 +2367,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
if(version != null){ if(version != null){
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(name); buf.append(name);
buf.append(" (v").append(version).append(")"); buf.append(" (v").append(version).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
name = buf.toString(); name = buf.toString();
} }
} }

View file

@ -200,7 +200,7 @@ public class BuilderFactory {
} }
private static Map builderToMap(IBuilder builder){ private static Map builderToMap(IBuilder builder){
MapStorageElement el = new MapStorageElement("", null); MapStorageElement el = new MapStorageElement("", null); //$NON-NLS-1$
((Builder)builder).serialize(el, false); ((Builder)builder).serialize(el, false);
return el.toStringMap(); return el.toStringMap();
@ -215,7 +215,7 @@ public class BuilderFactory {
if(builder != null) if(builder != null)
return createCustomBuilder(cfg, builder); return createCustomBuilder(cfg, builder);
throw new CoreException(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.getUniqueIdentifier(), -1, throw new CoreException(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.getUniqueIdentifier(), -1,
"can not find builder with the specified id", null)); ManagedMakeMessages.getResourceString("BuilderFactory.1"), null)); //$NON-NLS-1$
} }
public static IBuilder createCustomBuilder(IConfiguration cfg, IBuilder base){ public static IBuilder createCustomBuilder(IConfiguration cfg, IBuilder base){
@ -248,7 +248,7 @@ public class BuilderFactory {
ICommand command = getBuildSpec(project.getDescription(), eclipseBuilderID); ICommand command = getBuildSpec(project.getDescription(), eclipseBuilderID);
if (command == null) { if (command == null) {
throw new CoreException(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.getUniqueIdentifier(), -1, throw new CoreException(new Status(IStatus.ERROR, ManagedBuilderCorePlugin.getUniqueIdentifier(), -1,
MakeMessages.getString("BuildInfoFactory.Missing_Builder") + eclipseBuilderID, null)); //$NON-NLS-1$ ManagedMakeMessages.getResourceString("BuildInfoFactory.Missing_Builder") + eclipseBuilderID, null)); //$NON-NLS-1$
} }
return createBuilderFromCommand(cfg, command); return createBuilderFromCommand(cfg, command);

View file

@ -58,7 +58,6 @@ import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator; import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator2; import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator2;
import org.eclipse.cdt.newmake.core.IMakeBuilderInfo; import org.eclipse.cdt.newmake.core.IMakeBuilderInfo;
import org.eclipse.cdt.newmake.internal.core.MakeMessages;
import org.eclipse.cdt.newmake.internal.core.StreamMonitor; import org.eclipse.cdt.newmake.internal.core.StreamMonitor;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IFolder;
@ -376,7 +375,7 @@ public class CommonBuilder extends ACBuilder {
IConfiguration cfgs[] = getReferencedConfigs(builders); IConfiguration cfgs[] = getReferencedConfigs(builders);
monitor.beginTask("", num + cfgs.length); monitor.beginTask("", num + cfgs.length); //$NON-NLS-1$
if(cfgs.length != 0) if(cfgs.length != 0)
ManagedBuildManager.buildConfigurations(cfgs, new SubProgressMonitor(monitor, 1)); ManagedBuildManager.buildConfigurations(cfgs, new SubProgressMonitor(monitor, 1));
@ -424,7 +423,7 @@ public class CommonBuilder extends ACBuilder {
IStatus.ERROR, IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
0, 0,
"customized builder created for builder that does not support customization", ManagedMakeMessages.getResourceString("CommonBuilder.1"), //$NON-NLS-1$
null)); null));
} }
@ -441,7 +440,7 @@ public class CommonBuilder extends ACBuilder {
IStatus.ERROR, IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
0, 0,
"request for building non active configuration for the builder that does not support this", ManagedMakeMessages.getResourceString("CommonBuilder.2"), //$NON-NLS-1$
null)); null));
} }
@ -563,7 +562,7 @@ public class CommonBuilder extends ACBuilder {
private String concatMessages(List msgs){ private String concatMessages(List msgs){
int size = msgs.size(); int size = msgs.size();
if(size == 0){ if(size == 0){
return ""; return ""; //$NON-NLS-1$
} else if(size == 1){ } else if(size == 1){
return (String)msgs.get(0); return (String)msgs.get(0);
} }
@ -571,7 +570,7 @@ public class CommonBuilder extends ACBuilder {
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(msgs.get(0)); buf.append(msgs.get(0));
for(int i = 1; i < size; i++){ for(int i = 1; i < size; i++){
buf.append("\n"); buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
buf.append((String)msgs.get(i)); buf.append((String)msgs.get(i));
} }
return buf.toString(); return buf.toString();
@ -752,14 +751,14 @@ public class CommonBuilder extends ACBuilder {
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
// Report time and number of threads used // Report time and number of threads used
buf.append("Time consumed: "); buf.append(ManagedMakeMessages.getFormattedString("CommonBuilder.6", Integer.toString((int)(t2 - t1)))); //$NON-NLS-1$
buf.append(t2 - t1); // buf.append(t2 - t1);
buf.append(" ms. "); // buf.append(" ms. ");
if (isParallel) { if (isParallel) {
buf.append("Parallel threads used: "); buf.append(ManagedMakeMessages.getFormattedString("CommonBuilder.7", Integer.toString(ParallelBuilder.lastThreadsUsed))); //$NON-NLS-1$
buf.append(ParallelBuilder.lastThreadsUsed); // buf.append(ParallelBuilder.lastThreadsUsed);
} }
buf.append("\n"); buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
// Write message on the console // Write message on the console
consoleOutStream.write(buf.toString().getBytes()); consoleOutStream.write(buf.toString().getBytes());
consoleOutStream.flush(); consoleOutStream.flush();
@ -1293,14 +1292,14 @@ public class CommonBuilder extends ACBuilder {
if(buildPath == null){ if(buildPath == null){
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"can not clean programmatically: build workspace path is not specified")); ManagedMakeMessages.getResourceString("CommonBuilder.0"))); //$NON-NLS-1$
} }
IPath projectFullPath = getProject().getFullPath(); IPath projectFullPath = getProject().getFullPath();
if(!projectFullPath.isPrefixOf(buildPath)){ if(!projectFullPath.isPrefixOf(buildPath)){
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"can not clean programmatically: build workspace path is not the project path")); ManagedMakeMessages.getResourceString("CommonBuilder.16"))); //$NON-NLS-1$
} }
IWorkspace workspace = CCorePlugin.getWorkspace(); IWorkspace workspace = CCorePlugin.getWorkspace();
@ -1309,7 +1308,7 @@ public class CommonBuilder extends ACBuilder {
if(rc.getType() != IResource.FOLDER){ if(rc.getType() != IResource.FOLDER){
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"can not clean programmatically: build workspace path is not folder")); ManagedMakeMessages.getResourceString("CommonBuilder.12"))); //$NON-NLS-1$
} }
IFolder buildDir = (IFolder)rc; IFolder buildDir = (IFolder)rc;
@ -1317,7 +1316,7 @@ public class CommonBuilder extends ACBuilder {
outputError(buildDir.getName(), "Could not delete the build directory"); //$NON-NLS-1$ outputError(buildDir.getName(), "Could not delete the build directory"); //$NON-NLS-1$
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"can not clean programmatically: build folder is not accessible")); ManagedMakeMessages.getResourceString("CommonBuilder.13"))); //$NON-NLS-1$
} }
String status; String status;
try { try {
@ -1365,7 +1364,7 @@ public class CommonBuilder extends ACBuilder {
if (monitor == null) { if (monitor == null) {
monitor = new NullProgressMonitor(); monitor = new NullProgressMonitor();
} }
monitor.beginTask(MakeMessages.getString("MakeBuilder.Invoking_Make_Builder") + currProject.getName(), 100); //$NON-NLS-1$ monitor.beginTask(ManagedMakeMessages.getResourceString("MakeBuilder.Invoking_Make_Builder") + currProject.getName(), 100); //$NON-NLS-1$
try { try {
IPath buildCommand = builder.getBuildCommand(); IPath buildCommand = builder.getBuildCommand();
@ -1472,11 +1471,11 @@ public class CommonBuilder extends ACBuilder {
} catch (IOException e) { } catch (IOException e) {
} }
// Before launching give visual cues via the monitor // Before launching give visual cues via the monitor
monitor.subTask(MakeMessages.getString("MakeBuilder.Invoking_Command") + launcher.getCommandLine()); //$NON-NLS-1$ monitor.subTask(ManagedMakeMessages.getResourceString("MakeBuilder.Invoking_Command") + launcher.getCommandLine()); //$NON-NLS-1$
if (launcher.waitAndRead(consoleOut, consoleErr, new SubProgressMonitor(monitor, 0)) if (launcher.waitAndRead(consoleOut, consoleErr, new SubProgressMonitor(monitor, 0))
!= CommandLauncher.OK) != CommandLauncher.OK)
errMsg = launcher.getErrorMessage(); errMsg = launcher.getErrorMessage();
monitor.subTask(MakeMessages.getString("MakeBuilder.Updating_project")); //$NON-NLS-1$ monitor.subTask(ManagedMakeMessages.getResourceString("MakeBuilder.Updating_project")); //$NON-NLS-1$
try { try {
// Do not allow the cancel of the refresh, since the builder is external // Do not allow the cancel of the refresh, since the builder is external
@ -1497,7 +1496,7 @@ public class CommonBuilder extends ACBuilder {
buf.append(' '); buf.append(' ');
} }
String errorDesc = MakeMessages.getFormattedString("MakeBuilder.buildError", buf.toString()); //$NON-NLS-1$ String errorDesc = ManagedMakeMessages.getFormattedString("MakeBuilder.buildError", buf.toString()); //$NON-NLS-1$
buf = new StringBuffer(errorDesc); buf = new StringBuffer(errorDesc);
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$ buf.append("(").append(errMsg).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
@ -1508,7 +1507,7 @@ public class CommonBuilder extends ACBuilder {
stdout.close(); stdout.close();
stderr.close(); stderr.close();
monitor.subTask(MakeMessages.getString("MakeBuilder.Creating_Markers")); //$NON-NLS-1$ monitor.subTask(ManagedMakeMessages.getResourceString("MakeBuilder.Creating_Markers")); //$NON-NLS-1$
consoleOut.close(); consoleOut.close();
consoleErr.close(); consoleErr.close();
epm.reportProblems(); epm.reportProblems();
@ -1564,7 +1563,7 @@ public class CommonBuilder extends ACBuilder {
} }
if(preBuildStep != null && preBuildStep.length() != 0){ if(preBuildStep != null && preBuildStep.length() != 0){
targetsArray = new String[]{"pre-build", "main-build"}; targetsArray = new String[]{"pre-build", "main-build"}; //$NON-NLS-1$ //$NON-NLS-2$
} }
} }

View file

@ -896,7 +896,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
private IFolderInfo createRootFolderInfo(){ private IFolderInfo createRootFolderInfo(){
String id = ManagedBuildManager.calculateChildId(this.id, null); String id = ManagedBuildManager.calculateChildId(this.id, null);
String name = "/"; String name = "/"; //$NON-NLS-1$
rootFolderInfo = new FolderInfo(this, new Path(name), id, name, isExtensionConfig); rootFolderInfo = new FolderInfo(this, new Path(name), id, name, isExtensionConfig);
addResourceConfiguration(rootFolderInfo); addResourceConfiguration(rootFolderInfo);
@ -2193,7 +2193,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
if(sourcePaths == null){ if(sourcePaths == null){
if(parent != null) if(parent != null)
return parent.getSourcePaths(); return parent.getSourcePaths();
return new IPath[]{new Path("")}; return new IPath[]{new Path("")}; //$NON-NLS-1$
} }
return (IPath[])sourcePaths.clone(); return (IPath[])sourcePaths.clone();
@ -2220,7 +2220,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(ids[0]); buf.append(ids[0]);
for(int i = 1; i < ids.length; i++){ for(int i = 1; i < ids.length; i++){
buf.append(";").append(ids[i]); buf.append(";").append(ids[i]); //$NON-NLS-1$
} }
errorParserIds = buf.toString(); errorParserIds = buf.toString();
} }

View file

@ -24,7 +24,6 @@ import org.eclipse.cdt.core.CCProjectNature;
import org.eclipse.cdt.core.CProjectNature; import org.eclipse.cdt.core.CProjectNature;
import org.eclipse.cdt.core.settings.model.ICSettingBase; import org.eclipse.cdt.core.settings.model.ICSettingBase;
import org.eclipse.cdt.core.settings.model.ICStorageElement; import org.eclipse.cdt.core.settings.model.ICStorageElement;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationDataProvider;
import org.eclipse.cdt.core.settings.model.extension.CFolderData; import org.eclipse.cdt.core.settings.model.extension.CFolderData;
import org.eclipse.cdt.core.settings.model.extension.CLanguageData; import org.eclipse.cdt.core.settings.model.extension.CLanguageData;
import org.eclipse.cdt.core.settings.model.util.CDataUtil; import org.eclipse.cdt.core.settings.model.util.CDataUtil;
@ -105,9 +104,9 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
isExtensionElement = true; isExtensionElement = true;
IManagedConfigElement tcEl = null; IManagedConfigElement tcEl = null;
if(!hasBody){ if(!hasBody){
setPath(new Path("/")); setPath(Path.ROOT);
setId(ManagedBuildManager.calculateChildId(parent.getId(), null)); setId(ManagedBuildManager.calculateChildId(parent.getId(), null));
setName("/"); setName("/"); //$NON-NLS-1$
tcEl = element; tcEl = element;
} else { } else {
IManagedConfigElement children[] = element.getChildren(IToolChain.TOOL_CHAIN_ELEMENT_NAME); IManagedConfigElement children[] = element.getChildren(IToolChain.TOOL_CHAIN_ELEMENT_NAME);
@ -127,9 +126,9 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
setResourceData(new BuildFolderData(this)); setResourceData(new BuildFolderData(this));
ICStorageElement tcEl = null; ICStorageElement tcEl = null;
if(!hasBody){ if(!hasBody){
setPath(new Path("/")); setPath(Path.ROOT);
setId(ManagedBuildManager.calculateChildId(parent.getId(), null)); setId(ManagedBuildManager.calculateChildId(parent.getId(), null));
setName("/"); setName("/"); //$NON-NLS-1$
tcEl = element; tcEl = element;
} else { } else {
ICStorageElement nodes[] = element.getChildren(); ICStorageElement nodes[] = element.getChildren();
@ -238,7 +237,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
tp = new TargetPlatform(newChain, subId, tpBase.getName(), (TargetPlatform)tpBase); tp = new TargetPlatform(newChain, subId, tpBase.getName(), (TargetPlatform)tpBase);
} else { } else {
subId = copyIds ? tpBase.getId() : ManagedBuildManager.calculateChildId(getId(), null); subId = copyIds ? tpBase.getId() : ManagedBuildManager.calculateChildId(getId(), null);
subName = tpBase != null ? tpBase.getName() : ""; subName = tpBase != null ? tpBase.getName() : ""; //$NON-NLS-1$
tp = new TargetPlatform((ToolChain)newChain, null, subId, subName, false); tp = new TargetPlatform((ToolChain)newChain, null, subId, subName, false);
} }
@ -457,7 +456,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
public ITool getToolFromOutputExtension(String extension) { public ITool getToolFromOutputExtension(String extension) {
// Treat a null argument as an empty string // Treat a null argument as an empty string
String ext = extension == null ? "" : extension; String ext = extension == null ? "" : extension; //$NON-NLS-1$
// Get all the tools for the current config // Get all the tools for the current config
ITool[] tools = getFilteredTools(); ITool[] tools = getFilteredTools();
for (int index = 0; index < tools.length; index++) { for (int index = 0; index < tools.length; index++) {
@ -772,7 +771,7 @@ public class FolderInfo extends ResourceInfo implements IFolderInfo {
void updateToolChainWithConverter(IConfigurationElement el, IToolChain newSuperClass, String Id, String name) throws BuildException{ void updateToolChainWithConverter(IConfigurationElement el, IToolChain newSuperClass, String Id, String name) throws BuildException{
IBuildObject bo = ManagedBuildManager.convert(getToolChain(), newSuperClass.getId(), true); IBuildObject bo = ManagedBuildManager.convert(getToolChain(), newSuperClass.getId(), true);
if(!(bo instanceof ToolChain)){ if(!(bo instanceof ToolChain)){
throw new BuildException("converter invocation failed"); throw new BuildException(ManagedMakeMessages.getResourceString("FolderInfo.4")); //$NON-NLS-1$
} }
if(toolChain != bo){ if(toolChain != bo){
setUpdatedToolChain((ToolChain)bo); setUpdatedToolChain((ToolChain)bo);

View file

@ -1296,14 +1296,25 @@ public class GeneratedMakefileBuilder extends ACBuilder {
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$ buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$//$NON-NLS-2$
// Report time and number of threads used // Report time and number of threads used
buf.append("Time consumed: "); // buf.append("Time consumed: ");
buf.append(t2 - t1); // buf.append(t2 - t1);
buf.append(" ms. "); // buf.append(" ms. ");
// if (isParallel) {
// buf.append("Parallel threads used: ");
// buf.append(ParallelBuilder.lastThreadsUsed);
// }
// buf.append("\n");
// Report time and number of threads used
buf.append(ManagedMakeMessages.getFormattedString("CommonBuilder.6", Integer.toString((int)(t2 - t1)))); //$NON-NLS-1$
// buf.append(t2 - t1);
// buf.append(" ms. ");
if (isParallel) { if (isParallel) {
buf.append("Parallel threads used: "); buf.append(ManagedMakeMessages.getFormattedString("CommonBuilder.7", Integer.toString(ParallelBuilder.lastThreadsUsed))); //$NON-NLS-1$
buf.append(ParallelBuilder.lastThreadsUsed); // buf.append(ParallelBuilder.lastThreadsUsed);
} }
buf.append("\n"); buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
// Write message on the console // Write message on the console
consoleOutStream.write(buf.toString().getBytes()); consoleOutStream.write(buf.toString().getBytes());
consoleOutStream.flush(); consoleOutStream.flush();
@ -1583,7 +1594,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
public void cleanFile(IFile file, IProgressMonitor monitor) { public void cleanFile(IFile file, IProgressMonitor monitor) {
monitor.subTask("Cleaning output file(s) for " monitor.subTask(ManagedMakeMessages.getResourceString("GeneratedMakefileBuilder.0") //$NON-NLS-1$
+ file.getProjectRelativePath()); + file.getProjectRelativePath());
// remove all markers on the file // remove all markers on the file

View file

@ -613,7 +613,7 @@ public class InputType extends BuildObject implements IInputType {
if(array == null) if(array == null)
return null; return null;
if(array.length == 0) if(array.length == 0)
return ""; return ""; //$NON-NLS-1$
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(array[0]); buf.append(array[0]);
@ -1052,10 +1052,10 @@ public class InputType extends BuildObject implements IInputType {
// TODO: This is a temporary hack until we decide how to specify the langauge (C vs. C++) // TODO: This is a temporary hack until we decide how to specify the langauge (C vs. C++)
// of a .h file. If the content type is the CDT-defined C/C++ content type, then // of a .h file. If the content type is the CDT-defined C/C++ content type, then
// add "h" to the list if it is not already there. // add "h" to the list if it is not already there.
if (type.getId().compareTo("org.eclipse.cdt.core.cxxHeader") == 0) { // $NON-NLS-1$ if (type.getId().compareTo("org.eclipse.cdt.core.cxxHeader") == 0) { //$NON-NLS-1$
boolean h_found = false; boolean h_found = false;
for (int i=0; i<exts.length; i++) { for (int i=0; i<exts.length; i++) {
if (exts[i].compareTo("h") == 0) { // $NON-NLS-1$ if (exts[i].compareTo("h") == 0) { //$NON-NLS-1$
h_found = true; h_found = true;
break; break;
} }
@ -1066,7 +1066,7 @@ public class InputType extends BuildObject implements IInputType {
for (; i<exts.length; i++) { for (; i<exts.length; i++) {
cppexts[i] = exts[i]; cppexts[i] = exts[i];
} }
cppexts[i] = "h"; // $NON-NLS-1$ cppexts[i] = "h"; //$NON-NLS-1$
return cppexts; return cppexts;
} }
} }

View file

@ -23,9 +23,9 @@ public class MapStorageElement implements ICStorageElement {
private HashMap fMap; private HashMap fMap;
private String fName; private String fName;
private MapStorageElement fParent; private MapStorageElement fParent;
private static final String CHILDREN_KEY = "?children?"; private static final String CHILDREN_KEY = "?children?"; //$NON-NLS-1$
private static final String NAME_KEY = "?name?"; private static final String NAME_KEY = "?name?"; //$NON-NLS-1$
private static final String VALUE_KEY = "?value?"; private static final String VALUE_KEY = "?value?"; //$NON-NLS-1$
private List fChildren = new ArrayList(); private List fChildren = new ArrayList();
private String fValue; private String fValue;

View file

@ -33,7 +33,7 @@ public class ModificationStatus extends Status implements IModificationStatus {
Set undefinedProps, Set undefinedProps,
ITool[][] conflicts, ITool[][] conflicts,
ITool nonMbsTools[]){ ITool nonMbsTools[]){
super(IStatus.OK, ManagedBuilderCorePlugin.getUniqueIdentifier(), ""); super(IStatus.OK, ManagedBuilderCorePlugin.getUniqueIdentifier(), ""); //$NON-NLS-1$
int severity = IStatus.OK; int severity = IStatus.OK;
int flags = 0; int flags = 0;

View file

@ -85,6 +85,10 @@ MakefileGenerator.comment.module.dep.includes = Include automatically-generated
MakefileGenerator.comment.autodeps=Automatically-generated dependency list: MakefileGenerator.comment.autodeps=Automatically-generated dependency list:
MakefileGenerator.comment.header=Automatically-generated file. Do not edit! MakefileGenerator.comment.header=Automatically-generated file. Do not edit!
MakefileGenerator.error.spaces=Cannot generate makefile for folder with spaces in name MakefileGenerator.error.spaces=Cannot generate makefile for folder with spaces in name
MakeBuilder.Invoking_Make_Builder=Invoking Make Builder...
MakeBuilder.Invoking_Command=Invoking Command:
MakeBuilder.Updating_project=Updating project...
MakeBuilder.Creating_Markers=Generating markers...
MakefileGenerator.warning.no.source=Nothing to build for project {0} MakefileGenerator.warning.no.source=Nothing to build for project {0}
MakefileGenerator.error.no.nameprovider=A nameProvider or outputNames must be specified with multipleType == true MakefileGenerator.error.no.nameprovider=A nameProvider or outputNames must be specified with multipleType == true
@ -112,6 +116,7 @@ BuildMacroStatus.status.macro.not.string=Macro {0} is not of String type
BuildMacroStatus.status.macro.not.stringlist=Macro {0} is not of String-list type BuildMacroStatus.status.macro.not.stringlist=Macro {0} is not of String-list type
BuildMacroStatus.status.error=Error occured BuildMacroStatus.status.error=Error occured
BuildMacroStatus.value.undefined= BuildMacroStatus.value.undefined=
BuildInfoFactory.Missing_Builder=Missing Builder:
#ResourceChangeHandler messages #ResourceChangeHandler messages
ResourceChangeHandler.buildInfoSerializationJob=Build Info Serialization ResourceChangeHandler.buildInfoSerializationJob=Build Info Serialization
@ -122,6 +127,7 @@ GeneratedMakefileBuilder.buildResourcesFinished=Build of selected resources is c
GeneratedMakefileBuilder.buildSelectedIncremental=Building selected file(s) incrementally GeneratedMakefileBuilder.buildSelectedIncremental=Building selected file(s) incrementally
GeneratedMakefileBuilder.buildSelectedRebuild=Rebuilding selected file(s) GeneratedMakefileBuilder.buildSelectedRebuild=Rebuilding selected file(s)
GeneratedMakefileBuilder.buildingFile=Building file GeneratedMakefileBuilder.buildingFile=Building file
GeneratedMakefileBuilder.0=Cleaning output file(s) for
BuildFilesAction.building=Building BuildFilesAction.building=Building
BuildFilesAction.buildFiles=Build File(s) BuildFilesAction.buildFiles=Build File(s)
ManagedBuilderCorePlugin.resourceChangeHandlingInitializationJob=Initializing Resource Change Handling ManagedBuilderCorePlugin.resourceChangeHandlingInitializationJob=Initializing Resource Change Handling
@ -132,3 +138,17 @@ InternalBuilder.nothing.todo=Nothing to be done for project {0}
CleanFilesAction.cleanFiles=Clean File(s) CleanFilesAction.cleanFiles=Clean File(s)
CleanFilesAction.cleanSelectedFiles=Clean the selected file(s). CleanFilesAction.cleanSelectedFiles=Clean the selected file(s).
CleanFilesAction.cleaningFiles=Cleaning files CleanFilesAction.cleaningFiles=Cleaning files
BuilderFactory.1=can not find builder with the specified id
FolderInfo.4=converter invocation failed
MbsMacroSupplier.1=tool parent must be one of configuration, toolchain, or resource configuration
MbsMacroSupplier.2=tool parent must be one of configuration, toolchain, or resource configuration
GnuLinkOutputNameProvider.0=tool parent must be one of configuration, toolchain, or resource configuration
CommonBuilder.1=customized builder created for builder that does not support customization
CommonBuilder.2=request for building non active configuration for the builder that does not support this
CommonBuilder.6=Time consumed: {0} ms.
CommonBuilder.7=Parallel threads used: {0}
CommonBuilder.0=can not clean programmatically: build workspace path is not specified
CommonBuilder.16=can not clean programmatically: build workspace path is not the project path
CommonBuilder.12=can not clean programmatically: build workspace path is not folder
CommonBuilder.13=can not clean programmatically: build folder is not accessible
MakeBuilder.buildError=

View file

@ -278,7 +278,7 @@ public abstract class ResourceInfo extends BuildObject implements IResourceInfo
} }
if (isExcluded) { if (isExcluded) {
element.setAttribute(IResourceInfo.EXCLUDE, "true"); element.setAttribute(IResourceInfo.EXCLUDE, "true"); //$NON-NLS-1$
} }
if (path != null) { if (path != null) {

View file

@ -16,8 +16,8 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
class SourcePath { class SourcePath {
static final String ELEMENT_NAME = "sourcePath"; static final String ELEMENT_NAME = "sourcePath"; //$NON-NLS-1$
private static final String ATTRIBUTE_PATH = "path"; private static final String ATTRIBUTE_PATH = "path"; //$NON-NLS-1$
private IPath path; private IPath path;
SourcePath(IPath path) { SourcePath(IPath path) {

View file

@ -3694,7 +3694,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
String name = getName(); String name = getName();
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId()); String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
if(version != null && version.length() != 0){ if(version != null && version.length() != 0){
return new StringBuffer().append(name).append(" (").append(version).append("").toString(); return new StringBuffer().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
} }
return name; return name;
} }
@ -3809,7 +3809,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(ids[0]); buf.append(ids[0]);
for(int i = 1; i < ids.length; i++){ for(int i = 1; i < ids.length; i++){
buf.append(";").append(ids[i]); buf.append(";").append(ids[i]); //$NON-NLS-1$
} }
errorParserIds = buf.toString(); errorParserIds = buf.toString();
} }
@ -3833,7 +3833,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
if(version != null){ if(version != null){
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(name); buf.append(name);
buf.append(" (v").append(version).append(")"); buf.append(" (v").append(version).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
name = buf.toString(); name = buf.toString();
} }
} }

View file

@ -2091,7 +2091,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
targetPlatform = new TargetPlatform(this, subId, platform.getName(), (TargetPlatform)extPlatform); targetPlatform = new TargetPlatform(this, subId, platform.getName(), (TargetPlatform)extPlatform);
} else { } else {
String subId = ManagedBuildManager.calculateChildId(getId(), null); String subId = ManagedBuildManager.calculateChildId(getId(), null);
targetPlatform = new TargetPlatform(this, null, subId, "", false); targetPlatform = new TargetPlatform(this, null, subId, "", false); //$NON-NLS-1$
} }
} }
@ -2340,7 +2340,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
String name = getName(); String name = getName();
String version = ManagedBuildManager.getVersionFromIdAndVersion(getId()); String version = ManagedBuildManager.getVersionFromIdAndVersion(getId());
if(version != null && version.length() != 0){ if(version != null && version.length() != 0){
return new StringBuffer().append(name).append(" (").append(version).append("").toString(); return new StringBuffer().append(name).append(" (").append(version).append("").toString(); //$NON-NLS-1$ //$NON-NLS-2$
} }
return name; return name;
} }
@ -2550,7 +2550,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(ids[0]); buf.append(ids[0]);
for(int i = 1; i < ids.length; i++){ for(int i = 1; i < ids.length; i++){
buf.append(";").append(ids[i]); buf.append(";").append(ids[i]); //$NON-NLS-1$
} }
errorParserIds = buf.toString(); errorParserIds = buf.toString();
} }
@ -2565,7 +2565,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
if(version != null){ if(version != null){
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
buf.append(name); buf.append(name);
buf.append(" (v").append(version).append(")"); buf.append(" (v").append(version).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
name = buf.toString(); name = buf.toString();
} }
} }

View file

@ -40,7 +40,7 @@ public class BuildBuildData extends CBuildData {
private IPath createAbsolutePathFromWorkspacePath(IPath path){ private IPath createAbsolutePathFromWorkspacePath(IPath path){
IStringVariableManager mngr = VariablesPlugin.getDefault().getStringVariableManager(); IStringVariableManager mngr = VariablesPlugin.getDefault().getStringVariableManager();
String locationString = mngr.generateVariableExpression("workspace_loc", path.toString()); String locationString = mngr.generateVariableExpression("workspace_loc", path.toString()); //$NON-NLS-1$
return new Path(locationString); return new Path(locationString);
} }

View file

@ -55,9 +55,9 @@ public class BuildLanguageData extends CLanguageData {
typeId = extType.getId(); typeId = extType.getId();
else else
typeId = inType.getId(); typeId = inType.getId();
fId = new StringBuffer(fTool.getId()).append(".").append(typeId).toString(); fId = new StringBuffer(fTool.getId()).append(".").append(typeId).toString(); //$NON-NLS-1$
} else { } else {
fId = new StringBuffer(fTool.getId()).append(".").append("languagedata").toString(); fId = new StringBuffer(fTool.getId()).append(".").append("languagedata").toString(); //$NON-NLS-1$ //$NON-NLS-2$
} }
fDiscoveredInfo = new ProfileInfoProvider(this); fDiscoveredInfo = new ProfileInfoProvider(this);

View file

@ -0,0 +1,32 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Intel Corporation - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.dataprovider;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
public class DataProviderMessages {
private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.internal.dataprovider.DataProviderMessages"; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
private DataProviderMessages() {
}
public static String getString(String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
}
}
}

View file

@ -0,0 +1,19 @@
###############################################################################
# Copyright (c) 2007 Intel Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Intel Corporation - Initial API and implementation
###############################################################################
ProjectConverter.0=the specified project is not an CDT project
ProjectConverter.1=the specified project is not an old style make project, the owner ID is
ProjectConverter.2=the specified project is not an old style project: the number of configurations is
ProjectConverter.3=the specified project is not an old style project: the number of configurations is
ProjectConverter.4=the specified project is not an old style make project: nature IDs are
ProjectConverter.5=the specified project can not be converted
ProjectConverter.6=the project conversion failed
ProjectConverter.7=targets conversion
ProjectConverter.8=the project conversion failed due to unknown reason

View file

@ -377,7 +377,7 @@ public class ProjectConverter implements ICProjectConverter {
if(throwExceptions) if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the specified project is not an CDT project")); DataProviderMessages.getString("ProjectConverter.0"))); //$NON-NLS-1$
return false; return false;
} }
@ -385,7 +385,7 @@ public class ProjectConverter implements ICProjectConverter {
if(throwExceptions) if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the specified project is not an old style make project, the owner ID is " + dr.getProjectOwner().getID())); DataProviderMessages.getString("ProjectConverter.1") + dr.getProjectOwner().getID())); //$NON-NLS-1$
return false; return false;
} }
@ -395,7 +395,7 @@ public class ProjectConverter implements ICProjectConverter {
if(throwExceptions) if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the specified project is not an old style project: the number of configurations is " + cfgs.length)); DataProviderMessages.getString("ProjectConverter.2") + cfgs.length)); //$NON-NLS-1$
return false; return false;
} }
@ -403,7 +403,7 @@ public class ProjectConverter implements ICProjectConverter {
if(throwExceptions) if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the specified project is not an old style project: the number of configurations is " + cfgs.length)); DataProviderMessages.getString("ProjectConverter.3") + cfgs.length)); //$NON-NLS-1$
return false; return false;
} }
@ -414,7 +414,7 @@ public class ProjectConverter implements ICProjectConverter {
if(throwExceptions) if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the specified project is not an old style make project: nature IDs are " + natureIds.toString())); DataProviderMessages.getString("ProjectConverter.4") + natureIds.toString())); //$NON-NLS-1$
return false; return false;
} }
@ -425,7 +425,7 @@ public class ProjectConverter implements ICProjectConverter {
if(throwExceptions) if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the specified project can not be converted")); DataProviderMessages.getString("ProjectConverter.5"))); //$NON-NLS-1$
return false; return false;
} }
@ -434,7 +434,7 @@ public class ProjectConverter implements ICProjectConverter {
if(throwExceptions) if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the project conversion failed")); DataProviderMessages.getString("ProjectConverter.6"))); //$NON-NLS-1$
return false; return false;
} }
@ -445,7 +445,7 @@ public class ProjectConverter implements ICProjectConverter {
throws CoreException { throws CoreException {
project.setDescription(eDes, monitor); project.setDescription(eDes, monitor);
CCorePlugin.getDefault().setProjectDescription(project, newDes); CCorePlugin.getDefault().setProjectDescription(project, newDes);
Job job = new Job("targets conversion"){ Job job = new Job(DataProviderMessages.getString("ProjectConverter.7")){ //$NON-NLS-1$
protected IStatus run(IProgressMonitor monitor) { protected IStatus run(IProgressMonitor monitor) {
try { try {
@ -475,7 +475,7 @@ public class ProjectConverter implements ICProjectConverter {
if(throwExceptions) if(throwExceptions)
throw new CoreException(new Status(IStatus.ERROR, throw new CoreException(new Status(IStatus.ERROR,
ManagedBuilderCorePlugin.getUniqueIdentifier(), ManagedBuilderCorePlugin.getUniqueIdentifier(),
"the project conversion failed due to unknown reason")); DataProviderMessages.getString("ProjectConverter.8"))); //$NON-NLS-1$
return false; return false;
} }

View file

@ -25,6 +25,7 @@ import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.internal.core.ManagedMakeMessages;
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException; import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
import org.eclipse.cdt.managedbuilder.macros.IBuildMacro; import org.eclipse.cdt.managedbuilder.macros.IBuildMacro;
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider; import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
@ -384,7 +385,7 @@ public class MbsMacroSupplier extends BuildCdtVariablesSupplierBase {
if(!canHandle(optionContext)) if(!canHandle(optionContext))
optionContext = null; optionContext = null;
macro = new OptionMacro(macroName,optionContext); macro = new OptionMacro(macroName,optionContext);
} else if("ParentVersion".equals(macroName)){ } else if("ParentVersion".equals(macroName)){ //$NON-NLS-1$
IHoldsOptions holder = OptionContextData.getHolder(optionContext); IHoldsOptions holder = OptionContextData.getHolder(optionContext);
if(holder != null && holder.getVersion() != null) if(holder != null && holder.getVersion() != null)
macro = new BuildMacro(macroName,IBuildMacro.VALUE_TEXT,holder.getVersion().toString()); macro = new BuildMacro(macroName,IBuildMacro.VALUE_TEXT,holder.getVersion().toString());
@ -454,7 +455,7 @@ public class MbsMacroSupplier extends BuildCdtVariablesSupplierBase {
else { else {
// bad // bad
throw new AssertionError( throw new AssertionError(
"tool parent must be one of configuration, toolchain, or resource configuration"); ManagedMakeMessages.getResourceString("MbsMacroSupplier.1")); //$NON-NLS-1$
} }
if (config != null) { if (config != null) {
@ -514,7 +515,7 @@ public class MbsMacroSupplier extends BuildCdtVariablesSupplierBase {
else { else {
// bad // bad
throw new AssertionError( throw new AssertionError(
"tool parent must be one of configuration, toolchain, or resource configuration"); ManagedMakeMessages.getResourceString("MbsMacroSupplier.2")); //$NON-NLS-1$
} }
if (config != null) { if (config != null) {

View file

@ -127,7 +127,7 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
String resolvedCommand = null; String resolvedCommand = null;
// does the resource have spaces in its name? // does the resource have spaces in its name?
if (resource.getProjectRelativePath().toString().indexOf(" ") != -1) { if (resource.getProjectRelativePath().toString().indexOf(" ") != -1) { //$NON-NLS-1$
// use fully qualified strings // use fully qualified strings
resolvedCommand = ManagedBuildManager resolvedCommand = ManagedBuildManager
.getBuildMacroProvider() .getBuildMacroProvider()
@ -182,7 +182,7 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
String resolvedCommand = null; String resolvedCommand = null;
// does the resource have spaces in its name? // does the resource have spaces in its name?
if (resource.getProjectRelativePath().toString().indexOf(" ") != -1) { if (resource.getProjectRelativePath().toString().indexOf(" ") != -1) { //$NON-NLS-1$
// use fully qualified strings // use fully qualified strings
resolvedCommand = ManagedBuildManager resolvedCommand = ManagedBuildManager
.getBuildMacroProvider() .getBuildMacroProvider()
@ -260,7 +260,7 @@ public class DefaultGCCDependencyCalculator implements IManagedDependencyGenerat
String resolvedCommand = null; String resolvedCommand = null;
// does the resource have spaces in its name? // does the resource have spaces in its name?
if (resource.getProjectRelativePath().toString().indexOf(" ") != -1) { if (resource.getProjectRelativePath().toString().indexOf(" ") != -1) { //$NON-NLS-1$
// use fully qualified strings // use fully qualified strings
resolvedCommand = ManagedBuildManager resolvedCommand = ManagedBuildManager
.getBuildMacroProvider() .getBuildMacroProvider()

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005 Intel Corporation and others. * Copyright (c) 2005, 2007 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -19,6 +19,7 @@ import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.cdt.managedbuilder.core.ITool;
import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.internal.core.ManagedMakeMessages;
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException; import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider; import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator; import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
@ -114,7 +115,7 @@ public class GnuLinkOutputNameProvider implements IManagedOutputNameProvider {
else { else {
// bad // bad
throw new AssertionError( throw new AssertionError(
"tool parent must be one of configuration, toolchain, or resource configuration"); ManagedMakeMessages.getResourceString("GnuLinkOutputNameProvider.0")); //$NON-NLS-1$
} }
if (config != null) { if (config != null) {

View file

@ -1221,7 +1221,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
IPath projectRelativePath = subDir.getProjectRelativePath(); IPath projectRelativePath = subDir.getProjectRelativePath();
if(!projectRelativePath.toString().equals("")) //$NON-NLS-1$ if(!projectRelativePath.toString().equals("")) //$NON-NLS-1$
buffer.append("-include " + escapeWhitespaces(projectRelativePath.toString()) + SEPARATOR + "subdir.mk"+ NEWLINE); //$NON-NLS-1$ buffer.append("-include " + escapeWhitespaces(projectRelativePath.toString()) + SEPARATOR + "subdir.mk"+ NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$
} }
buffer.append("-include objects.mk" + NEWLINE + NEWLINE); //$NON-NLS-1$ buffer.append("-include objects.mk" + NEWLINE + NEWLINE); //$NON-NLS-1$
@ -3544,7 +3544,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
String[] bufferLines = inBufferString.split("[\\r\\n]"); //$NON-NLS-1$ String[] bufferLines = inBufferString.split("[\\r\\n]"); //$NON-NLS-1$
for (int i=0; i<bufferLines.length; i++) { for (int i=0; i<bufferLines.length; i++) {
String bufferLine = bufferLines[i]; String bufferLine = bufferLines[i];
if (bufferLine.endsWith(":")) { if (bufferLine.endsWith(":")) { //$NON-NLS-1$
StringBuffer outBuffer = addDefaultHeader(); StringBuffer outBuffer = addDefaultHeader();
outBuffer.append(inBuffer); outBuffer.append(inBuffer);
Util.save(outBuffer, makefile); Util.save(outBuffer, makefile);
@ -3703,7 +3703,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
* @return * @return
*/ */
static public String escapedEcho(String string) { static public String escapedEcho(String string) {
String escapedString = string.replaceAll("'", "'\"'\"'"); String escapedString = string.replaceAll("'", "'\"'\"'"); //$NON-NLS-1$ //$NON-NLS-2$
return ECHO + WHITESPACE + SINGLE_QUOTE + escapedString + SINGLE_QUOTE + NEWLINE; return ECHO + WHITESPACE + SINGLE_QUOTE + escapedString + SINGLE_QUOTE + NEWLINE;
} }
@ -3736,7 +3736,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
static public boolean containsSpecialCharacters(String path) static public boolean containsSpecialCharacters(String path)
{ {
return path.matches(".*(\\s|[\\{\\}\\(\\)\\$\\@%=;]).*"); return path.matches(".*(\\s|[\\{\\}\\(\\)\\$\\@%=;]).*"); //$NON-NLS-1$
} }
/* (non-Javadoc) /* (non-Javadoc)
@ -4344,7 +4344,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
if(folderPath != null){ if(folderPath != null){
folderPath = folderPath.removeFirstSegments(1); folderPath = folderPath.removeFirstSegments(1);
} else { } else {
folderPath = new Path(""); folderPath = new Path(""); //$NON-NLS-1$
} }
IResourceInfo rcInfo = config.getResourceInfo(folderPath, false); IResourceInfo rcInfo = config.getResourceInfo(folderPath, false);
if(rcInfo instanceof IFileInfo){ if(rcInfo instanceof IFileInfo){
@ -4388,7 +4388,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
if(folderPath != null){ if(folderPath != null){
folderPath = folderPath.removeFirstSegments(1); folderPath = folderPath.removeFirstSegments(1);
} else { } else {
folderPath = new Path(""); folderPath = new Path(""); //$NON-NLS-1$
} }
ToolInfoHolder h = getToolInfo(folderPath); ToolInfoHolder h = getToolInfo(folderPath);
ITool[] tools = h.buildTools; ITool[] tools = h.buildTools;
@ -4594,8 +4594,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
* @return a String without the outermost quotes (if the input has them) * @return a String without the outermost quotes (if the input has them)
*/ */
public static String ensureUnquoted(String path) { public static String ensureUnquoted(String path) {
boolean doubleQuoted = path.startsWith("\"") && path.endsWith("\""); boolean doubleQuoted = path.startsWith("\"") && path.endsWith("\""); //$NON-NLS-1$ //$NON-NLS-2$
boolean singleQuoted = path.startsWith("'") && path.endsWith("'"); boolean singleQuoted = path.startsWith("'") && path.endsWith("'"); //$NON-NLS-1$ //$NON-NLS-2$
return doubleQuoted || singleQuoted ? path.substring(1,path.length()-1) : path; return doubleQuoted || singleQuoted ? path.substring(1,path.length()-1) : path;
} }
@ -4658,7 +4658,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 {
srcPaths = config.getSourcePaths(); srcPaths = config.getSourcePaths();
if(srcPaths.length == 0){ if(srcPaths.length == 0){
srcPaths = new IPath[]{new Path("")}; srcPaths = new IPath[]{new Path("")}; //$NON-NLS-1$
} else { } else {
} }
} }

View file

@ -1,5 +1,5 @@
/********************************************************************** /**********************************************************************
* Copyright (c) 2006 QNX Software Systems and others. * Copyright (c) 2006, 2007 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -32,7 +32,7 @@ public class PDOMDependencyGenerator implements IManagedDependencyGenerator2 {
} }
public String getDependencyFileExtension(IConfiguration buildContext, ITool tool) { public String getDependencyFileExtension(IConfiguration buildContext, ITool tool) {
return ""; return ""; //$NON-NLS-1$
} }
public IManagedDependencyInfo getDependencySourceInfo(IPath source, IBuildObject buildContext, ITool tool, IPath topBuildDirectory) { public IManagedDependencyInfo getDependencySourceInfo(IPath source, IBuildObject buildContext, ITool tool, IPath topBuildDirectory) {

View file

@ -10,10 +10,6 @@
############################################################################### ###############################################################################
MakeBuilder.buildError=Error launching builder ({0}) MakeBuilder.buildError=Error launching builder ({0})
MakeBuilder.Invoking_Make_Builder=Invoking Make Builder...
MakeBuilder.Invoking_Command=Invoking Command:
MakeBuilder.Updating_project=Updating project...
MakeBuilder.Creating_Markers=Generating markers...
BuildInfoFactory.Missing_Builder=Missing Builder: BuildInfoFactory.Missing_Builder=Missing Builder:

View file

@ -1,3 +1,13 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Intel Corporation - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.settings.model.util; package org.eclipse.cdt.core.settings.model.util;
import java.util.MissingResourceException; import java.util.MissingResourceException;

View file

@ -1,3 +1,13 @@
###############################################################################
# Copyright (c) 2007 Intel Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Intel Corporation - Initial API and implementation
###############################################################################
KindBasedStore.0=illegal kind KindBasedStore.0=illegal kind
KindBasedStore.1=illegal kind KindBasedStore.1=illegal kind
PathEntryTranslator.0=illegal kind PathEntryTranslator.0=illegal kind

View file

@ -1,3 +1,13 @@
/*******************************************************************************
* Copyright (c) 2007 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Intel Corporation - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.settings.model; package org.eclipse.cdt.internal.core.settings.model;
import java.util.MissingResourceException; import java.util.MissingResourceException;

View file

@ -1,3 +1,13 @@
###############################################################################
# Copyright (c) 2007 Intel Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# Intel Corporation - Initial API and implementation
###############################################################################
CConfigurationDataProviderDescriptor.1=illegal provider implementation CConfigurationDataProviderDescriptor.1=illegal provider implementation
CConfigurationDataProviderDescriptor.2=no provider defined CConfigurationDataProviderDescriptor.2=no provider defined
CConfigurationDescription.0=data was not created CConfigurationDescription.0=data was not created