mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Externalization fixes
This commit is contained in:
parent
12558f79f6
commit
fd6bc8ef1a
22 changed files with 139 additions and 70 deletions
|
@ -67,7 +67,7 @@ public class MakeCorePlugin extends Plugin {
|
|||
public static final String MAKEFILE_STYLE = PLUGIN_ID + "editor_makefile_style"; //$NON-NLS-1$
|
||||
public static final String MAKEFILE_DIRS = PLUGIN_ID + "editor_makefile_dirs"; //$NON-NLS-1$
|
||||
|
||||
public static final String CFG_DATA_PROVIDER_ID = PLUGIN_ID + ".configurationDataProvider";
|
||||
public static final String CFG_DATA_PROVIDER_ID = PLUGIN_ID + ".configurationDataProvider"; //$NON-NLS-1$
|
||||
private MakeTargetManager fTargetManager;
|
||||
private DiscoveredPathManager fDiscoveryPathManager;
|
||||
//The shared instance.
|
||||
|
|
|
@ -92,7 +92,7 @@ public class ScannerConfigBuilder extends ACBuilder {
|
|||
|
||||
ICConfigurationDescription[] cfgs = des.getConfigurations();
|
||||
IScannerConfigBuilderInfo2Set container = ScannerConfigProfileManager.createScannerConfigBuildInfo2Set(project);
|
||||
monitor.beginTask("building per-configuratin info", cfgs.length + 1);
|
||||
monitor.beginTask(MakeMessages.getString("ScannerConfigBuilder.0"), cfgs.length + 1); //$NON-NLS-1$
|
||||
boolean wasbuilt = false;
|
||||
for(int i = 0; i < cfgs.length; i++){
|
||||
ICConfigurationDescription cfg = cfgs[i];
|
||||
|
|
|
@ -26,6 +26,7 @@ MakeTargetManager.error_writing_file=Error writing target file
|
|||
ProjectTargets.error_reading_project_targets=Error reading project targets.
|
||||
|
||||
ScannerConfigBuilder.Invoking_Builder=Invoking scanner config builder on project
|
||||
ScannerConfigBuilder.0=building per-configuratin info
|
||||
ScannerConfigNature.Missing_Project=Missing or closed project
|
||||
|
||||
ScannerConfigInfoFactory.Missing_Builder=Missing Builder:
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
public class MakeConfigurationDataProvider extends CDefaultConfigurationDataProvider {
|
||||
private static final String STORAGE_ID = "makeConfigDataProvider";
|
||||
private static final String STORAGE_ID = "makeConfigDataProvider"; //$NON-NLS-1$
|
||||
|
||||
protected CDataFacroty getDataFactory() {
|
||||
return MakeCDataFacroty.getDefault();
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
###############################################################################
|
||||
# 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
|
||||
###############################################################################
|
||||
|
||||
ScannerConfigInfoFactory2.0=can not remove the default info
|
|
@ -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.make.internal.core.scannerconfig2;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class MakeConfigurationDataProviderMessages {
|
||||
private static final String BUNDLE_NAME = "org.eclipse.cdt.make.internal.core.scannerconfig2.MakeConfigurationDataProvider"; //$NON-NLS-1$
|
||||
|
||||
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
|
||||
.getBundle(BUNDLE_NAME);
|
||||
|
||||
private MakeConfigurationDataProviderMessages() {
|
||||
}
|
||||
|
||||
public static String getString(String key) {
|
||||
try {
|
||||
return RESOURCE_BUNDLE.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return '!' + key + '!';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -323,7 +323,7 @@ public class ScannerConfigInfoFactory2 {
|
|||
|
||||
private void checkRemoveInfo(InfoContext context) throws CoreException{
|
||||
if(context.isDefaultContext())
|
||||
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.PLUGIN_ID, "can not remove the default info"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.PLUGIN_ID, MakeConfigurationDataProviderMessages.getString("ScannerConfigInfoFactory2.0"))); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public boolean isDirty(){
|
||||
|
|
|
@ -275,7 +275,7 @@ public class BuildEntryStorage extends AbstractEntryStorage {
|
|||
nv[1] = value.substring(index + 1);
|
||||
} else {
|
||||
nv[0] = value;
|
||||
nv[1] = "";
|
||||
nv[1] = ""; //$NON-NLS-1$
|
||||
}
|
||||
return nv;
|
||||
}
|
||||
|
|
|
@ -88,6 +88,6 @@ public class CDefaultConfigurationDataProvider extends
|
|||
}
|
||||
|
||||
protected CConfigurationData createPreferenceConfig(CDataFacroty factory){
|
||||
return CDataUtil.createEmptyData(null, "preference", factory, true);
|
||||
return CDataUtil.createEmptyData(null, "preference", factory, true); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,27 +35,27 @@ import org.eclipse.core.runtime.Path;
|
|||
import org.eclipse.core.runtime.Status;
|
||||
|
||||
public class CDataSerializer {
|
||||
protected static final String NAME = "name";
|
||||
protected static final String ID = "id";
|
||||
protected static final String DESCRIPTION = "description";
|
||||
protected static final String SOURCE_ENTRIES = "sourceEntries";
|
||||
protected static final String PATH = "path";
|
||||
protected static final String LANGUAGE_ID = "languageId";
|
||||
protected static final String CONTENT_TYPE_IDS = "contentTypeIds";
|
||||
protected static final String EXTENSIONS = "extensions";
|
||||
protected static final String DELIMITER = ";";
|
||||
protected static final String FOLDER_DATA = "folderData";
|
||||
protected static final String FILE_DATA = "fileData";
|
||||
protected static final String BUILD_DATA = "buildData";
|
||||
protected static final String TARGET_PLATFORM_DATA = "targetPlatformData";
|
||||
protected static final String LANGUAGE_DATA = "languageData";
|
||||
protected static final String NAME = "name"; //$NON-NLS-1$
|
||||
protected static final String ID = "id"; //$NON-NLS-1$
|
||||
protected static final String DESCRIPTION = "description"; //$NON-NLS-1$
|
||||
protected static final String SOURCE_ENTRIES = "sourceEntries"; //$NON-NLS-1$
|
||||
protected static final String PATH = "path"; //$NON-NLS-1$
|
||||
protected static final String LANGUAGE_ID = "languageId"; //$NON-NLS-1$
|
||||
protected static final String CONTENT_TYPE_IDS = "contentTypeIds"; //$NON-NLS-1$
|
||||
protected static final String EXTENSIONS = "extensions"; //$NON-NLS-1$
|
||||
protected static final String DELIMITER = ";"; //$NON-NLS-1$
|
||||
protected static final String FOLDER_DATA = "folderData"; //$NON-NLS-1$
|
||||
protected static final String FILE_DATA = "fileData"; //$NON-NLS-1$
|
||||
protected static final String BUILD_DATA = "buildData"; //$NON-NLS-1$
|
||||
protected static final String TARGET_PLATFORM_DATA = "targetPlatformData"; //$NON-NLS-1$
|
||||
protected static final String LANGUAGE_DATA = "languageData"; //$NON-NLS-1$
|
||||
// protected static final String EXCLUDED = "excluded";
|
||||
protected static final String OUTPUT_ENTRIES = "outputEntries";
|
||||
protected static final String ERROR_PARSERS = "errorParsers";
|
||||
protected static final String BINARY_PARSERS = "binaryParsers";
|
||||
protected static final String CWD = "cwd";
|
||||
protected static final String SETTING_ENTRIES = "settingEntries";
|
||||
protected static final String SUPPORTED_ENTRY_KINDS = "supportedEntryKinds";
|
||||
protected static final String OUTPUT_ENTRIES = "outputEntries"; //$NON-NLS-1$
|
||||
protected static final String ERROR_PARSERS = "errorParsers"; //$NON-NLS-1$
|
||||
protected static final String BINARY_PARSERS = "binaryParsers"; //$NON-NLS-1$
|
||||
protected static final String CWD = "cwd"; //$NON-NLS-1$
|
||||
protected static final String SETTING_ENTRIES = "settingEntries"; //$NON-NLS-1$
|
||||
protected static final String SUPPORTED_ENTRY_KINDS = "supportedEntryKinds"; //$NON-NLS-1$
|
||||
|
||||
private static CDataSerializer fInstance;
|
||||
|
||||
|
@ -68,12 +68,12 @@ public class CDataSerializer {
|
|||
public CConfigurationData loadConfigurationData(CDataFacroty factory, ICStorageElement el) throws CoreException {
|
||||
String id = el.getAttribute(ID);
|
||||
if(id == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "no id attribute for configuration"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.20"))); //$NON-NLS-1$
|
||||
|
||||
String name = el.getAttribute(NAME);
|
||||
CConfigurationData data = factory.createConfigurationdata(id, name, null, false);
|
||||
if(data == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "failed to create configuration"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.21"))); //$NON-NLS-1$
|
||||
|
||||
String tmp = el.getAttribute(DESCRIPTION);
|
||||
if(tmp != null)
|
||||
|
@ -123,7 +123,7 @@ public class CDataSerializer {
|
|||
public CFolderData loadFolderData(CConfigurationData data, CDataFacroty factory, ICStorageElement el) throws CoreException {
|
||||
String id = el.getAttribute(ID);
|
||||
if(id == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "no id attribute for folder data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.22"))); //$NON-NLS-1$
|
||||
|
||||
String tmp = el.getAttribute(PATH);
|
||||
IPath path = null;
|
||||
|
@ -131,11 +131,11 @@ public class CDataSerializer {
|
|||
path = new Path(tmp);
|
||||
}
|
||||
if(path == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "no path attribute for folder data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.23"))); //$NON-NLS-1$
|
||||
|
||||
CFolderData foData = factory.createFolderData(data, null, id, false, path);
|
||||
if(foData == null){
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "failed to create folder data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.24"))); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
// tmp = el.getAttribute(EXCLUDED);
|
||||
|
@ -162,7 +162,7 @@ public class CDataSerializer {
|
|||
public CFileData loadFileData(CConfigurationData data, CDataFacroty factory, ICStorageElement el) throws CoreException {
|
||||
String id = el.getAttribute(ID);
|
||||
if(id == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "no id attribute for file data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.25"))); //$NON-NLS-1$
|
||||
|
||||
String tmp = el.getAttribute(PATH);
|
||||
IPath path = null;
|
||||
|
@ -170,11 +170,11 @@ public class CDataSerializer {
|
|||
path = new Path(tmp);
|
||||
}
|
||||
if(path == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "no path attribute for file data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.26"))); //$NON-NLS-1$
|
||||
|
||||
CFileData fiData = factory.createFileData(data, null, null, id, false, path);
|
||||
if(fiData == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "failed to create file data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.27"))); //$NON-NLS-1$
|
||||
|
||||
// tmp = el.getAttribute(EXCLUDED);
|
||||
// if(tmp != null){
|
||||
|
@ -201,13 +201,13 @@ public class CDataSerializer {
|
|||
public CBuildData loadBuildData(CConfigurationData data, CDataFacroty factory, ICStorageElement el) throws CoreException {
|
||||
String id = el.getAttribute(ID);
|
||||
if(id == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "no id attribute for build data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.28"))); //$NON-NLS-1$
|
||||
|
||||
String name = el.getAttribute(NAME);
|
||||
|
||||
CBuildData bData = factory.createBuildData(data, null, id, name, false);
|
||||
if(bData == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "failed to create build data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.29"))); //$NON-NLS-1$
|
||||
|
||||
String tmp = el.getAttribute(ERROR_PARSERS);
|
||||
if(tmp != null){
|
||||
|
@ -243,13 +243,13 @@ public class CDataSerializer {
|
|||
public CTargetPlatformData loadTargetPlatformData(CConfigurationData data, CDataFacroty factory, ICStorageElement el) throws CoreException {
|
||||
String id = el.getAttribute(ID);
|
||||
if(id == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "no id attribute for target platform data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.30"))); //$NON-NLS-1$
|
||||
|
||||
String name = el.getAttribute(NAME);
|
||||
|
||||
CTargetPlatformData tpData = factory.createTargetPlatformData(data, null, id, name, false);
|
||||
if(tpData == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "failed to create target platform data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.31"))); //$NON-NLS-1$
|
||||
|
||||
String tmp = el.getAttribute(BINARY_PARSERS);
|
||||
if(tmp != null){
|
||||
|
@ -263,7 +263,7 @@ public class CDataSerializer {
|
|||
public CLanguageData loadLanguageData(CConfigurationData data, CResourceData rcData, CDataFacroty factory, ICStorageElement el) throws CoreException {
|
||||
String id = el.getAttribute(ID);
|
||||
if(id == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "no id attribute for language data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.32"))); //$NON-NLS-1$
|
||||
|
||||
String name = el.getAttribute(NAME);
|
||||
String langId = el.getAttribute(LANGUAGE_ID);
|
||||
|
@ -291,7 +291,7 @@ public class CDataSerializer {
|
|||
}
|
||||
CLanguageData lData = factory.createLanguageData(data, rcData, id, name, langId, supportedKinds, ids, cTypes);
|
||||
if(lData == null)
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, "failed to create language data"));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.33"))); //$NON-NLS-1$
|
||||
|
||||
ICStorageElement[] children = el.getChildren();
|
||||
String childName;
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.eclipse.cdt.core.model.CoreModelUtil;
|
|||
|
||||
public class PatternNameMap {
|
||||
private static final char[] SPEC_CHARS = new char[]{'*', '?'};
|
||||
static final String DOUBLE_STAR_PATTERN = "**";
|
||||
static final String DOUBLE_STAR_PATTERN = "**"; //$NON-NLS-1$
|
||||
|
||||
private Map fChildrenMap;
|
||||
private Map fPatternMap;
|
||||
|
|
|
@ -20,9 +20,9 @@ import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
|||
import org.eclipse.cdt.core.settings.model.extension.CLanguageData;
|
||||
|
||||
public class UserAndDiscoveredEntryDataSerializer extends CDataSerializer {
|
||||
protected static final String DISABLED_DISCOVERED_ENTRIES = "disabledDiscoveredEntries";
|
||||
protected static final String KIND = "kind";
|
||||
protected static final String VALUE = "value";
|
||||
protected static final String DISABLED_DISCOVERED_ENTRIES = "disabledDiscoveredEntries"; //$NON-NLS-1$
|
||||
protected static final String KIND = "kind"; //$NON-NLS-1$
|
||||
protected static final String VALUE = "value"; //$NON-NLS-1$
|
||||
|
||||
private static UserAndDiscoveredEntryDataSerializer fInstance;
|
||||
|
||||
|
|
|
@ -12,3 +12,17 @@ KindBasedStore.0=illegal kind
|
|||
KindBasedStore.1=illegal kind
|
||||
PathEntryTranslator.0=illegal kind
|
||||
PathEntryTranslator.1=illegal kind
|
||||
CDataSerializer.20=no id attribute for configuration
|
||||
CDataSerializer.21=failed to create configuration
|
||||
CDataSerializer.22=no id attribute for folder data
|
||||
CDataSerializer.23=no path attribute for folder data
|
||||
CDataSerializer.24=failed to create folder data
|
||||
CDataSerializer.25=no id attribute for file data
|
||||
CDataSerializer.26=no path attribute for file data
|
||||
CDataSerializer.27=failed to create file data
|
||||
CDataSerializer.28=no id attribute for build data
|
||||
CDataSerializer.29=failed to create build data
|
||||
CDataSerializer.30=no id attribute for target platform data
|
||||
CDataSerializer.31=failed to create target platform data
|
||||
CDataSerializer.32=no id attribute for language data
|
||||
CDataSerializer.33=failed to create language data
|
||||
|
|
|
@ -40,8 +40,8 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
|
|||
private static final int OP_ADDED = 2;
|
||||
private static final int OP_REMOVED = 3;
|
||||
|
||||
private static final QualifiedName EXTERNAL_SETTING_PROPERTY = new QualifiedName(CCorePlugin.PLUGIN_ID, "externalSettings");
|
||||
private static final String EXTERNAL_SETTING_STORAGE_ID = CCorePlugin.PLUGIN_ID + ".externalSettings";
|
||||
private static final QualifiedName EXTERNAL_SETTING_PROPERTY = new QualifiedName(CCorePlugin.PLUGIN_ID, "externalSettings"); //$NON-NLS-1$
|
||||
private static final String EXTERNAL_SETTING_STORAGE_ID = CCorePlugin.PLUGIN_ID + ".externalSettings"; //$NON-NLS-1$
|
||||
|
||||
private Map fFactoryMap = new HashMap();
|
||||
private static CExternalSettingsManager fInstance;
|
||||
|
@ -129,7 +129,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
|
|||
}
|
||||
|
||||
public String toString() {
|
||||
return fFactoryId.toString() + " : " + fContainerId.toString();
|
||||
return fFactoryId.toString() + " : " + fContainerId.toString(); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
private static class ContainerDescriptor {
|
||||
|
@ -626,7 +626,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
|
|||
|
||||
private CSettingsRefInfo getRefInfo(ICConfigurationDescription cfg, boolean write){
|
||||
if(write && cfg.isReadOnly())
|
||||
throw new IllegalArgumentException("writable ref info is requested for the read only config");
|
||||
throw new IllegalArgumentException(SettingsModelMessages.getString("CExternalSettingsManager.3")); //$NON-NLS-1$
|
||||
|
||||
RefInfoContainer cr = (RefInfoContainer)cfg.getSessionProperty(EXTERNAL_SETTING_PROPERTY);
|
||||
CSettingsRefInfo ri;
|
||||
|
|
|
@ -14,8 +14,8 @@ import org.eclipse.cdt.core.settings.model.ICStorageElement;
|
|||
import org.eclipse.cdt.internal.core.settings.model.CExternalSettingsManager.CContainerRef;
|
||||
|
||||
public class CRefSettingsHolder extends CExternalSettingsHolder {
|
||||
private static final String ATTR_FACTORY_ID = "factoryId";
|
||||
private static final String ATTR_CONTAINER_ID = "containerId";
|
||||
private static final String ATTR_FACTORY_ID = "factoryId"; //$NON-NLS-1$
|
||||
private static final String ATTR_CONTAINER_ID = "containerId"; //$NON-NLS-1$
|
||||
private CContainerRef fContainerRef;
|
||||
private boolean fIsReconsiled;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.eclipse.core.runtime.ListenerList;
|
|||
|
||||
public class CfgExportSettingContainerFactory extends
|
||||
CExternalSettingContainerFactory implements ICProjectDescriptionListener {
|
||||
static final String FACTORY_ID = CCorePlugin.PLUGIN_ID + ".cfg.export.settings.sipplier";
|
||||
static final String FACTORY_ID = CCorePlugin.PLUGIN_ID + ".cfg.export.settings.sipplier"; //$NON-NLS-1$
|
||||
private static final char DELIMITER = ';';
|
||||
private ListenerList fListenerList;
|
||||
|
||||
|
@ -165,11 +165,11 @@ public class CfgExportSettingContainerFactory extends
|
|||
cfgId = id.substring(index + 1);
|
||||
} else {
|
||||
projName = id;
|
||||
cfgId = "";
|
||||
cfgId = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if((projName = projName.trim()).length() == 0)
|
||||
throw ExceptionFactory.createCoreException("invalid id: project name not specified");
|
||||
throw ExceptionFactory.createCoreException(SettingsModelMessages.getString("CfgExportSettingContainerFactory.2")); //$NON-NLS-1$
|
||||
|
||||
return new String[]{projName, cfgId};
|
||||
}
|
||||
|
@ -225,14 +225,14 @@ public class CfgExportSettingContainerFactory extends
|
|||
for(int i = 0; i < cfgs.length; i++){
|
||||
cfgIds.add(cfgs[i].getId());
|
||||
}
|
||||
cfgIds.add("");
|
||||
cfgIds.add(""); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
case ICDescriptionDelta.CHANGED:
|
||||
ICDescriptionDelta[] children = delta.getChildren();
|
||||
collectCfgIds(children, cfgIds);
|
||||
if((delta.getChangeFlags() & ICDescriptionDelta.ACTIVE_CFG) != 0)
|
||||
cfgIds.add("");
|
||||
cfgIds.add(""); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ import org.eclipse.core.runtime.IExtensionPoint;
|
|||
import org.eclipse.core.runtime.Platform;
|
||||
|
||||
public class ExtensionContainerFactory extends CExternalSettingContainerFactory {
|
||||
static final String FACTORY_ID = CCorePlugin.PLUGIN_ID + ".extension.container.factory";
|
||||
private static final String EXTENSION_ID = CCorePlugin.PLUGIN_ID + ".externalSettingsProvider";
|
||||
static final String FACTORY_ID = CCorePlugin.PLUGIN_ID + ".extension.container.factory"; //$NON-NLS-1$
|
||||
private static final String EXTENSION_ID = CCorePlugin.PLUGIN_ID + ".externalSettingsProvider"; //$NON-NLS-1$
|
||||
|
||||
private static ExtensionContainerFactory fInstance;
|
||||
private Map fDescriptorMap;
|
||||
|
@ -59,8 +59,8 @@ public class ExtensionContainerFactory extends CExternalSettingContainerFactory
|
|||
}
|
||||
|
||||
private static class CExtensionSettingProviderDescriptor {
|
||||
private static final String PROVIDER = "provider";
|
||||
private static final String CLASS = "class";
|
||||
private static final String PROVIDER = "provider"; //$NON-NLS-1$
|
||||
private static final String CLASS = "class"; //$NON-NLS-1$
|
||||
|
||||
private IExtension fExtension;
|
||||
private IConfigurationElement fProviderElement;
|
||||
|
@ -107,9 +107,9 @@ public class ExtensionContainerFactory extends CExternalSettingContainerFactory
|
|||
if(obj instanceof CExternalSettingProvider){
|
||||
return (CExternalSettingProvider)obj;
|
||||
} else
|
||||
throw ExceptionFactory.createCoreException(SettingsModelMessages.getString("invalid setting provider class specified"));
|
||||
throw ExceptionFactory.createCoreException(SettingsModelMessages.getString(SettingsModelMessages.getString("ExtensionContainerFactory.4"))); //$NON-NLS-1$
|
||||
}
|
||||
throw ExceptionFactory.createCoreException(SettingsModelMessages.getString("provider element not specified"));
|
||||
throw ExceptionFactory.createCoreException(SettingsModelMessages.getString(SettingsModelMessages.getString("ExtensionContainerFactory.5"))); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
private IConfigurationElement getProviderElement(){
|
||||
|
|
|
@ -36,3 +36,7 @@ CFolderDescription.1=expected proxy of type ICLanguageSetting, but was
|
|||
CFolderDescription.2=data was not created
|
||||
CFolderDescription.3=expected proxy of type ICLanguageSetting, but was
|
||||
SetCProjectDescriptionOperation.0=CDT Project settings serialization
|
||||
CExternalSettingsManager.3=writable ref info is requested for the read only config
|
||||
CfgExportSettingContainerFactory.2=invalid id: project name not specified
|
||||
ExtensionContainerFactory.4=invalid setting provider class specified
|
||||
ExtensionContainerFactory.5=provider element not specified
|
||||
|
|
|
@ -154,7 +154,7 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
|
|||
public void convert(IProject project, String id) throws CoreException {
|
||||
CConfigBasedDescriptor dr = findDescriptor(project, false);
|
||||
if(dr == null){
|
||||
throw ExceptionFactory.createCoreException("the project is not a CDT project");
|
||||
throw ExceptionFactory.createCoreException(CCorePlugin.getResourceString("CConfigBasedDescriptorManager.0")); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
|
@ -218,17 +218,17 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
|
|||
throws CoreException {
|
||||
CConfigBasedDescriptor dr = getOperatingDescriptor(project);
|
||||
if(dr != null){
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, "description based descriptor operation can not be nested", null));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, CCorePlugin.getResourceString("CConfigBasedDescriptorManager.1"), null)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if(des.isReadOnly()){
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, "can not perform descriptor operation based on the read only description", null));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, CCorePlugin.getResourceString("CConfigBasedDescriptorManager.2"), null)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
dr = loadDescriptor((CProjectDescription)des);
|
||||
|
||||
if (dr == null) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, "Failed to create descriptor", null));
|
||||
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, CCorePlugin.getResourceString("CConfigBasedDescriptorManager.3"), null)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
setOperatingDescriptor(project, dr);
|
||||
|
@ -312,11 +312,11 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
|
|||
|
||||
if(cfgDes != null){
|
||||
if(cfgDes.isReadOnly())
|
||||
throw ExceptionFactory.createCoreException("error: read-only configuration can not be used for CDescriptor");
|
||||
throw ExceptionFactory.createCoreException(CCorePlugin.getResourceString("CConfigBasedDescriptorManager.4")); //$NON-NLS-1$
|
||||
|
||||
dr = new CConfigBasedDescriptor(cfgDes);
|
||||
} else {
|
||||
throw ExceptionFactory.createCoreException("the project does not contain valid configurations");
|
||||
throw ExceptionFactory.createCoreException(CCorePlugin.getResourceString("CConfigBasedDescriptorManager.5")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,3 +78,9 @@ pdom.indexer.name=C/C++ Indexer
|
|||
pdom.indexer.task=Indexing
|
||||
PDOMIndexerJob.updateMonitorJob=Update Monitor
|
||||
CCoreInternals.savePreferencesJob=Save preferences
|
||||
CConfigBasedDescriptorManager.0=the project is not a CDT project
|
||||
CConfigBasedDescriptorManager.1=description based descriptor operation can not be nested
|
||||
CConfigBasedDescriptorManager.2=can not perform descriptor operation based on the read only description
|
||||
CConfigBasedDescriptorManager.3=Failed to create descriptor
|
||||
CConfigBasedDescriptorManager.4=error: read-only configuration can not be used for CDescriptor
|
||||
CConfigBasedDescriptorManager.5=the project does not contain valid configurations
|
||||
|
|
|
@ -15,8 +15,8 @@ import org.eclipse.core.runtime.IConfigurationElement;
|
|||
|
||||
public class CExtensionDescriptor implements ICExtensionDescriptor {
|
||||
private IConfigurationElement fElement;
|
||||
protected static final String ATTRIBUTE_ID = "id";
|
||||
protected static final String ATTRIBUTE_NAME = "name";
|
||||
protected static final String ATTRIBUTE_ID = "id"; //$NON-NLS-1$
|
||||
protected static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
|
||||
|
||||
public CExtensionDescriptor(IConfigurationElement el){
|
||||
fElement = el;
|
||||
|
|
|
@ -52,7 +52,7 @@ public class CdtVarPathEntryVariableManager implements
|
|||
|
||||
private class VarSubstitutor extends SupplierBasedCdtVariableSubstitutor {
|
||||
public VarSubstitutor() {
|
||||
super(new VarContextInfo(), "", " ");
|
||||
super(new VarContextInfo(), "", " "); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue