1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Partial fix for Bugzilla 210116 (CDT spelling errors)

This commit is contained in:
Chris Recoskie 2008-04-28 18:35:19 +00:00
parent ac92e0e883
commit 1e586a99cc
92 changed files with 365 additions and 365 deletions

View file

@ -13,15 +13,15 @@ package org.eclipse.cdt.make.internal.core.dataprovider;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
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.extension.CResourceData; import org.eclipse.cdt.core.settings.model.extension.CResourceData;
import org.eclipse.cdt.core.settings.model.extension.impl.CDataFacroty; import org.eclipse.cdt.core.settings.model.extension.impl.CDataFactory;
import org.eclipse.cdt.core.settings.model.util.CDataUtil; import org.eclipse.cdt.core.settings.model.util.CDataUtil;
public class MakeCDataFacroty extends CDataFacroty { public class MakeCDataFactory extends CDataFactory {
private static MakeCDataFacroty fInstance; private static MakeCDataFactory fInstance;
public static CDataFacroty getDefault(){ public static CDataFactory getDefault(){
if(fInstance == null){ if(fInstance == null){
fInstance = new MakeCDataFacroty(); fInstance = new MakeCDataFactory();
} }
return fInstance; return fInstance;
} }

View file

@ -12,7 +12,7 @@ package org.eclipse.cdt.make.internal.core.dataprovider;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData; import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
import org.eclipse.cdt.core.settings.model.extension.impl.CDataFacroty; import org.eclipse.cdt.core.settings.model.extension.impl.CDataFactory;
import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultConfigurationDataProvider; import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultConfigurationDataProvider;
import org.eclipse.cdt.core.settings.model.util.CDataSerializer; import org.eclipse.cdt.core.settings.model.util.CDataSerializer;
import org.eclipse.cdt.core.settings.model.util.UserAndDiscoveredEntryDataSerializer; import org.eclipse.cdt.core.settings.model.util.UserAndDiscoveredEntryDataSerializer;
@ -26,8 +26,8 @@ import org.eclipse.core.runtime.IProgressMonitor;
public class MakeConfigurationDataProvider extends CDefaultConfigurationDataProvider { public class MakeConfigurationDataProvider extends CDefaultConfigurationDataProvider {
private static final String STORAGE_ID = "makeConfigDataProvider"; //$NON-NLS-1$ private static final String STORAGE_ID = "makeConfigDataProvider"; //$NON-NLS-1$
protected CDataFacroty getDataFactory() { protected CDataFactory getDataFactory() {
return MakeCDataFacroty.getDefault(); return MakeCDataFactory.getDefault();
} }
protected CDataSerializer getDataSerializer() { protected CDataSerializer getDataSerializer() {

View file

@ -76,7 +76,7 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
CfgInfoContext fLoadContext; CfgInfoContext fLoadContext;
ICfgScannerConfigBuilderInfo2Set fCfgInfo; ICfgScannerConfigBuilderInfo2Set fCfgInfo;
IScannerConfigBuilderInfo2 fInfo; IScannerConfigBuilderInfo2 fInfo;
boolean fIsFerFileCache; boolean fIsPerFileCache;
} }
public static class PathInfoCache{ public static class PathInfoCache{
@ -187,7 +187,7 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
// } // }
private PathInfo resolveCacheBaseDiscoveredInfo(ContextInfo cInfo, IDiscoveredPathManager.IDiscoveredPathInfo baseInfo){ private PathInfo resolveCacheBaseDiscoveredInfo(ContextInfo cInfo, IDiscoveredPathManager.IDiscoveredPathInfo baseInfo){
if(cInfo.fIsFerFileCache){ if(cInfo.fIsPerFileCache){
if(baseInfo instanceof IDiscoveredPathManager.IPerFileDiscoveredPathInfo2){ if(baseInfo instanceof IDiscoveredPathManager.IPerFileDiscoveredPathInfo2){
resolveCachePerFileInfo(cInfo, (IDiscoveredPathManager.IPerFileDiscoveredPathInfo2)baseInfo); resolveCachePerFileInfo(cInfo, (IDiscoveredPathManager.IPerFileDiscoveredPathInfo2)baseInfo);
} }
@ -313,7 +313,7 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
private void removeCachedPathInfo(ContextInfo cInfo){ private void removeCachedPathInfo(ContextInfo cInfo){
// ICfgScannerConfigBuilderInfo2Set cfgInfo = cInfo.fCfgInfo; // ICfgScannerConfigBuilderInfo2Set cfgInfo = cInfo.fCfgInfo;
if(cInfo.fIsFerFileCache){ if(cInfo.fIsPerFileCache){
Configuration cfg = (Configuration)cInfo.fInitialContext.getConfiguration(); Configuration cfg = (Configuration)cInfo.fInitialContext.getConfiguration();
cfg.clearDiscoveredPathInfo(); cfg.clearDiscoveredPathInfo();
@ -413,13 +413,13 @@ public class CfgDiscoveredPathManager implements IResourceChangeListener {
if(isPerRcType){ if(isPerRcType){
contextInfo.fLoadContext = CfgScannerConfigUtil.adjustPerRcTypeContext(contextInfo.fInitialContext); contextInfo.fLoadContext = CfgScannerConfigUtil.adjustPerRcTypeContext(contextInfo.fInitialContext);
contextInfo.fCacheContext = contextInfo.fLoadContext; contextInfo.fCacheContext = contextInfo.fLoadContext;
contextInfo.fIsFerFileCache = false; contextInfo.fIsPerFileCache = false;
contextInfo.fInfo = cfgInfo.getInfo(contextInfo.fLoadContext); contextInfo.fInfo = cfgInfo.getInfo(contextInfo.fLoadContext);
} else { } else {
contextInfo.fLoadContext = new CfgInfoContext(context.getConfiguration()); contextInfo.fLoadContext = new CfgInfoContext(context.getConfiguration());
contextInfo.fInfo = cfgInfo.getInfo(contextInfo.fLoadContext); contextInfo.fInfo = cfgInfo.getInfo(contextInfo.fLoadContext);
contextInfo.fIsFerFileCache = CfgScannerConfigProfileManager.isPerFileProfile(contextInfo.fInfo.getSelectedProfileId()); contextInfo.fIsPerFileCache = CfgScannerConfigProfileManager.isPerFileProfile(contextInfo.fInfo.getSelectedProfileId());
contextInfo.fCacheContext = contextInfo.fIsFerFileCache ? contextInfo.fInitialContext : contextInfo.fLoadContext; contextInfo.fCacheContext = contextInfo.fIsPerFileCache ? contextInfo.fInitialContext : contextInfo.fLoadContext;
} }
return contextInfo; return contextInfo;

View file

@ -755,9 +755,9 @@ public interface ITool extends IBuildObject, IHoldsOptions {
IInputType setHeaderExtensionsAttribute(IInputType type, String[] extensions); IInputType setHeaderExtensionsAttribute(IInputType type, String[] extensions);
*/ */
IInputType getEdtableInputType(IInputType base); IInputType getEditableInputType(IInputType base);
IOutputType getEdtableOutputType(IOutputType base); IOutputType getEditableOutputType(IOutputType base);
boolean isEnabled(); boolean isEnabled();

View file

@ -1768,7 +1768,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionProjectTypeMap().put(projectType.getId(), projectType); Object previous = getExtensionProjectTypeMap().put(projectType.getId(), projectType);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"ProjectType", //$NON-NLS-1$ "ProjectType", //$NON-NLS-1$
projectType.getId()); projectType.getId());
} }
@ -1785,7 +1785,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionConfigurationMap().put(configuration.getId(), configuration); Object previous = getExtensionConfigurationMap().put(configuration.getId(), configuration);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"Configuration", //$NON-NLS-1$ "Configuration", //$NON-NLS-1$
configuration.getId()); configuration.getId());
} }
@ -1802,7 +1802,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionResourceConfigurationMap().put(resourceConfiguration.getId(), resourceConfiguration); Object previous = getExtensionResourceConfigurationMap().put(resourceConfiguration.getId(), resourceConfiguration);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"ResourceConfiguration", //$NON-NLS-1$ "ResourceConfiguration", //$NON-NLS-1$
resourceConfiguration.getId()); resourceConfiguration.getId());
} }
@ -1819,7 +1819,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionToolChainMap().put(toolChain.getId(), toolChain); Object previous = getExtensionToolChainMap().put(toolChain.getId(), toolChain);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"ToolChain", //$NON-NLS-1$ "ToolChain", //$NON-NLS-1$
toolChain.getId()); toolChain.getId());
} }
@ -1838,7 +1838,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionToolMap().put(tool.getId(), tool); Object previous = getExtensionToolMap().put(tool.getId(), tool);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"Tool", //$NON-NLS-1$ "Tool", //$NON-NLS-1$
tool.getId()); tool.getId());
} }
@ -1855,7 +1855,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionTargetPlatformMap().put(targetPlatform.getId(), targetPlatform); Object previous = getExtensionTargetPlatformMap().put(targetPlatform.getId(), targetPlatform);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"TargetPlatform", //$NON-NLS-1$ "TargetPlatform", //$NON-NLS-1$
targetPlatform.getId()); targetPlatform.getId());
} }
@ -1872,7 +1872,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionBuilderMap().put(builder.getId(), builder); Object previous = getExtensionBuilderMap().put(builder.getId(), builder);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"Builder", //$NON-NLS-1$ "Builder", //$NON-NLS-1$
builder.getId()); builder.getId());
} }
@ -1889,7 +1889,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionOptionMap().put(option.getId(), option); Object previous = getExtensionOptionMap().put(option.getId(), option);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"Option", //$NON-NLS-1$ "Option", //$NON-NLS-1$
option.getId()); option.getId());
} }
@ -1906,7 +1906,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionOptionCategoryMap().put(optionCategory.getId(), optionCategory); Object previous = getExtensionOptionCategoryMap().put(optionCategory.getId(), optionCategory);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"OptionCategory", //$NON-NLS-1$ "OptionCategory", //$NON-NLS-1$
optionCategory.getId()); optionCategory.getId());
} }
@ -1923,7 +1923,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionInputTypeMap().put(inputType.getId(), inputType); Object previous = getExtensionInputTypeMap().put(inputType.getId(), inputType);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"InputType", //$NON-NLS-1$ "InputType", //$NON-NLS-1$
inputType.getId()); inputType.getId());
} }
@ -1940,7 +1940,7 @@ public class ManagedBuildManager extends AbstractCExtension {
Object previous = getExtensionOutputTypeMap().put(outputType.getId(), outputType); Object previous = getExtensionOutputTypeMap().put(outputType.getId(), outputType);
if (previous != null) { if (previous != null) {
// Report error // Report error
ManagedBuildManager.OutputDuplicateIdError( ManagedBuildManager.outputDuplicateIdError(
"OutputType", //$NON-NLS-1$ "OutputType", //$NON-NLS-1$
outputType.getId()); outputType.getId());
} }
@ -2840,7 +2840,7 @@ public class ManagedBuildManager extends AbstractCExtension {
// Check if there is any build info associated with this project for this session // Check if there is any build info associated with this project for this session
try { try {
buildInfo = getLoaddedBuildInfo(proj); buildInfo = getLoadedBuildInfo(proj);
} catch (CoreException e) { } catch (CoreException e) {
if(BuildDbgUtil.DEBUG) if(BuildDbgUtil.DEBUG)
BuildDbgUtil.getInstance().traceln(BuildDbgUtil.BUILD_INFO_LOAD, "build info load: core exception while getting the loaded info: " + e.getLocalizedMessage()); //$NON-NLS-1$ BuildDbgUtil.getInstance().traceln(BuildDbgUtil.BUILD_INFO_LOAD, "build info load: core exception while getting the loaded info: " + e.getLocalizedMessage()); //$NON-NLS-1$
@ -2857,7 +2857,7 @@ public class ManagedBuildManager extends AbstractCExtension {
if(BuildDbgUtil.DEBUG) if(BuildDbgUtil.DEBUG)
BuildDbgUtil.getInstance().traceln(BuildDbgUtil.BUILD_INFO_LOAD, "build info load: project description is obtained, qwerying the loaded build info"); //$NON-NLS-1$ BuildDbgUtil.getInstance().traceln(BuildDbgUtil.BUILD_INFO_LOAD, "build info load: project description is obtained, qwerying the loaded build info"); //$NON-NLS-1$
try { try {
buildInfo = getLoaddedBuildInfo(proj); buildInfo = getLoadedBuildInfo(proj);
} catch (CoreException e) { } catch (CoreException e) {
if(BuildDbgUtil.DEBUG) if(BuildDbgUtil.DEBUG)
BuildDbgUtil.getInstance().traceln(BuildDbgUtil.BUILD_INFO_LOAD, "build info load: core exception while getting the loaded info (2): " + e.getLocalizedMessage()); //$NON-NLS-1$ BuildDbgUtil.getInstance().traceln(BuildDbgUtil.BUILD_INFO_LOAD, "build info load: core exception while getting the loaded info (2): " + e.getLocalizedMessage()); //$NON-NLS-1$
@ -2926,7 +2926,7 @@ public class ManagedBuildManager extends AbstractCExtension {
return buildInfo; return buildInfo;
} }
synchronized static ManagedBuildInfo getLoaddedBuildInfo(IProject project) throws CoreException{ synchronized static ManagedBuildInfo getLoadedBuildInfo(IProject project) throws CoreException{
// Check if there is any build info associated with this project for this session // Check if there is any build info associated with this project for this session
ManagedBuildInfo buildInfo = (ManagedBuildInfo)fInfoMap.get(project);//project.getSessionProperty(buildInfoProperty); ManagedBuildInfo buildInfo = (ManagedBuildInfo)fInfoMap.get(project);//project.getSessionProperty(buildInfoProperty);
// Make sure that if a project has build info, that the info is not corrupted // Make sure that if a project has build info, that the info is not corrupted
@ -2961,7 +2961,7 @@ public class ManagedBuildManager extends AbstractCExtension {
// Check if there is any build info associated with this project for this session // Check if there is any build info associated with this project for this session
try { try {
buildInfo = (ManagedBuildInfo)getLoaddedBuildInfo(resource.getProject()); buildInfo = (ManagedBuildInfo)getLoadedBuildInfo(resource.getProject());
} catch (CoreException e) { } catch (CoreException e) {
// Continue, to see if any of the upcoming checks are successful // Continue, to see if any of the upcoming checks are successful
} }
@ -3081,7 +3081,7 @@ public class ManagedBuildManager extends AbstractCExtension {
public static IManagedBuildInfo getOldStyleBuildInfo(IProject project) throws CoreException { public static IManagedBuildInfo getOldStyleBuildInfo(IProject project) throws CoreException {
IManagedBuildInfo info = null; IManagedBuildInfo info = null;
try { try {
info = getLoaddedBuildInfo(project); info = getLoadedBuildInfo(project);
} catch (CoreException e) { } catch (CoreException e) {
} }
@ -3187,7 +3187,7 @@ public class ManagedBuildManager extends AbstractCExtension {
else else
{ {
// Print a warning // Print a warning
OutputIconError(path.toString()); outputIconError(path.toString());
} }
} }
} }
@ -3236,55 +3236,55 @@ public class ManagedBuildManager extends AbstractCExtension {
return (IManagedConfigElement)getConfigElementMap().get(buildObj); return (IManagedConfigElement)getConfigElementMap().get(buildObj);
} }
public static void OptionValidError(int errorId, String id) { public static void optionValidError(int errorId, String id) {
String[] msgs = new String[1]; String[] msgs = new String[1];
msgs[0] = id; msgs[0] = id;
switch (errorId) { switch (errorId) {
case ERROR_CATEGORY: case ERROR_CATEGORY:
ManagedBuildManager.OutputManifestError( ManagedBuildManager.outputManifestError(
ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_OPTION_CATEGORY, msgs)); ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_OPTION_CATEGORY, msgs));
break; break;
case ERROR_FILTER: case ERROR_FILTER:
ManagedBuildManager.OutputManifestError( ManagedBuildManager.outputManifestError(
ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_OPTION_FILTER, msgs)); ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_OPTION_FILTER, msgs));
break; break;
} }
} }
public static void OptionValueHandlerError(String attribute, String id) { public static void optionValueHandlerError(String attribute, String id) {
String[] msgs = new String[2]; String[] msgs = new String[2];
msgs[0] = attribute; msgs[0] = attribute;
msgs[1] = id; msgs[1] = id;
ManagedBuildManager.OutputManifestError( ManagedBuildManager.outputManifestError(
ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_OPTION_VALUEHANDLER, msgs)); ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_OPTION_VALUEHANDLER, msgs));
} }
public static void OutputResolveError(String attribute, String lookupId, String type, String id) { public static void outputResolveError(String attribute, String lookupId, String type, String id) {
String[] msgs = new String[4]; String[] msgs = new String[4];
msgs[0] = attribute; msgs[0] = attribute;
msgs[1] = lookupId; msgs[1] = lookupId;
msgs[2] = type; msgs[2] = type;
msgs[3] = id; msgs[3] = id;
ManagedBuildManager.OutputManifestError( ManagedBuildManager.outputManifestError(
ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_RESOLVING, msgs)); ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_RESOLVING, msgs));
} }
public static void OutputDuplicateIdError(String type, String id) { public static void outputDuplicateIdError(String type, String id) {
String[] msgs = new String[2]; String[] msgs = new String[2];
msgs[0] = type; msgs[0] = type;
msgs[1] = id; msgs[1] = id;
ManagedBuildManager.OutputManifestError( ManagedBuildManager.outputManifestError(
ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_DUPLICATE, msgs)); ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_DUPLICATE, msgs));
} }
public static void OutputManifestError(String message) { public static void outputManifestError(String message) {
System.err.println(ManagedMakeMessages.getResourceString(MANIFEST_ERROR_HEADER) + message + NEWLINE); System.err.println(ManagedMakeMessages.getResourceString(MANIFEST_ERROR_HEADER) + message + NEWLINE);
} }
public static void OutputIconError(String iconLocation) { public static void outputIconError(String iconLocation) {
String[] msgs = new String[1]; String[] msgs = new String[1];
msgs[0]= iconLocation; msgs[0]= iconLocation;
ManagedBuildManager.OutputManifestError( ManagedBuildManager.outputManifestError(
ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_ICON, msgs)); ManagedMakeMessages.getFormattedString(ManagedBuildManager.MANIFEST_ERROR_ICON, msgs));
} }
@ -3861,10 +3861,10 @@ public class ManagedBuildManager extends AbstractCExtension {
return null; return null;
} }
*/ */
private static final boolean TEST_CONSISTANCE = false; private static final boolean TEST_CONSISTENCE = false;
public static IConfiguration getConfigurationForDescription(ICConfigurationDescription cfgDes){ public static IConfiguration getConfigurationForDescription(ICConfigurationDescription cfgDes){
return getConfigurationForDescription(cfgDes, TEST_CONSISTANCE); return getConfigurationForDescription(cfgDes, TEST_CONSISTENCE);
} }
private static IConfiguration getConfigurationForDescription(ICConfigurationDescription cfgDes, boolean checkConsistance){ private static IConfiguration getConfigurationForDescription(ICConfigurationDescription cfgDes, boolean checkConsistance){
@ -3966,7 +3966,7 @@ public class ManagedBuildManager extends AbstractCExtension {
return 0; return 0;
} }
public static ICConfigurationDescription getDescriptionForConfiguration(IConfiguration cfg){ public static ICConfigurationDescription getDescriptionForConfiguration(IConfiguration cfg){
return getDescriptionForConfiguration(cfg, TEST_CONSISTANCE); return getDescriptionForConfiguration(cfg, TEST_CONSISTENCE);
} }
private static ICConfigurationDescription getDescriptionForConfiguration(IConfiguration cfg, boolean checkConsistance){ private static ICConfigurationDescription getDescriptionForConfiguration(IConfiguration cfg, boolean checkConsistance){

View file

@ -71,7 +71,7 @@ public class BuildStateManager {
public void handleEvent(CProjectDescriptionEvent event) { public void handleEvent(CProjectDescriptionEvent event) {
switch(event.getEventType()){ switch(event.getEventType()){
case CProjectDescriptionEvent.APPLIED: case CProjectDescriptionEvent.APPLIED:
case CProjectDescriptionEvent.LOADDED: case CProjectDescriptionEvent.LOADED:
ICDescriptionDelta delta = event.getProjectDelta(); ICDescriptionDelta delta = event.getProjectDelta();
processAppliedDelta(event, delta); processAppliedDelta(event, delta);
break; break;
@ -143,7 +143,7 @@ public class BuildStateManager {
public void startup(){ public void startup(){
if(fListener == null){ if(fListener == null){
fListener = new EventListener(); fListener = new EventListener();
CoreModel.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(fListener, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADDED); CoreModel.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(fListener, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADED);
ResourcesPlugin.getWorkspace().addResourceChangeListener(fListener, ResourcesPlugin.getWorkspace().addResourceChangeListener(fListener,
IResourceChangeEvent.POST_CHANGE IResourceChangeEvent.POST_CHANGE
| IResourceChangeEvent.PRE_DELETE | IResourceChangeEvent.PRE_DELETE

View file

@ -1314,7 +1314,7 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider,
superClass = ManagedBuildManager.getExtensionBuilder(superClassId); superClass = ManagedBuildManager.getExtensionBuilder(superClassId);
if (superClass == null) { if (superClass == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"superClass", //$NON-NLS-1$ "superClass", //$NON-NLS-1$
superClassId, superClassId,
"builder", //$NON-NLS-1$ "builder", //$NON-NLS-1$

View file

@ -1568,7 +1568,7 @@ public class InputType extends BuildObject implements IInputType {
superClass = ManagedBuildManager.getExtensionInputType(superClassId); superClass = ManagedBuildManager.getExtensionInputType(superClassId);
if (superClass == null) { if (superClass == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"superClass", //$NON-NLS-1$ "superClass", //$NON-NLS-1$
superClassId, superClassId,
"inputType", //$NON-NLS-1$ "inputType", //$NON-NLS-1$

View file

@ -1839,7 +1839,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
return valueHandler; return valueHandler;
} }
} catch (CoreException e) { } catch (CoreException e) {
ManagedBuildManager.OptionValueHandlerError(element.getAttribute(VALUE_HANDLER), getId()); ManagedBuildManager.optionValueHandlerError(element.getAttribute(VALUE_HANDLER), getId());
// Assign the default handler to avoid further error messages // Assign the default handler to avoid further error messages
valueHandler = ManagedOptionValueHandler.getManagedOptionValueHandler(); valueHandler = ManagedOptionValueHandler.getManagedOptionValueHandler();
return valueHandler; return valueHandler;
@ -1940,7 +1940,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
superClass = ManagedBuildManager.getExtensionOption(superClassId); superClass = ManagedBuildManager.getExtensionOption(superClassId);
if (superClass == null) { if (superClass == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"superClass", //$NON-NLS-1$ "superClass", //$NON-NLS-1$
superClassId, superClassId,
"option", //$NON-NLS-1$ "option", //$NON-NLS-1$
@ -1955,7 +1955,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
category = holder.getOptionCategory(categoryId); category = holder.getOptionCategory(categoryId);
if (category == null) { if (category == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"category", //$NON-NLS-1$ "category", //$NON-NLS-1$
categoryId, categoryId,
"option", //$NON-NLS-1$ "option", //$NON-NLS-1$
@ -2096,7 +2096,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
if ( getOptionHolder() instanceof IToolChain && isAbstract() == false ) { if ( getOptionHolder() instanceof IToolChain && isAbstract() == false ) {
// Check for error (a) // Check for error (a)
if (getCategory() == null) { if (getCategory() == null) {
ManagedBuildManager.OptionValidError(ManagedBuildManager.ERROR_CATEGORY, getId()); ManagedBuildManager.optionValidError(ManagedBuildManager.ERROR_CATEGORY, getId());
// Object becomes invalid // Object becomes invalid
isValid = false; isValid = false;
} }
@ -2110,7 +2110,7 @@ public class Option extends BuildObject implements IOption, IBuildPropertiesRest
// TODO: Cannot differentiate between "all" and attribute not // TODO: Cannot differentiate between "all" and attribute not
// specified. Thus do not produce an error. We can argue that "all" // specified. Thus do not produce an error. We can argue that "all"
// means all valid resource configurations. // means all valid resource configurations.
ManagedBuildManager.OptionValidError(ManagedBuildManager.ERROR_FILTER, getId()); ManagedBuildManager.optionValidError(ManagedBuildManager.ERROR_FILTER, getId());
// Object becomes invalid // Object becomes invalid
isValid = false; isValid = false;
} }

View file

@ -158,7 +158,7 @@ public class OptionCategory extends BuildObject implements IOptionCategory {
iconPathURL = new URL(iconPath); iconPathURL = new URL(iconPath);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
// Print a warning // Print a warning
ManagedBuildManager.OutputIconError(iconPath); ManagedBuildManager.outputIconError(iconPath);
iconPathURL = null; iconPathURL = null;
} }
} }
@ -423,7 +423,7 @@ public class OptionCategory extends BuildObject implements IOptionCategory {
if (holder instanceof IOptionCategory) { if (holder instanceof IOptionCategory) {
// Report error, only if the parent is a tool and thus also // Report error, only if the parent is a tool and thus also
// an option category. // an option category.
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"owner", //$NON-NLS-1$ "owner", //$NON-NLS-1$
ownerId, ownerId,
"optionCategory", //$NON-NLS-1$ "optionCategory", //$NON-NLS-1$
@ -431,7 +431,7 @@ public class OptionCategory extends BuildObject implements IOptionCategory {
error = true; error = true;
} else if ( false == holder.getId().equals(ownerId) ) { } else if ( false == holder.getId().equals(ownerId) ) {
// Report error, if the holder ID does not match the owner's ID. // Report error, if the holder ID does not match the owner's ID.
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"owner", //$NON-NLS-1$ "owner", //$NON-NLS-1$
ownerId, ownerId,
"optionCategory", //$NON-NLS-1$ "optionCategory", //$NON-NLS-1$

View file

@ -839,7 +839,7 @@ public class OutputType extends BuildObject implements IOutputType {
superClass = ManagedBuildManager.getExtensionOutputType(superClassId); superClass = ManagedBuildManager.getExtensionOutputType(superClassId);
if (superClass == null) { if (superClass == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"superClass", //$NON-NLS-1$ "superClass", //$NON-NLS-1$
superClassId, superClassId,
"outputType", //$NON-NLS-1$ "outputType", //$NON-NLS-1$

View file

@ -407,7 +407,7 @@ public class ProjectType extends BuildObject implements IProjectType, IBuildProp
superClass = ManagedBuildManager.getExtensionProjectType(superClassId); superClass = ManagedBuildManager.getExtensionProjectType(superClassId);
if (superClass == null) { if (superClass == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"superClass", //$NON-NLS-1$ "superClass", //$NON-NLS-1$
superClassId, superClassId,
"projectType", //$NON-NLS-1$ "projectType", //$NON-NLS-1$

View file

@ -593,7 +593,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
superClass = ManagedBuildManager.getExtensionTargetPlatform(superClassId); superClass = ManagedBuildManager.getExtensionTargetPlatform(superClassId);
if (superClass == null) { if (superClass == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"superClass", //$NON-NLS-1$ "superClass", //$NON-NLS-1$
superClassId, superClassId,
"targetPlatform", //$NON-NLS-1$ "targetPlatform", //$NON-NLS-1$

View file

@ -918,7 +918,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
iconPathURL = new URL(iconPath); iconPathURL = new URL(iconPath);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
// Print a warning // Print a warning
ManagedBuildManager.OutputIconError(iconPath); ManagedBuildManager.outputIconError(iconPath);
iconPathURL = null; iconPathURL = null;
} }
} }
@ -2402,7 +2402,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
if(type.getParent() != this) if(type.getParent() != this)
return; return;
} }
type = getEdtableOutputType(type); type = getEditableOutputType(type);
type.setOutputPrefix(prefix); type.setOutputPrefix(prefix);
setRebuildState(true); setRebuildState(true);
isDirty = true; isDirty = true;
@ -2858,7 +2858,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
setSuperClassInternal( ManagedBuildManager.getExtensionTool(superClassId) ); setSuperClassInternal( ManagedBuildManager.getExtensionTool(superClassId) );
if (getSuperClass() == null) { if (getSuperClass() == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"superClass", //$NON-NLS-1$ "superClass", //$NON-NLS-1$
superClassId, superClassId,
"tool", //$NON-NLS-1$ "tool", //$NON-NLS-1$
@ -3346,7 +3346,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
for(ListIterator<IInputType> iter = types.listIterator(); iter.hasNext();){ for(ListIterator<IInputType> iter = types.listIterator(); iter.hasNext();){
IInputType type = iter.next(); IInputType type = iter.next();
iter.set(getEdtableInputType(type)); iter.set(getEditableInputType(type));
} }
Map<IInputType, CLanguageData> map = (Map<IInputType, CLanguageData>)typeToDataMap.clone(); Map<IInputType, CLanguageData> map = (Map<IInputType, CLanguageData>)typeToDataMap.clone();
@ -3443,7 +3443,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
} }
public IInputType getEdtableInputType(IInputType base) { public IInputType getEditableInputType(IInputType base) {
if(base.getParent() == this) if(base.getParent() == this)
return base; return base;
@ -3464,7 +3464,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
return newType; return newType;
} }
public IOutputType getEdtableOutputType(IOutputType base) { public IOutputType getEditableOutputType(IOutputType base) {
if(base.getParent() == this) if(base.getParent() == this)
return base; return base;

View file

@ -1628,7 +1628,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
setSuperClassInternal(ManagedBuildManager.getExtensionToolChain(superClassId)); setSuperClassInternal(ManagedBuildManager.getExtensionToolChain(superClassId));
if (getSuperClass() == null) { if (getSuperClass() == null) {
// Report error // Report error
ManagedBuildManager.OutputResolveError( ManagedBuildManager.outputResolveError(
"superClass", //$NON-NLS-1$ "superClass", //$NON-NLS-1$
superClassId, superClassId,
"toolChain", //$NON-NLS-1$ "toolChain", //$NON-NLS-1$

View file

@ -1294,7 +1294,7 @@ public class ToolReference implements IToolReference {
return null; return null;
} }
public IInputType getEdtableInputType(IInputType base) { public IInputType getEditableInputType(IInputType base) {
return null; return null;
} }
@ -1326,7 +1326,7 @@ public class ToolReference implements IToolReference {
return getName(); return getName();
} }
public IOutputType getEdtableOutputType(IOutputType base) { public IOutputType getEditableOutputType(IOutputType base) {
return null; return null;
} }

View file

@ -71,7 +71,7 @@ public class BuildLanguageData extends CLanguageData {
private void obtainEditableInputType(){ private void obtainEditableInputType(){
if(fInputType != null){ if(fInputType != null){
// IInputType old = fInputType; // IInputType old = fInputType;
fInputType = fTool.getEdtableInputType(fInputType); fInputType = fTool.getEditableInputType(fInputType);
// if(old != fInputType){ // if(old != fInputType){
// fDiscoveredInfo.checkUpdateInputType(fInputType); // fDiscoveredInfo.checkUpdateInputType(fInputType);
// } // }
@ -88,12 +88,12 @@ public class BuildLanguageData extends CLanguageData {
if(getOptionsForKind(kind).length == 0 && isToolChainDiscoveryProfile()) if(getOptionsForKind(kind).length == 0 && isToolChainDiscoveryProfile())
return null; return null;
BuildEntryStorage starage = (BuildEntryStorage)fKindToEntryStore.get(kind); BuildEntryStorage storage = (BuildEntryStorage)fKindToEntryStore.get(kind);
if(starage == null){ if(storage == null){
starage = new BuildEntryStorage(kind, this); storage = new BuildEntryStorage(kind, this);
fKindToEntryStore.put(kind, starage); fKindToEntryStore.put(kind, storage);
} }
return starage; return storage;
} }
private void notifyOptionsChangeForKind(int kind){ private void notifyOptionsChangeForKind(int kind){

View file

@ -459,12 +459,12 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
if(landTypes.size() != 0){ if(landTypes.size() != 0){
List srcList = new ArrayList(); List srcList = new ArrayList();
srcList.addAll(landTypes); srcList.addAll(landTypes);
type = (InputType)tool.getEdtableInputType(type); type = (InputType)tool.getEditableInputType(type);
type.setSourceContentTypeIds((String[])srcList.toArray(new String[srcList.size()])); type.setSourceContentTypeIds((String[])srcList.toArray(new String[srcList.size()]));
} }
if(!des.getId().equals(type.getLanguageId(tool))){ if(!des.getId().equals(type.getLanguageId(tool))){
type = (InputType)tool.getEdtableInputType(type); type = (InputType)tool.getEditableInputType(type);
type.setLanguageIdAttribute(des.getId()); type.setLanguageIdAttribute(des.getId());
type.setLanguageNameAttribute(des.getName()); type.setLanguageNameAttribute(des.getName());
} }
@ -494,7 +494,7 @@ public class ConfigurationDataProvider extends CConfigurationDataProvider implem
String name = des.getName(); String name = des.getName();
Tool tool = (Tool)tc.createTool(extTool, id, name, false); Tool tool = (Tool)tc.createTool(extTool, id, name, false);
InputType type = (InputType)tool.getInputTypes()[0]; InputType type = (InputType)tool.getInputTypes()[0];
type = (InputType)tool.getEdtableInputType(type); type = (InputType)tool.getEditableInputType(type);
type.setSourceContentTypes(des.getContentTypes()); type.setSourceContentTypes(des.getContentTypes());
type.setLanguageNameAttribute(des.getName()); type.setLanguageNameAttribute(des.getName());
type.setName(des.getName()); type.setName(des.getName());

View file

@ -10,7 +10,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.envvar; package org.eclipse.cdt.managedbuilder.internal.envvar;
import org.eclipse.cdt.core.envvar.EnvirinmentVariable; import org.eclipse.cdt.core.envvar.EnvironmentVariable;
import org.eclipse.cdt.core.envvar.IEnvironmentVariable; import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable; import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
@ -19,7 +19,7 @@ import org.eclipse.cdt.managedbuilder.envvar.IBuildEnvironmentVariable;
* *
* @since 3.0 * @since 3.0
*/ */
public class BuildEnvVar extends EnvirinmentVariable implements IBuildEnvironmentVariable { public class BuildEnvVar extends EnvironmentVariable implements IBuildEnvironmentVariable {
public BuildEnvVar(String name, String value, int op, String delimiter){ public BuildEnvVar(String name, String value, int op, String delimiter){
super(name, value, op, delimiter); super(name, value, op, delimiter);
} }

View file

@ -120,11 +120,11 @@ public class TcModificationUtil {
return storage; return storage;
} }
public static PerTypeMapStorage cloneRealToolToPathSet(PerTypeMapStorage starage){ public static PerTypeMapStorage cloneRealToolToPathSet(PerTypeMapStorage storage){
starage = (PerTypeMapStorage)starage.clone(); storage = (PerTypeMapStorage)storage.clone();
int types[] = ObjectTypeBasedStorage.getSupportedObjectTypes(); int types[] = ObjectTypeBasedStorage.getSupportedObjectTypes();
for(int i = 0; i < types.length; i++){ for(int i = 0; i < types.length; i++){
Map map = starage.getMap(types[i], false); Map map = storage.getMap(types[i], false);
if(map != null){ if(map != null){
for(Iterator iter = map.entrySet().iterator(); iter.hasNext(); ){ for(Iterator iter = map.entrySet().iterator(); iter.hasNext(); ){
Map.Entry entry = (Map.Entry)iter.next(); Map.Entry entry = (Map.Entry)iter.next();
@ -133,7 +133,7 @@ public class TcModificationUtil {
} }
} }
return starage; return storage;
} }
public static PerTypeMapStorage createRealToolToPathSet(IConfiguration cfg, PerTypeMapStorage skipMapStorage, boolean addSkipPaths){ public static PerTypeMapStorage createRealToolToPathSet(IConfiguration cfg, PerTypeMapStorage skipMapStorage, boolean addSkipPaths){
@ -416,16 +416,16 @@ public class TcModificationUtil {
return list; return list;
} }
public static Object removeBuilderInfo(PerTypeMapStorage starage, IBuilder builder){ public static Object removeBuilderInfo(PerTypeMapStorage storage, IBuilder builder){
return starage.getMap(IRealBuildObjectAssociation.OBJECT_BUILDER, true).remove(builder); return storage.getMap(IRealBuildObjectAssociation.OBJECT_BUILDER, true).remove(builder);
} }
public static void restoreBuilderInfo(PerTypeMapStorage starage, IBuilder builder, Object obj){ public static void restoreBuilderInfo(PerTypeMapStorage storage, IBuilder builder, Object obj){
starage.getMap(IRealBuildObjectAssociation.OBJECT_BUILDER, true).put(builder, obj); storage.getMap(IRealBuildObjectAssociation.OBJECT_BUILDER, true).put(builder, obj);
} }
// public static boolean removeToolInfo(PerTypeMapStorage starage, IPath path, ITool tool){ // public static boolean removeToolInfo(PerTypeMapStorage storage, IPath path, ITool tool){
// Map map = starage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false); // Map map = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false);
// if(map == null) // if(map == null)
// return false; // return false;
// Set set = (Set)map.get(tool); // Set set = (Set)map.get(tool);
@ -437,14 +437,14 @@ public class TcModificationUtil {
// return result; // return result;
// } // }
// //
// public static void restoreToolInfo(PerTypeMapStorage starage, IPath path, ITool tool){ // public static void restoreToolInfo(PerTypeMapStorage storage, IPath path, ITool tool){
// Map map = starage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, true); // Map map = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, true);
// Set set = TcModificationUtil.getPathTreeSet(map, tool); // Set set = TcModificationUtil.getPathTreeSet(map, tool);
// set.add(path); // set.add(path);
// } // }
// //
// public static Set removeToolInfoWithChildren(PerTypeMapStorage starage, IPath path, ITool tool){ // public static Set removeToolInfoWithChildren(PerTypeMapStorage storage, IPath path, ITool tool){
// Map map = starage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false); // Map map = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false);
// if(map == null) // if(map == null)
// return null; // return null;
// SortedSet set = (SortedSet)map.get(tool); // SortedSet set = (SortedSet)map.get(tool);
@ -459,8 +459,8 @@ public class TcModificationUtil {
// return rmSet; // return rmSet;
// } // }
// //
// public static void restoreToolInfoWithChildren(PerTypeMapStorage starage, Set restoreSet, ITool tool){ // public static void restoreToolInfoWithChildren(PerTypeMapStorage storage, Set restoreSet, ITool tool){
// Map map = starage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, true); // Map map = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, true);
// Set set = TcModificationUtil.getPathTreeSet(map, tool); // Set set = TcModificationUtil.getPathTreeSet(map, tool);
// set.addAll(restoreSet); // set.addAll(restoreSet);
// } // }

View file

@ -734,7 +734,7 @@ public class MBSWizardHandler extends CWizardHandler {
return clone; return clone;
} }
public boolean canFinich() { public boolean canFinish() {
if(entryInfo == null) if(entryInfo == null)
return false; return false;
@ -749,7 +749,7 @@ public class MBSWizardHandler extends CWizardHandler {
if (!customPages[i].isPageComplete()) if (!customPages[i].isPageComplete())
return false; return false;
return super.canFinich(); return super.canFinish();
} }

View file

@ -36,19 +36,19 @@ public class CfgSettingsTests extends BaseTestCase {
ICProjectDescriptionWorkspacePreferences prefs = mngr.getProjectDescriptionWorkspacePreferences(true); ICProjectDescriptionWorkspacePreferences prefs = mngr.getProjectDescriptionWorkspacePreferences(true);
int wspRel = prefs.getConfigurationReltations(); int wspRel = prefs.getConfigurationRelations();
CoreModel model = CoreModel.getDefault(); CoreModel model = CoreModel.getDefault();
p1 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "a", IPDOMManager.ID_NO_INDEXER); p1 = CProjectHelper.createNewStileCProject(PROJ_NAME_PREFIX + "a", IPDOMManager.ID_NO_INDEXER);
IProject project = p1.getProject(); IProject project = p1.getProject();
ICProjectDescription des = model.getProjectDescription(project, false); ICProjectDescription des = model.getProjectDescription(project, false);
assertEquals(wspRel, des.getConfigurationReltations()); assertEquals(wspRel, des.getConfigurationRelations());
assertTrue(des.isDefaultConfigurationRelations()); assertTrue(des.isDefaultConfigurationRelations());
prefs.setConfigurationRelations(ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT); prefs.setConfigurationRelations(ICProjectDescriptionPreferences.CONFIGS_INDEPENDENT);
assertEquals(wspRel, des.getConfigurationReltations()); assertEquals(wspRel, des.getConfigurationRelations());
assertEquals(wspRel, mngr.getProjectDescriptionWorkspacePreferences(true).getConfigurationReltations()); assertEquals(wspRel, mngr.getProjectDescriptionWorkspacePreferences(true).getConfigurationRelations());
prefs.setConfigurationRelations(ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE); prefs.setConfigurationRelations(ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE);
assertEquals(wspRel, des.getConfigurationReltations()); assertEquals(wspRel, des.getConfigurationRelations());
assertEquals(wspRel, mngr.getProjectDescriptionWorkspacePreferences(true).getConfigurationReltations()); assertEquals(wspRel, mngr.getProjectDescriptionWorkspacePreferences(true).getConfigurationRelations());
assertTrue(des.isDefaultConfigurationRelations()); assertTrue(des.isDefaultConfigurationRelations());
wspRel = getChangedConfigRelStatus(wspRel); wspRel = getChangedConfigRelStatus(wspRel);
@ -57,41 +57,41 @@ public class CfgSettingsTests extends BaseTestCase {
mngr.setProjectDescriptionWorkspacePreferences(prefs, true, null); mngr.setProjectDescriptionWorkspacePreferences(prefs, true, null);
des = model.getProjectDescription(project, false); des = model.getProjectDescription(project, false);
prefs = mngr.getProjectDescriptionWorkspacePreferences(true); prefs = mngr.getProjectDescriptionWorkspacePreferences(true);
assertEquals(wspRel, des.getConfigurationReltations()); assertEquals(wspRel, des.getConfigurationRelations());
assertEquals(wspRel, prefs.getConfigurationReltations()); assertEquals(wspRel, prefs.getConfigurationRelations());
assertTrue(des.isDefaultConfigurationRelations()); assertTrue(des.isDefaultConfigurationRelations());
des = mngr.getProjectDescription(project); des = mngr.getProjectDescription(project);
assertTrue(des.isDefaultConfigurationRelations()); assertTrue(des.isDefaultConfigurationRelations());
wspRel = prefs.getConfigurationReltations(); wspRel = prefs.getConfigurationRelations();
assertEquals(wspRel, des.getConfigurationReltations()); assertEquals(wspRel, des.getConfigurationRelations());
wspRel = getChangedConfigRelStatus(wspRel); wspRel = getChangedConfigRelStatus(wspRel);
prefs.setConfigurationRelations(wspRel); prefs.setConfigurationRelations(wspRel);
assertTrue(wspRel != des.getConfigurationReltations()); assertTrue(wspRel != des.getConfigurationRelations());
mngr.setProjectDescriptionWorkspacePreferences(prefs, false, null); mngr.setProjectDescriptionWorkspacePreferences(prefs, false, null);
assertEquals(wspRel, des.getConfigurationReltations()); assertEquals(wspRel, des.getConfigurationRelations());
mngr.setProjectDescription(des.getProject(), des); mngr.setProjectDescription(des.getProject(), des);
des = mngr.getProjectDescription(project, false); des = mngr.getProjectDescription(project, false);
assertEquals(wspRel, des.getConfigurationReltations()); assertEquals(wspRel, des.getConfigurationRelations());
des = mngr.getProjectDescription(project); des = mngr.getProjectDescription(project);
prefs = mngr.getProjectDescriptionWorkspacePreferences(false); prefs = mngr.getProjectDescriptionWorkspacePreferences(false);
assertEquals(des.getConfigurationReltations(), prefs.getConfigurationReltations()); assertEquals(des.getConfigurationRelations(), prefs.getConfigurationRelations());
assertTrue(des.isDefaultConfigurationRelations()); assertTrue(des.isDefaultConfigurationRelations());
wspRel = prefs.getConfigurationReltations(); wspRel = prefs.getConfigurationRelations();
int projRel = getChangedConfigRelStatus(wspRel); int projRel = getChangedConfigRelStatus(wspRel);
des.setConfigurationRelations(projRel); des.setConfigurationRelations(projRel);
assertFalse(des.isDefaultConfigurationRelations()); assertFalse(des.isDefaultConfigurationRelations());
assertEquals(projRel, des.getConfigurationReltations()); assertEquals(projRel, des.getConfigurationRelations());
mngr.setProjectDescription(project, des); mngr.setProjectDescription(project, des);
des = mngr.getProjectDescription(project, false); des = mngr.getProjectDescription(project, false);
assertFalse(des.isDefaultConfigurationRelations()); assertFalse(des.isDefaultConfigurationRelations());
assertEquals(projRel, des.getConfigurationReltations()); assertEquals(projRel, des.getConfigurationRelations());
des = mngr.getProjectDescription(project, true); des = mngr.getProjectDescription(project, true);
assertFalse(des.isDefaultConfigurationRelations()); assertFalse(des.isDefaultConfigurationRelations());
assertEquals(projRel, des.getConfigurationReltations()); assertEquals(projRel, des.getConfigurationRelations());
ICConfigurationDescription aCfg = des.getActiveConfiguration(); ICConfigurationDescription aCfg = des.getActiveConfiguration();
ICConfigurationDescription sCfg = des.getDefaultSettingConfiguration(); ICConfigurationDescription sCfg = des.getDefaultSettingConfiguration();

View file

@ -834,7 +834,7 @@ public class IndexBugsTests extends BaseTestCase {
IIndexBinding binding = bindings[0]; IIndexBinding binding = bindings[0];
assertTrue(binding instanceof IVariable); assertTrue(binding instanceof IVariable);
IIndexName[] names = index.findNames(binding, IIndexName[] names = index.findNames(binding,
IIndex.FIND_ALL_OCCURENCES); IIndex.FIND_ALL_OCCURRENCES);
assertEquals(1, names.length); assertEquals(1, names.length);
assertEquals(f4.getFullPath().toString(), names[0].getFile().getLocation().getFullPath()); assertEquals(f4.getFullPath().toString(), names[0].getFile().getLocation().getFullPath());
@ -1288,7 +1288,7 @@ public class IndexBugsTests extends BaseTestCase {
IIndexBinding[] bindings = fIndex.findBindings(new char[][] { "unrelated".toCharArray(), IIndexBinding[] bindings = fIndex.findBindings(new char[][] { "unrelated".toCharArray(),
"b".toCharArray() }, IndexFilter.ALL, NPM); "b".toCharArray() }, IndexFilter.ALL, NPM);
assertEquals(1, bindings.length); assertEquals(1, bindings.length);
IIndexName[] decls = fIndex.findNames(bindings[0], IIndex.FIND_ALL_OCCURENCES); IIndexName[] decls = fIndex.findNames(bindings[0], IIndex.FIND_ALL_OCCURRENCES);
assertEquals(2, decls.length); assertEquals(2, decls.length);
} finally { } finally {
fIndex.releaseReadLock(); fIndex.releaseReadLock();
@ -1319,7 +1319,7 @@ public class IndexBugsTests extends BaseTestCase {
assertEquals(0, bindings.length); assertEquals(0, bindings.length);
bindings = fIndex.findBindings("ok".toCharArray(), IndexFilter.ALL, NPM); bindings = fIndex.findBindings("ok".toCharArray(), IndexFilter.ALL, NPM);
assertEquals(1, bindings.length); assertEquals(1, bindings.length);
IIndexName[] decls = fIndex.findNames(bindings[0], IIndex.FIND_ALL_OCCURENCES); IIndexName[] decls = fIndex.findNames(bindings[0], IIndex.FIND_ALL_OCCURRENCES);
assertEquals(2, decls.length); assertEquals(2, decls.length);
} finally { } finally {
fIndex.releaseReadLock(); fIndex.releaseReadLock();

View file

@ -112,9 +112,9 @@ public class IndexLocationTest extends BaseTestCase {
assertEquals(1, bs1.length); assertEquals(1, bs1.length);
assertEquals(1, bs2.length); assertEquals(1, bs2.length);
assertEquals(1, bs3.length); assertEquals(1, bs3.length);
IIndexName[] nms1 = index.findNames(bs1[0], IIndex.FIND_ALL_OCCURENCES); IIndexName[] nms1 = index.findNames(bs1[0], IIndex.FIND_ALL_OCCURRENCES);
IIndexName[] nms2 = index.findNames(bs2[0], IIndex.FIND_ALL_OCCURENCES); IIndexName[] nms2 = index.findNames(bs2[0], IIndex.FIND_ALL_OCCURRENCES);
IIndexName[] nms3 = index.findNames(bs3[0], IIndex.FIND_ALL_OCCURENCES); IIndexName[] nms3 = index.findNames(bs3[0], IIndex.FIND_ALL_OCCURRENCES);
assertEquals(1, nms1.length); assertEquals(1, nms1.length);
assertEquals(1, nms2.length); assertEquals(1, nms2.length);
assertEquals(1, nms3.length); assertEquals(1, nms3.length);
@ -168,7 +168,7 @@ public class IndexLocationTest extends BaseTestCase {
try { try {
IBinding[] bs= index.findBindings("External".toCharArray(), IndexFilter.ALL, NPM); IBinding[] bs= index.findBindings("External".toCharArray(), IndexFilter.ALL, NPM);
assertEquals(1, bs.length); assertEquals(1, bs.length);
IIndexName[] nms= index.findNames(bs[0], IIndex.FIND_ALL_OCCURENCES); IIndexName[] nms= index.findNames(bs[0], IIndex.FIND_ALL_OCCURRENCES);
assertEquals(1, nms.length); assertEquals(1, nms.length);
IIndexFileLocation ilocation= nms[0].getFile().getLocation(); IIndexFileLocation ilocation= nms[0].getFile().getLocation();
assertEquals("/"+cproject.getProject().getName()+"/content/external2.h", ilocation.getFullPath()); assertEquals("/"+cproject.getProject().getName()+"/content/external2.h", ilocation.getFullPath());
@ -196,7 +196,7 @@ public class IndexLocationTest extends BaseTestCase {
try { try {
IBinding[] bs= index.findBindings("External".toCharArray(), IndexFilter.ALL, NPM); IBinding[] bs= index.findBindings("External".toCharArray(), IndexFilter.ALL, NPM);
assertEquals(1, bs.length); assertEquals(1, bs.length);
IIndexName[] nms= index.findNames(bs[0], IIndex.FIND_ALL_OCCURENCES); IIndexName[] nms= index.findNames(bs[0], IIndex.FIND_ALL_OCCURRENCES);
assertEquals(1, nms.length); assertEquals(1, nms.length);
IIndexFileLocation ilocation= nms[0].getFile().getLocation(); IIndexFileLocation ilocation= nms[0].getFile().getLocation();
assertEquals("/"+cproject.getProject().getName()+"/content/external2.h", ilocation.getFullPath()); assertEquals("/"+cproject.getProject().getName()+"/content/external2.h", ilocation.getFullPath());

View file

@ -744,7 +744,7 @@ public class IndexUpdateTests extends IndexTestBase {
try { try {
binding = findBinding("globalVar"); binding = findBinding("globalVar");
assertTrue(binding instanceof IVariable); assertTrue(binding instanceof IVariable);
assertEquals(2, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURENCES).length); assertEquals(2, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
} finally { } finally {
fIndex.releaseReadLock(); fIndex.releaseReadLock();
} }
@ -756,7 +756,7 @@ public class IndexUpdateTests extends IndexTestBase {
try { try {
binding = findBinding("globalVar"); binding = findBinding("globalVar");
assertTrue(binding instanceof IVariable); assertTrue(binding instanceof IVariable);
assertEquals(1, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURENCES).length); assertEquals(1, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
} finally { } finally {
fIndex.releaseReadLock(); fIndex.releaseReadLock();
} }
@ -769,7 +769,7 @@ public class IndexUpdateTests extends IndexTestBase {
try { try {
binding = findBinding("newVar"); binding = findBinding("newVar");
assertTrue(binding instanceof IVariable); assertTrue(binding instanceof IVariable);
assertEquals(2, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURENCES).length); assertEquals(2, fIndex.findNames(binding, IIndex.FIND_ALL_OCCURRENCES).length);
} finally { } finally {
fIndex.releaseReadLock(); fIndex.releaseReadLock();
} }

View file

@ -123,7 +123,7 @@ public class TeamSharedIndexTest extends IndexTestBase {
assertTrue(binding.length < 2); assertTrue(binding.length < 2);
if (binding.length == 1) { if (binding.length == 1) {
assertTrue(binding[0] instanceof IVariable); assertTrue(binding[0] instanceof IVariable);
count= index.findNames(binding[0], IIndex.FIND_ALL_OCCURENCES).length; count= index.findNames(binding[0], IIndex.FIND_ALL_OCCURRENCES).length;
} }
assertEquals(var, expectedCount, count); assertEquals(var, expectedCount, count);
} }

View file

@ -230,14 +230,14 @@ public class PDOMCPPBugsTest extends BaseTestCase {
assertTrue(ib[1] instanceof IFunction); assertTrue(ib[1] instanceof IFunction);
assertTrue(ib[1] instanceof ICPPBinding); assertTrue(ib[1] instanceof ICPPBinding);
IName[] nms= pdom.findNames(ib[0], IIndexFragment.FIND_REFERENCES | IIndexFragment.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); IName[] nms= pdom.findNames(ib[0], IIndexFragment.FIND_REFERENCES | IIndexFragment.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
assertEquals(1, nms.length); assertEquals(1, nms.length);
assertTrue(nms[0].getFileLocation().getFileName().endsWith(".cpp")); assertTrue(nms[0].getFileLocation().getFileName().endsWith(".cpp"));
nms= pdom.findNames(ib[0], IIndexFragment.FIND_REFERENCES); nms= pdom.findNames(ib[0], IIndexFragment.FIND_REFERENCES);
assertEquals(0, nms.length); assertEquals(0, nms.length);
nms= pdom.findNames(ib[1], IIndexFragment.FIND_DEFINITIONS | IIndexFragment.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); nms= pdom.findNames(ib[1], IIndexFragment.FIND_DEFINITIONS | IIndexFragment.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
assertEquals(1, nms.length); assertEquals(1, nms.length);
assertTrue(nms[0].getFileLocation().getFileName().endsWith(".c")); assertTrue(nms[0].getFileLocation().getFileName().endsWith(".c"));

View file

@ -15,12 +15,12 @@ import org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
public final class CProjectDescriptionEvent { public final class CProjectDescriptionEvent {
public static final int LOADDED = 1; public static final int LOADED = 1;
public static final int ABOUT_TO_APPLY = 1 << 1; public static final int ABOUT_TO_APPLY = 1 << 1;
public static final int APPLIED = 1 << 2; public static final int APPLIED = 1 << 2;
public static final int COPY_CREATED = 1 << 3; public static final int COPY_CREATED = 1 << 3;
public static final int DATA_APPLIED = 1 << 4; public static final int DATA_APPLIED = 1 << 4;
public static final int ALL = LOADDED | ABOUT_TO_APPLY | APPLIED | COPY_CREATED | DATA_APPLIED; public static final int ALL = LOADED | ABOUT_TO_APPLY | APPLIED | COPY_CREATED | DATA_APPLIED;
private int fType; private int fType;
private ICProjectDescription fNewDescription; private ICProjectDescription fNewDescription;
@ -77,7 +77,7 @@ public final class CProjectDescriptionEvent {
private ICDescriptionDelta getDelta(boolean active){ private ICDescriptionDelta getDelta(boolean active){
ICDescriptionDelta delta = null; ICDescriptionDelta delta = null;
switch(getEventType()){ switch(getEventType()){
case LOADDED: case LOADED:
case ABOUT_TO_APPLY: case ABOUT_TO_APPLY:
case APPLIED: case APPLIED:
case DATA_APPLIED: case DATA_APPLIED:

View file

@ -16,7 +16,7 @@ public interface ICProjectDescriptionPreferences {
* independent of each other, i.e. changing the active configuration will NOT change the settings * independent of each other, i.e. changing the active configuration will NOT change the settings
* configuration used by the core and vie a versa * configuration used by the core and vie a versa
* *
* @see #getConfigurationReltations() * @see #getConfigurationRelations()
* @see #setConfigurationRelations(Integer) * @see #setConfigurationRelations(Integer)
*/ */
public static final int CONFIGS_INDEPENDENT = 1; public static final int CONFIGS_INDEPENDENT = 1;
@ -26,7 +26,7 @@ public interface ICProjectDescriptionPreferences {
* settings are linked with each other, i.e. changing the active configuration will change the settings * settings are linked with each other, i.e. changing the active configuration will change the settings
* configuration used by the core and vie a versa * configuration used by the core and vie a versa
* *
* @see #getConfigurationReltations() * @see #getConfigurationRelations()
* @see #setConfigurationRelations(Integer) * @see #setConfigurationRelations(Integer)
*/ */
public static final int CONFIGS_LINK_SETTINGS_AND_ACTIVE = 2; public static final int CONFIGS_LINK_SETTINGS_AND_ACTIVE = 2;
@ -39,7 +39,7 @@ public interface ICProjectDescriptionPreferences {
* *
* @return int * @return int
*/ */
int getConfigurationReltations(); int getConfigurationRelations();
/** /**
* sets the configuration relation status. can be an integer value containing the * sets the configuration relation status. can be an integer value containing the

View file

@ -22,12 +22,12 @@ import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData;
import org.eclipse.cdt.core.settings.model.util.CDataUtil; import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
public class CDataFacroty { public class CDataFactory {
private static CDataFacroty fInstance; private static CDataFactory fInstance;
public static CDataFacroty getDefault(){ public static CDataFactory getDefault(){
if(fInstance == null) if(fInstance == null)
fInstance = new CDataFacroty(); fInstance = new CDataFactory();
return fInstance; return fInstance;
} }

View file

@ -38,13 +38,13 @@ public class CDefaultConfigurationData extends CConfigurationData {
protected CTargetPlatformData fTargetPlatformData; protected CTargetPlatformData fTargetPlatformData;
protected CBuildData fBuildData; protected CBuildData fBuildData;
protected ICSourceEntry[] fSourceEntries; protected ICSourceEntry[] fSourceEntries;
private CDataFacroty fFactory; private CDataFactory fFactory;
protected boolean fIsModified; protected boolean fIsModified;
private CConfigurationStatus fStatus = CConfigurationStatus.CFG_STATUS_OK; private CConfigurationStatus fStatus = CConfigurationStatus.CFG_STATUS_OK;
protected CDefaultConfigurationData(CDataFacroty factory){ protected CDefaultConfigurationData(CDataFactory factory){
if(factory == null) if(factory == null)
factory = new CDataFacroty(); factory = new CDataFactory();
fFactory = factory; fFactory = factory;
} }
@ -52,15 +52,15 @@ public class CDefaultConfigurationData extends CConfigurationData {
// this(id, name, (CDataFacroty)null); // this(id, name, (CDataFacroty)null);
// } // }
public CDataFacroty getFactory(){ public CDataFactory getFactory(){
return fFactory; return fFactory;
} }
public CDefaultConfigurationData(String id, String name, CDataFacroty factory) { public CDefaultConfigurationData(String id, String name, CDataFactory factory) {
fId = id; fId = id;
fName = name; fName = name;
if(factory == null) if(factory == null)
factory = new CDataFacroty(); factory = new CDataFactory();
fFactory = factory; fFactory = factory;
} }
@ -68,7 +68,7 @@ public class CDefaultConfigurationData extends CConfigurationData {
// this(id, name, base, null); // this(id, name, base, null);
// } // }
public CDefaultConfigurationData(String id, String name, CConfigurationData base, CDataFacroty facroty, boolean clone) { public CDefaultConfigurationData(String id, String name, CConfigurationData base, CDataFactory facroty, boolean clone) {
this(id, name, facroty); this(id, name, facroty);
copySettingsFrom(base, clone); copySettingsFrom(base, clone);

View file

@ -43,7 +43,7 @@ public class CDefaultConfigurationDataProvider extends
CConfigurationData base, CConfigurationData base,
boolean clone, boolean clone,
IProgressMonitor monitor) throws CoreException { IProgressMonitor monitor) throws CoreException {
CDataFacroty factory = getDataFactory(); CDataFactory factory = getDataFactory();
return factory.createConfigurationdata(des.getId(), des.getName(), base, clone); return factory.createConfigurationdata(des.getId(), des.getName(), base, clone);
} }
@ -54,7 +54,7 @@ public class CDefaultConfigurationDataProvider extends
ICStorageElement el = getStorageElement(des, false); ICStorageElement el = getStorageElement(des, false);
if(el != null){ if(el != null){
CDataSerializer serializer = getDataSerializer(); CDataSerializer serializer = getDataSerializer();
CDataFacroty factory = getDataFactory(); CDataFactory factory = getDataFactory();
try { try {
return serializer.loadConfigurationData(factory, el); return serializer.loadConfigurationData(factory, el);
} catch (CoreException e){ } catch (CoreException e){
@ -75,8 +75,8 @@ public class CDefaultConfigurationDataProvider extends
//do nothing //do nothing
} }
protected CDataFacroty getDataFactory(){ protected CDataFactory getDataFactory(){
return CDataFacroty.getDefault(); return CDataFactory.getDefault();
} }
protected CDataSerializer getDataSerializer(){ protected CDataSerializer getDataSerializer(){
@ -91,7 +91,7 @@ public class CDefaultConfigurationDataProvider extends
return des.getStorage(getStorageId(), create); return des.getStorage(getStorageId(), create);
} }
protected CConfigurationData createPreferenceConfig(CDataFacroty factory){ protected CConfigurationData createPreferenceConfig(CDataFactory factory){
return CDataUtil.createEmptyData(null, "preference", factory, true); //$NON-NLS-1$ return CDataUtil.createEmptyData(null, "preference", factory, true); //$NON-NLS-1$
} }
} }

View file

@ -23,30 +23,30 @@ public class CDefaultFileData extends CFileData {
protected String fId; protected String fId;
protected CLanguageData fLanguageData; protected CLanguageData fLanguageData;
protected CConfigurationData fCfg; protected CConfigurationData fCfg;
private CDataFacroty fFactory; private CDataFactory fFactory;
protected boolean fIsModified; protected boolean fIsModified;
public CDefaultFileData(CConfigurationData cfg, CDataFacroty factory) { public CDefaultFileData(CConfigurationData cfg, CDataFactory factory) {
fCfg = cfg; fCfg = cfg;
if(factory == null) if(factory == null)
factory = new CDataFacroty(); factory = new CDataFactory();
fFactory = factory; fFactory = factory;
} }
public CDefaultFileData(String id, IPath path, CConfigurationData cfg, CDataFacroty factory) { public CDefaultFileData(String id, IPath path, CConfigurationData cfg, CDataFactory factory) {
this(cfg, factory); this(cfg, factory);
fId = id; fId = id;
fName = path.toString(); fName = path.toString();
fPath = path; fPath = path;
} }
public CDefaultFileData(String id, IPath path, CFileData base, CConfigurationData cfg, CDataFacroty factory, boolean clone) { public CDefaultFileData(String id, IPath path, CFileData base, CConfigurationData cfg, CDataFactory factory, boolean clone) {
this(id, path, cfg, factory); this(id, path, cfg, factory);
copyDataFrom(base, clone); copyDataFrom(base, clone);
} }
public CDefaultFileData(String id, IPath path, CFolderData base, CLanguageData baseLangData, CConfigurationData cfg, CDataFacroty factory) { public CDefaultFileData(String id, IPath path, CFolderData base, CLanguageData baseLangData, CConfigurationData cfg, CDataFactory factory) {
this(id, path, cfg, factory); this(id, path, cfg, factory);
copyDataFrom(base, baseLangData); copyDataFrom(base, baseLangData);

View file

@ -26,24 +26,24 @@ public class CDefaultFolderData extends CFolderData {
protected String fName; protected String fName;
protected String fId; protected String fId;
protected CConfigurationData fCfg; protected CConfigurationData fCfg;
private CDataFacroty fFactory; private CDataFactory fFactory;
protected boolean fIsModified; protected boolean fIsModified;
public CDefaultFolderData(CConfigurationData cfg, CDataFacroty factory) { public CDefaultFolderData(CConfigurationData cfg, CDataFactory factory) {
fCfg = cfg; fCfg = cfg;
if(factory == null) if(factory == null)
factory = new CDataFacroty(); factory = new CDataFactory();
fFactory = factory; fFactory = factory;
} }
public CDefaultFolderData(String id, IPath path, CConfigurationData cfg, CDataFacroty factory) { public CDefaultFolderData(String id, IPath path, CConfigurationData cfg, CDataFactory factory) {
this(cfg, factory); this(cfg, factory);
fId = id; fId = id;
fName = path.toString(); fName = path.toString();
fPath = path; fPath = path;
} }
public CDefaultFolderData(String id, IPath path, CFolderData base, CConfigurationData cfg, CDataFacroty factory, boolean clone) { public CDefaultFolderData(String id, IPath path, CFolderData base, CConfigurationData cfg, CDataFactory factory, boolean clone) {
this(id, path, cfg, factory); this(id, path, cfg, factory);
copyDataFrom(base, clone); copyDataFrom(base, clone);

View file

@ -51,7 +51,7 @@ public abstract class UserAndDiscoveredEntryConfigurationDataProvider extends
} }
} }
protected class DataFactory extends CDataFacroty { protected class DataFactory extends CDataFactory {
@Override @Override
public CLanguageData createLanguageData(CConfigurationData cfg, public CLanguageData createLanguageData(CConfigurationData cfg,
CResourceData rcBase, CLanguageData base, String id, boolean clone) { CResourceData rcBase, CLanguageData base, String id, boolean clone) {
@ -77,7 +77,7 @@ public abstract class UserAndDiscoveredEntryConfigurationDataProvider extends
} }
@Override @Override
protected CDataFacroty getDataFactory() { protected CDataFactory getDataFactory() {
if(fDataFactory == null){ if(fDataFactory == null){
fDataFactory = new DataFactory(); fDataFactory = new DataFactory();
} }

View file

@ -26,7 +26,7 @@ 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.extension.CResourceData; import org.eclipse.cdt.core.settings.model.extension.CResourceData;
import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData; import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData;
import org.eclipse.cdt.core.settings.model.extension.impl.CDataFacroty; import org.eclipse.cdt.core.settings.model.extension.impl.CDataFactory;
import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultLanguageData; import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultLanguageData;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IPath;
@ -65,7 +65,7 @@ public class CDataSerializer {
return fInstance; return fInstance;
} }
public CConfigurationData loadConfigurationData(CDataFacroty factory, ICStorageElement el) throws CoreException { public CConfigurationData loadConfigurationData(CDataFactory factory, ICStorageElement el) throws CoreException {
String id = el.getAttribute(ID); String id = el.getAttribute(ID);
if(id == null) if(id == null)
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.20"))); //$NON-NLS-1$ throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.20"))); //$NON-NLS-1$
@ -120,7 +120,7 @@ public class CDataSerializer {
return data; return data;
} }
public CFolderData loadFolderData(CConfigurationData data, CDataFacroty factory, ICStorageElement el) throws CoreException { public CFolderData loadFolderData(CConfigurationData data, CDataFactory factory, ICStorageElement el) throws CoreException {
String id = el.getAttribute(ID); String id = el.getAttribute(ID);
if(id == null) if(id == null)
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.22"))); //$NON-NLS-1$ throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.22"))); //$NON-NLS-1$
@ -159,7 +159,7 @@ public class CDataSerializer {
return foData; return foData;
} }
public CFileData loadFileData(CConfigurationData data, CDataFacroty factory, ICStorageElement el) throws CoreException { public CFileData loadFileData(CConfigurationData data, CDataFactory factory, ICStorageElement el) throws CoreException {
String id = el.getAttribute(ID); String id = el.getAttribute(ID);
if(id == null) if(id == null)
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.25"))); //$NON-NLS-1$ throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.25"))); //$NON-NLS-1$
@ -198,7 +198,7 @@ public class CDataSerializer {
return fiData; return fiData;
} }
public CBuildData loadBuildData(CConfigurationData data, CDataFacroty factory, ICStorageElement el) throws CoreException { public CBuildData loadBuildData(CConfigurationData data, CDataFactory factory, ICStorageElement el) throws CoreException {
String id = el.getAttribute(ID); String id = el.getAttribute(ID);
if(id == null) if(id == null)
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.28"))); //$NON-NLS-1$ throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.28"))); //$NON-NLS-1$
@ -240,7 +240,7 @@ public class CDataSerializer {
return bData; return bData;
} }
public CTargetPlatformData loadTargetPlatformData(CConfigurationData data, CDataFacroty factory, ICStorageElement el) throws CoreException { public CTargetPlatformData loadTargetPlatformData(CConfigurationData data, CDataFactory factory, ICStorageElement el) throws CoreException {
String id = el.getAttribute(ID); String id = el.getAttribute(ID);
if(id == null) if(id == null)
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.30"))); //$NON-NLS-1$ throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.30"))); //$NON-NLS-1$
@ -260,7 +260,7 @@ public class CDataSerializer {
return tpData; return tpData;
} }
public CLanguageData loadLanguageData(CConfigurationData data, CResourceData rcData, CDataFacroty factory, ICStorageElement el) throws CoreException { public CLanguageData loadLanguageData(CConfigurationData data, CResourceData rcData, CDataFactory factory, ICStorageElement el) throws CoreException {
String id = el.getAttribute(ID); String id = el.getAttribute(ID);
if(id == null) if(id == null)
throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.32"))); //$NON-NLS-1$ throw new CoreException(new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, UtilMessages.getString("CDataSerializer.32"))); //$NON-NLS-1$

View file

@ -54,7 +54,7 @@ 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.extension.CResourceData; import org.eclipse.cdt.core.settings.model.extension.CResourceData;
import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData; import org.eclipse.cdt.core.settings.model.extension.CTargetPlatformData;
import org.eclipse.cdt.core.settings.model.extension.impl.CDataFacroty; import org.eclipse.cdt.core.settings.model.extension.impl.CDataFactory;
import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultLanguageData; import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultLanguageData;
import org.eclipse.cdt.internal.core.settings.model.ExceptionFactory; import org.eclipse.cdt.internal.core.settings.model.ExceptionFactory;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
@ -467,7 +467,7 @@ public class CDataUtil {
return h; return h;
} }
public static CConfigurationData createEmptyData(String id, String name, CDataFacroty factory, boolean performLangAdjustment){ public static CConfigurationData createEmptyData(String id, String name, CDataFactory factory, boolean performLangAdjustment){
if(id == null) if(id == null)
id = genId(null); id = genId(null);
@ -493,7 +493,7 @@ public class CDataUtil {
return data; return data;
} }
public static CConfigurationData adjustConfig(CConfigurationData cfg, CDataFacroty factory){ public static CConfigurationData adjustConfig(CConfigurationData cfg, CDataFactory factory){
LanguageManager mngr = LanguageManager.getInstance(); LanguageManager mngr = LanguageManager.getInstance();
ILanguageDescriptor dess[] = mngr.getLanguageDescriptors(); ILanguageDescriptor dess[] = mngr.getLanguageDescriptors();
Map map = mngr.getContentTypeIdToLanguageDescriptionsMap(); Map map = mngr.getContentTypeIdToLanguageDescriptionsMap();
@ -509,7 +509,7 @@ public class CDataUtil {
} }
private static void adjustFolderData(CConfigurationData cfgData, CFolderData data, CDataFacroty factory, ILanguageDescriptor dess[], HashMap map){ private static void adjustFolderData(CConfigurationData cfgData, CFolderData data, CDataFactory factory, ILanguageDescriptor dess[], HashMap map){
Map langMap = new HashMap(); Map langMap = new HashMap();
for(int i = 0; i < dess.length; i++){ for(int i = 0; i < dess.length; i++){
langMap.put(dess[i].getId(), dess[i]); langMap.put(dess[i].getId(), dess[i]);
@ -563,7 +563,7 @@ public class CDataUtil {
return lData; return lData;
} }
private static void addLangs(CConfigurationData cfgData, CFolderData data, CDataFacroty factory, Map langMap, Map cTypeToLangMap){ private static void addLangs(CConfigurationData cfgData, CFolderData data, CDataFactory factory, Map langMap, Map cTypeToLangMap){
List list = new ArrayList(langMap.values()); List list = new ArrayList(langMap.values());
ILanguageDescriptor des; ILanguageDescriptor des;
while(list.size() != 0){ while(list.size() != 0){

View file

@ -62,7 +62,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
@ -301,8 +301,8 @@ public class CModelBuilder2 implements IContributedModelBuilder {
createFunctionDefinition(parent, (IASTFunctionDefinition)declaration, false); createFunctionDefinition(parent, (IASTFunctionDefinition)declaration, false);
} else if (declaration instanceof IASTSimpleDeclaration) { } else if (declaration instanceof IASTSimpleDeclaration) {
createSimpleDeclarations(parent, (IASTSimpleDeclaration)declaration, false); createSimpleDeclarations(parent, (IASTSimpleDeclaration)declaration, false);
} else if (declaration instanceof ICPPASTVisiblityLabel) { } else if (declaration instanceof ICPPASTVisibilityLabel) {
handleVisibilityLabel((ICPPASTVisiblityLabel)declaration); handleVisibilityLabel((ICPPASTVisibilityLabel)declaration);
} else if(declaration instanceof ICPPASTNamespaceDefinition) { } else if(declaration instanceof ICPPASTNamespaceDefinition) {
createNamespace(parent, (ICPPASTNamespaceDefinition) declaration); createNamespace(parent, (ICPPASTNamespaceDefinition) declaration);
} else if (declaration instanceof ICPPASTNamespaceAlias) { } else if (declaration instanceof ICPPASTNamespaceAlias) {
@ -1160,7 +1160,7 @@ public class CModelBuilder2 implements IContributedModelBuilder {
* Handle the special "declaration" visibility label * Handle the special "declaration" visibility label
* @param visibilityLabel * @param visibilityLabel
*/ */
private void handleVisibilityLabel(ICPPASTVisiblityLabel visibilityLabel) { private void handleVisibilityLabel(ICPPASTVisibilityLabel visibilityLabel) {
setCurrentVisibility(adaptVisibilityConstant(visibilityLabel.getVisibility())); setCurrentVisibility(adaptVisibilityConstant(visibilityLabel.getVisibility()));
} }
@ -1173,11 +1173,11 @@ public class CModelBuilder2 implements IContributedModelBuilder {
*/ */
private ASTAccessVisibility adaptVisibilityConstant(int visibility) { private ASTAccessVisibility adaptVisibilityConstant(int visibility) {
switch(visibility) { switch(visibility) {
case ICPPASTVisiblityLabel.v_public: case ICPPASTVisibilityLabel.v_public:
return ASTAccessVisibility.PUBLIC; return ASTAccessVisibility.PUBLIC;
case ICPPASTVisiblityLabel.v_protected: case ICPPASTVisibilityLabel.v_protected:
return ASTAccessVisibility.PROTECTED; return ASTAccessVisibility.PROTECTED;
case ICPPASTVisiblityLabel.v_private: case ICPPASTVisibilityLabel.v_private:
return ASTAccessVisibility.PRIVATE; return ASTAccessVisibility.PRIVATE;
} }
assert false : "Unknown visibility"; //$NON-NLS-1$ assert false : "Unknown visibility"; //$NON-NLS-1$

View file

@ -30,7 +30,7 @@ public abstract class AbstractCExtensionProxy implements ICProjectDescriptionLis
public AbstractCExtensionProxy(IProject project, String extPointId) { public AbstractCExtensionProxy(IProject project, String extPointId) {
fProject = project; fProject = project;
fExtPointId = extPointId; fExtPointId = extPointId;
CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.LOADDED | CProjectDescriptionEvent.APPLIED); CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.LOADED | CProjectDescriptionEvent.APPLIED);
} }
protected final void providerRequested(){ protected final void providerRequested(){
@ -156,7 +156,7 @@ public abstract class AbstractCExtensionProxy implements ICProjectDescriptionLis
protected boolean doHandleEvent(CProjectDescriptionEvent event){ protected boolean doHandleEvent(CProjectDescriptionEvent event){
boolean force = false; boolean force = false;
switch(event.getEventType()){ switch(event.getEventType()){
case CProjectDescriptionEvent.LOADDED: case CProjectDescriptionEvent.LOADED:
force = true; force = true;
case CProjectDescriptionEvent.APPLIED: case CProjectDescriptionEvent.APPLIED:
ICProjectDescription des = event.getNewCProjectDescription(); ICProjectDescription des = event.getNewCProjectDescription();

View file

@ -125,7 +125,7 @@ public class CConfigurationDescription extends CDataProxyContainer implements IC
CProjectDescriptionManager mngr = CProjectDescriptionManager.getInstance(); CProjectDescriptionManager mngr = CProjectDescriptionManager.getInstance();
CConfigurationData data = mngr.createDefaultConfigData(projectDes.getProject(), id, name, PathEntryConfigurationDataProvider.getDataFactory()); CConfigurationData data = mngr.createDefaultConfigData(projectDes.getProject(), id, name, PathEntryConfigurationDataProvider.getDataFactory());
setData(data); setData(data);
fCfgSpecSettings.reconsileExtensionSettings(false); fCfgSpecSettings.reconcileExtensionSettings(false);
} }
/* /*

View file

@ -100,7 +100,7 @@ public class CConfigurationDescriptionCache extends CDefaultConfigurationData
fSettingsFactory = null; fSettingsFactory = null;
fSpecSettings.reconsileExtensionSettings(true); fSpecSettings.reconcileExtensionSettings(true);
((CBuildSettingCache)fBuildData).initEnvironmentCache(); ((CBuildSettingCache)fBuildData).initEnvironmentCache();
ICdtVariable vars[] = CdtVariableManager.getDefault().getVariables(this); ICdtVariable vars[] = CdtVariableManager.getDefault().getVariables(this);
fMacros = new StorableCdtVariables(vars, true); fMacros = new StorableCdtVariables(vars, true);

View file

@ -271,7 +271,7 @@ public class CConfigurationSpecSettings implements ICSettingsStorage{
if(fStorage == null){ if(fStorage == null){
fStorage = new CStorage((InternalXmlStorageElement)getRootStorageElement()); fStorage = new CStorage((InternalXmlStorageElement)getRootStorageElement());
// if(fDescriptor != null) // if(fDescriptor != null)
// reconsileDescriptor(fStorage, fDescriptor); // reconcileDescriptor(fStorage, fDescriptor);
} }
return fStorage; return fStorage;
} }
@ -605,7 +605,7 @@ public class CConfigurationSpecSettings implements ICSettingsStorage{
return ids; return ids;
} }
void reconsileExtensionSettings(boolean toExts){ void reconcileExtensionSettings(boolean toExts){
checkReconsile(CCorePlugin.BINARY_PARSER_UNIQ_ID, toExts); checkReconsile(CCorePlugin.BINARY_PARSER_UNIQ_ID, toExts);
checkReconsile(CCorePlugin.ERROR_PARSER_UNIQ_ID, toExts); checkReconsile(CCorePlugin.ERROR_PARSER_UNIQ_ID, toExts);
} }
@ -613,9 +613,9 @@ public class CConfigurationSpecSettings implements ICSettingsStorage{
// private boolean checkReconsile(String extPointId, ICConfigExtensionReference refs[], boolean get){ // private boolean checkReconsile(String extPointId, ICConfigExtensionReference refs[], boolean get){
// if(!get || !(((IInternalCCfgInfo)fCfg).getConfigurationData(false) instanceof CConfigurationDescriptionCache)){ // if(!get || !(((IInternalCCfgInfo)fCfg).getConfigurationData(false) instanceof CConfigurationDescriptionCache)){
// if(CCorePlugin.BINARY_PARSER_UNIQ_ID.equals(extPointId)) // if(CCorePlugin.BINARY_PARSER_UNIQ_ID.equals(extPointId))
// return CProjectDescriptionManager.getInstance().reconsileBinaryParserExtRefs(fCfg, refs, get); // return CProjectDescriptionManager.getInstance().reconcileBinaryParserExtRefs(fCfg, refs, get);
// else if(CCorePlugin.ERROR_PARSER_UNIQ_ID.equals(extPointId)) // else if(CCorePlugin.ERROR_PARSER_UNIQ_ID.equals(extPointId))
// return CProjectDescriptionManager.getInstance().reconsileErrorParserExtRefs(fCfg, refs, get); // return CProjectDescriptionManager.getInstance().reconcileErrorParserExtRefs(fCfg, refs, get);
// } // }
// return false; // return false;
// } // }
@ -832,7 +832,7 @@ public class CConfigurationSpecSettings implements ICSettingsStorage{
} }
private void copyExtensionInfo(CConfigurationSpecSettings other){ private void copyExtensionInfo(CConfigurationSpecSettings other){
other.reconsileExtensionSettings(true); other.reconcileExtensionSettings(true);
if(other.fExtMap != null && other.fExtMap.size() != 0){ if(other.fExtMap != null && other.fExtMap.size() != 0){
fExtMap = (HashMap)other.fExtMap.clone(); fExtMap = (HashMap)other.fExtMap.clone();
for(Iterator iter = fExtMap.entrySet().iterator(); iter.hasNext();){ for(Iterator iter = fExtMap.entrySet().iterator(); iter.hasNext();){

View file

@ -68,7 +68,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
public void startup(){ public void startup(){
CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.DATA_APPLIED CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.DATA_APPLIED
| CProjectDescriptionEvent.LOADDED); | CProjectDescriptionEvent.LOADED);
} }
public void shutdown(){ public void shutdown(){
@ -684,7 +684,7 @@ public class CExternalSettingsManager implements ICExternalSettingsListener, ICP
case CProjectDescriptionEvent.DATA_APPLIED: case CProjectDescriptionEvent.DATA_APPLIED:
checkStore(event.getNewCProjectDescription()); checkStore(event.getNewCProjectDescription());
break; break;
case CProjectDescriptionEvent.LOADDED: case CProjectDescriptionEvent.LOADED:
final SettingsUpdateStatus status = update(event.getNewCProjectDescription()); final SettingsUpdateStatus status = update(event.getNewCProjectDescription());
if(status.isChanged()){ if(status.isChanged()){
IWorkspaceRunnable r = new IWorkspaceRunnable(){ IWorkspaceRunnable r = new IWorkspaceRunnable(){

View file

@ -383,7 +383,7 @@ public class CProjectDescription implements ICProjectDescription, ICDataProxyCon
fActiveCfgInfo.setConfiguration(cfg); fActiveCfgInfo.setConfiguration(cfg);
if(getConfigurationReltations() == CONFIGS_LINK_SETTINGS_AND_ACTIVE) if(getConfigurationRelations() == CONFIGS_LINK_SETTINGS_AND_ACTIVE)
fSettingCfgInfo.setConfiguration(cfg); fSettingCfgInfo.setConfiguration(cfg);
} }
@ -529,7 +529,7 @@ public class CProjectDescription implements ICProjectDescription, ICDataProxyCon
} }
public ICConfigurationDescription getDefaultSettingConfiguration(){ public ICConfigurationDescription getDefaultSettingConfiguration(){
if(getConfigurationReltations() == CONFIGS_LINK_SETTINGS_AND_ACTIVE) if(getConfigurationRelations() == CONFIGS_LINK_SETTINGS_AND_ACTIVE)
return getActiveConfiguration(); return getActiveConfiguration();
return fSettingCfgInfo.getConfiguration(); return fSettingCfgInfo.getConfiguration();
@ -543,7 +543,7 @@ public class CProjectDescription implements ICProjectDescription, ICDataProxyCon
fSettingCfgInfo.setConfiguration(cfg); fSettingCfgInfo.setConfiguration(cfg);
if(getConfigurationReltations() == CONFIGS_LINK_SETTINGS_AND_ACTIVE) if(getConfigurationRelations() == CONFIGS_LINK_SETTINGS_AND_ACTIVE)
fActiveCfgInfo.setConfiguration(cfg); fActiveCfgInfo.setConfiguration(cfg);
} }
@ -609,8 +609,8 @@ public class CProjectDescription implements ICProjectDescription, ICDataProxyCon
return fPrefs; return fPrefs;
} }
public int getConfigurationReltations() { public int getConfigurationRelations() {
return fPrefs.getConfigurationReltations(); return fPrefs.getConfigurationRelations();
} }
public boolean isDefaultConfigurationRelations() { public boolean isDefaultConfigurationRelations() {

View file

@ -76,7 +76,7 @@ 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.extension.CResourceData; import org.eclipse.cdt.core.settings.model.extension.CResourceData;
import org.eclipse.cdt.core.settings.model.extension.ICProjectConverter; import org.eclipse.cdt.core.settings.model.extension.ICProjectConverter;
import org.eclipse.cdt.core.settings.model.extension.impl.CDataFacroty; import org.eclipse.cdt.core.settings.model.extension.impl.CDataFactory;
import org.eclipse.cdt.core.settings.model.util.CDataUtil; import org.eclipse.cdt.core.settings.model.util.CDataUtil;
import org.eclipse.cdt.core.settings.model.util.CSettingEntryFactory; import org.eclipse.cdt.core.settings.model.util.CSettingEntryFactory;
import org.eclipse.cdt.core.settings.model.util.KindBasedStore; import org.eclipse.cdt.core.settings.model.util.KindBasedStore;
@ -609,7 +609,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
} }
private CProjectDescriptionEvent createLoaddedEvent(ICProjectDescription des){ private CProjectDescriptionEvent createLoaddedEvent(ICProjectDescription des){
return new CProjectDescriptionEvent(CProjectDescriptionEvent.LOADDED, return new CProjectDescriptionEvent(CProjectDescriptionEvent.LOADED,
null, null,
des, des,
null, null,
@ -3198,13 +3198,13 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
return fDescriptorManager; return fDescriptorManager;
} }
public CConfigurationData createDefaultConfigData(IProject project, CDataFacroty factory) throws CoreException{ public CConfigurationData createDefaultConfigData(IProject project, CDataFactory factory) throws CoreException{
return createDefaultConfigData(project, CDataUtil.genId(DEFAULT_CFG_ID_PREFIX), DEFAULT_CFG_NAME, factory); return createDefaultConfigData(project, CDataUtil.genId(DEFAULT_CFG_ID_PREFIX), DEFAULT_CFG_NAME, factory);
} }
public CConfigurationData createDefaultConfigData(IProject project, String id, String name, CDataFacroty factory) throws CoreException{ public CConfigurationData createDefaultConfigData(IProject project, String id, String name, CDataFactory factory) throws CoreException{
if(factory == null) if(factory == null)
factory = new CDataFacroty(); factory = new CDataFactory();
CConfigurationData data = CDataUtil.createEmptyData(id, name, factory, true); CConfigurationData data = CDataUtil.createEmptyData(id, name, factory, true);
// CDataUtil. // CDataUtil.
@ -3489,7 +3489,7 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
try { try {
do { do {
if(oldPrefs != prefs){ if(oldPrefs != prefs){
if(prefs.getConfigurationReltations() != oldPrefs.getConfigurationReltations()){ if(prefs.getConfigurationRelations() != oldPrefs.getConfigurationRelations()){
changed = true; changed = true;
break; break;
} }

View file

@ -55,12 +55,12 @@ public class CProjectDescriptionPreferences implements ICProjectDescriptionPrefe
CDataUtil.setInteger(el, ATTR_CONFIG_RELATIONS, fConfigRelations.intValue()); CDataUtil.setInteger(el, ATTR_CONFIG_RELATIONS, fConfigRelations.intValue());
} }
public int getConfigurationReltations() { public int getConfigurationRelations() {
if(fConfigRelations != null) if(fConfigRelations != null)
return fConfigRelations.intValue(); return fConfigRelations.intValue();
CProjectDescriptionPreferences superPrefs = getSuperPreferences(); CProjectDescriptionPreferences superPrefs = getSuperPreferences();
if(superPrefs != null) if(superPrefs != null)
return superPrefs.getConfigurationReltations(); return superPrefs.getConfigurationRelations();
return DEFAULT_RELATIONS; return DEFAULT_RELATIONS;
} }
@ -111,7 +111,7 @@ public class CProjectDescriptionPreferences implements ICProjectDescriptionPrefe
if(isDefaultConfigurationRelations() != other.isDefaultConfigurationRelations()) if(isDefaultConfigurationRelations() != other.isDefaultConfigurationRelations())
return false; return false;
if(getConfigurationReltations() != other.getConfigurationReltations()) if(getConfigurationRelations() != other.getConfigurationRelations())
return false; return false;
return true; return true;

View file

@ -52,7 +52,7 @@ public class CfgExportSettingContainerFactory extends
public void startup(){ public void startup(){
CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this,
CProjectDescriptionEvent.APPLIED CProjectDescriptionEvent.APPLIED
| CProjectDescriptionEvent.LOADDED); | CProjectDescriptionEvent.LOADED);
} }
@Override @Override
@ -194,7 +194,7 @@ public class CfgExportSettingContainerFactory extends
public void handleEvent(CProjectDescriptionEvent event) { public void handleEvent(CProjectDescriptionEvent event) {
switch(event.getEventType()){ switch(event.getEventType()){
case CProjectDescriptionEvent.LOADDED: case CProjectDescriptionEvent.LOADED:
case CProjectDescriptionEvent.APPLIED: case CProjectDescriptionEvent.APPLIED:
String[] ids = getContainerIds(event.getProjectDelta()); String[] ids = getContainerIds(event.getProjectDelta());
if(ids.length != 0){ if(ids.length != 0){

View file

@ -53,7 +53,7 @@ public class ConfigBasedPathEntryStore implements IPathEntryStore, ICProjectDesc
fProject = project; fProject = project;
fListeners = Collections.synchronizedList(new ArrayList()); fListeners = Collections.synchronizedList(new ArrayList());
CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADDED); CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADED);
} }
/* (non-Javadoc) /* (non-Javadoc)

View file

@ -53,7 +53,7 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP
DescriptionScannerInfoProvider(IProject project){ DescriptionScannerInfoProvider(IProject project){
fProject = project; fProject = project;
CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADDED); CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADED);
} }
private void updateProjCfgInfo(ICProjectDescription des){ private void updateProjCfgInfo(ICProjectDescription des){
@ -151,7 +151,7 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP
return macroEntries; return macroEntries;
} }
private IScannerInfo createProjectStannerInfo(){ private IScannerInfo createProjectScannerInfo(){
ICFolderDescription foDes = fCfgDes.getRootFolderDescription(); ICFolderDescription foDes = fCfgDes.getRootFolderDescription();
ICLanguageSetting[] lSettings = foDes.getLanguageSettings(); ICLanguageSetting[] lSettings = foDes.getLanguageSettings();
ICLanguageSettingPathEntry pathEntries[] = getPathEntries(lSettings, ICLanguageSettingEntry.INCLUDE_PATH); ICLanguageSettingPathEntry pathEntries[] = getPathEntries(lSettings, ICLanguageSettingEntry.INCLUDE_PATH);
@ -194,7 +194,7 @@ public class DescriptionScannerInfoProvider implements IScannerInfoProvider, ICP
private IScannerInfo createScannerInfo(ICLanguageSetting ls){ private IScannerInfo createScannerInfo(ICLanguageSetting ls){
if(ls == null) if(ls == null)
return createProjectStannerInfo(); return createProjectScannerInfo();
ICLanguageSettingPathEntry pathEntries[] = getPathEntries(ls, ICLanguageSettingEntry.INCLUDE_PATH); ICLanguageSettingPathEntry pathEntries[] = getPathEntries(ls, ICLanguageSettingEntry.INCLUDE_PATH);
String incs[] = getValues(pathEntries); String incs[] = getValues(pathEntries);

View file

@ -27,7 +27,7 @@ import org.eclipse.cdt.core.settings.model.extension.CFileData;
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.extension.CResourceData; import org.eclipse.cdt.core.settings.model.extension.CResourceData;
import org.eclipse.cdt.core.settings.model.extension.impl.CDataFacroty; import org.eclipse.cdt.core.settings.model.extension.impl.CDataFactory;
import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultConfigurationData; import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultConfigurationData;
import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultFileData; import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultFileData;
import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultFolderData; import org.eclipse.cdt.core.settings.model.extension.impl.CDefaultFolderData;
@ -50,7 +50,7 @@ public class PathEntryConfigurationDataProvider extends
private static PathEntryDataFactory fFactory; private static PathEntryDataFactory fFactory;
public static CDataFacroty getDataFactory(){ public static CDataFactory getDataFactory(){
if(fFactory == null){ if(fFactory == null){
fFactory = new PathEntryDataFactory(); fFactory = new PathEntryDataFactory();
} }
@ -74,7 +74,7 @@ public class PathEntryConfigurationDataProvider extends
// } // }
public PathEntryFolderData(String id, IPath path, PathEntryFolderData base, public PathEntryFolderData(String id, IPath path, PathEntryFolderData base,
CConfigurationData cfg, CDataFacroty factory, boolean clone) { CConfigurationData cfg, CDataFactory factory, boolean clone) {
super(id, path, cfg, factory); super(id, path, cfg, factory);
if(base != null) if(base != null)
@ -99,7 +99,7 @@ public class PathEntryConfigurationDataProvider extends
// } // }
public PathEntryFileData(String id, IPath path, PathEntryFileData base, public PathEntryFileData(String id, IPath path, PathEntryFileData base,
CConfigurationData cfg, CDataFacroty factory, boolean clone) { CConfigurationData cfg, CDataFactory factory, boolean clone) {
super(id, path, cfg, factory); super(id, path, cfg, factory);
fStore = new EntryStore(base.fStore, true); fStore = new EntryStore(base.fStore, true);
@ -109,7 +109,7 @@ public class PathEntryConfigurationDataProvider extends
public PathEntryFileData(String id, IPath path, PathEntryFolderData base, public PathEntryFileData(String id, IPath path, PathEntryFolderData base,
CLanguageData baseLangData, CConfigurationData cfg, CLanguageData baseLangData, CConfigurationData cfg,
CDataFacroty factory) { CDataFactory factory) {
super(id, path, cfg, factory); super(id, path, cfg, factory);
fStore = new EntryStore(base.fStore, true); fStore = new EntryStore(base.fStore, true);
@ -147,7 +147,7 @@ public class PathEntryConfigurationDataProvider extends
} }
private static class PathEntryDataFactory extends CDataFacroty { private static class PathEntryDataFactory extends CDataFactory {
@Override @Override
public CConfigurationData createConfigurationdata(String id, public CConfigurationData createConfigurationdata(String id,

View file

@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
* *
* @author jcamelon * @author jcamelon
*/ */
public interface ICPPASTVisiblityLabel extends IASTDeclaration { public interface ICPPASTVisibilityLabel extends IASTDeclaration {
/** /**
* <code>v_public</code> == public: * <code>v_public</code> == public:

View file

@ -25,11 +25,11 @@ public interface ICPPMember extends ICPPBinding{
*/ */
public int getVisibility() throws DOMException; public int getVisibility() throws DOMException;
public static final int v_private = ICPPASTVisiblityLabel.v_private; public static final int v_private = ICPPASTVisibilityLabel.v_private;
public static final int v_protected = ICPPASTVisiblityLabel.v_protected; public static final int v_protected = ICPPASTVisibilityLabel.v_protected;
public static final int v_public = ICPPASTVisiblityLabel.v_public; public static final int v_public = ICPPASTVisibilityLabel.v_public;
public ICPPClassType getClassOwner() throws DOMException; public ICPPClassType getClassOwner() throws DOMException;

View file

@ -66,7 +66,7 @@ public interface IIndex {
* You can use it to find the occurrences of a c++-function declared with 'extern "C"' within * You can use it to find the occurrences of a c++-function declared with 'extern "C"' within
* the c-linkage. * the c-linkage.
*/ */
final int SEARCH_ACCROSS_LANGUAGE_BOUNDARIES= 0x8; final int SEARCH_ACROSS_LANGUAGE_BOUNDARIES= 0x8;
/** /**
* Constant to search for all declarations including definitions. * Constant to search for all declarations including definitions.
*/ */
@ -74,7 +74,7 @@ public interface IIndex {
/** /**
* Constant to search for all occurrences of a binding. This includes declarations, definitions and references. * Constant to search for all occurrences of a binding. This includes declarations, definitions and references.
*/ */
final int FIND_ALL_OCCURENCES = FIND_DECLARATIONS | FIND_DEFINITIONS | FIND_REFERENCES; final int FIND_ALL_OCCURRENCES = FIND_DECLARATIONS | FIND_DEFINITIONS | FIND_REFERENCES;
/** /**
* Before making calls to an index you have to obtain a lock. The objects * Before making calls to an index you have to obtain a lock. The objects
@ -331,7 +331,7 @@ public interface IIndex {
* or definitions, or a combination of those. * or definitions, or a combination of those.
* @param binding a binding for which names are searched for * @param binding a binding for which names are searched for
* @param flags a combination of {@link #FIND_DECLARATIONS}, {@link #FIND_DEFINITIONS}, * @param flags a combination of {@link #FIND_DECLARATIONS}, {@link #FIND_DEFINITIONS},
* {@link #FIND_REFERENCES} and {@link #SEARCH_ACCROSS_LANGUAGE_BOUNDARIES}. * {@link #FIND_REFERENCES} and {@link #SEARCH_ACROSS_LANGUAGE_BOUNDARIES}.
* @return an array of names * @return an array of names
* @throws CoreException * @throws CoreException
*/ */

View file

@ -16,7 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.parser.util.ArrayUtil; import org.eclipse.cdt.core.parser.util.ArrayUtil;
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent; import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
@ -88,7 +88,7 @@ public class CPPASTCompositeTypeSpecifier extends CPPASTBaseDeclSpecifier
declarations = (IASTDeclaration[]) ArrayUtil.append( IASTDeclaration.class, declarations, decl ); declarations = (IASTDeclaration[]) ArrayUtil.append( IASTDeclaration.class, declarations, decl );
if(decl != null) { if(decl != null) {
decl.setParent(this); decl.setParent(this);
decl.setPropertyInParent(decl instanceof ICPPASTVisiblityLabel ? VISIBILITY_LABEL : MEMBER_DECLARATION); decl.setPropertyInParent(decl instanceof ICPPASTVisibilityLabel ? VISIBILITY_LABEL : MEMBER_DECLARATION);
} }
} }

View file

@ -11,12 +11,12 @@
package org.eclipse.cdt.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
import org.eclipse.cdt.core.dom.ast.ASTVisitor; import org.eclipse.cdt.core.dom.ast.ASTVisitor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
/** /**
* @author jcamelon * @author jcamelon
*/ */
public class CPPASTVisibilityLabel extends CPPASTNode implements ICPPASTVisiblityLabel { public class CPPASTVisibilityLabel extends CPPASTNode implements ICPPASTVisibilityLabel {
private int visibility; private int visibility;

View file

@ -22,7 +22,7 @@ import org.eclipse.cdt.core.dom.ast.ICompositeType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPField; import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
@ -100,15 +100,15 @@ public class CPPField extends CPPVariable implements ICPPField {
} }
public int getVisibility() throws DOMException { public int getVisibility() throws DOMException {
ICPPASTVisiblityLabel vis = null; ICPPASTVisibilityLabel vis = null;
IASTDeclaration decl = getPrimaryDeclaration(); IASTDeclaration decl = getPrimaryDeclaration();
if( decl != null ) { if( decl != null ) {
IASTCompositeTypeSpecifier cls = (IASTCompositeTypeSpecifier) decl.getParent(); IASTCompositeTypeSpecifier cls = (IASTCompositeTypeSpecifier) decl.getParent();
IASTDeclaration [] members = cls.getMembers(); IASTDeclaration [] members = cls.getMembers();
for( int i = 0; i < members.length; i++ ){ for( int i = 0; i < members.length; i++ ){
if( members[i] instanceof ICPPASTVisiblityLabel ) if( members[i] instanceof ICPPASTVisibilityLabel )
vis = (ICPPASTVisiblityLabel) members[i]; vis = (ICPPASTVisibilityLabel) members[i];
else if( members[i] == decl ) else if( members[i] == decl )
break; break;
} }
@ -116,10 +116,10 @@ public class CPPField extends CPPVariable implements ICPPField {
if( vis != null ){ if( vis != null ){
return vis.getVisibility(); return vis.getVisibility();
} else if( cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class ){ } else if( cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class ){
return ICPPASTVisiblityLabel.v_private; return ICPPASTVisibilityLabel.v_private;
} }
} }
return ICPPASTVisiblityLabel.v_public; return ICPPASTVisibilityLabel.v_public;
} }
public ICPPClassType getClassOwner() throws DOMException { public ICPPClassType getClassOwner() throws DOMException {

View file

@ -29,7 +29,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
@ -50,24 +50,24 @@ public class CPPImplicitMethod extends CPPImplicitFunction implements ICPPMethod
IASTDeclaration decl = getPrimaryDeclaration(); IASTDeclaration decl = getPrimaryDeclaration();
if( decl == null ) { if( decl == null ) {
//12.1-5, 12.8-10 Implicitl constructors and assignment operators are public //12.1-5, 12.8-10 Implicitl constructors and assignment operators are public
return ICPPASTVisiblityLabel.v_public; return ICPPASTVisibilityLabel.v_public;
} }
IASTCompositeTypeSpecifier cls = (IASTCompositeTypeSpecifier) decl.getParent(); IASTCompositeTypeSpecifier cls = (IASTCompositeTypeSpecifier) decl.getParent();
IASTDeclaration [] members = cls.getMembers(); IASTDeclaration [] members = cls.getMembers();
ICPPASTVisiblityLabel vis = null; ICPPASTVisibilityLabel vis = null;
for( int i = 0; i < members.length; i++ ){ for( int i = 0; i < members.length; i++ ){
if( members[i] instanceof ICPPASTVisiblityLabel ) if( members[i] instanceof ICPPASTVisibilityLabel )
vis = (ICPPASTVisiblityLabel) members[i]; vis = (ICPPASTVisibilityLabel) members[i];
else if( members[i] == decl ) else if( members[i] == decl )
break; break;
} }
if( vis != null ){ if( vis != null ){
return vis.getVisibility(); return vis.getVisibility();
} else if( cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class ){ } else if( cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class ){
return ICPPASTVisiblityLabel.v_private; return ICPPASTVisibilityLabel.v_private;
} }
return ICPPASTVisiblityLabel.v_public; return ICPPASTVisibilityLabel.v_public;
} }
public ICPPClassType getClassOwner() throws DOMException { public ICPPClassType getClassOwner() throws DOMException {

View file

@ -25,7 +25,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
@ -135,26 +135,26 @@ public class CPPMethod extends CPPFunction implements ICPPMethod {
if( scope instanceof ICPPClassScope ){ if( scope instanceof ICPPClassScope ){
ICPPClassType cls = ((ICPPClassScope)scope).getClassType(); ICPPClassType cls = ((ICPPClassScope)scope).getClassType();
if( cls != null ) if( cls != null )
return ( cls.getKey() == ICPPClassType.k_class ) ? ICPPASTVisiblityLabel.v_private : ICPPASTVisiblityLabel.v_public; return ( cls.getKey() == ICPPClassType.k_class ) ? ICPPASTVisibilityLabel.v_private : ICPPASTVisibilityLabel.v_public;
} }
return ICPPASTVisiblityLabel.v_private; return ICPPASTVisibilityLabel.v_private;
} }
IASTCompositeTypeSpecifier cls = (IASTCompositeTypeSpecifier) decl.getParent(); IASTCompositeTypeSpecifier cls = (IASTCompositeTypeSpecifier) decl.getParent();
IASTDeclaration [] members = cls.getMembers(); IASTDeclaration [] members = cls.getMembers();
ICPPASTVisiblityLabel vis = null; ICPPASTVisibilityLabel vis = null;
for( int i = 0; i < members.length; i++ ){ for( int i = 0; i < members.length; i++ ){
if( members[i] instanceof ICPPASTVisiblityLabel ) if( members[i] instanceof ICPPASTVisibilityLabel )
vis = (ICPPASTVisiblityLabel) members[i]; vis = (ICPPASTVisibilityLabel) members[i];
else if( members[i] == decl ) else if( members[i] == decl )
break; break;
} }
if( vis != null ){ if( vis != null ){
return vis.getVisibility(); return vis.getVisibility();
} else if( cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class ){ } else if( cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class ){
return ICPPASTVisiblityLabel.v_private; return ICPPASTVisibilityLabel.v_private;
} }
return ICPPASTVisiblityLabel.v_public; return ICPPASTVisibilityLabel.v_public;
} }
public ICPPClassType getClassOwner() throws DOMException { public ICPPClassType getClassOwner() throws DOMException {

View file

@ -25,7 +25,7 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod;
@ -101,25 +101,25 @@ public class CPPMethodTemplate extends CPPFunctionTemplate implements
if( decl == null ){ if( decl == null ){
ICPPClassType cls = getClassOwner(); ICPPClassType cls = getClassOwner();
if (cls != null) { if (cls != null) {
return ( cls.getKey() == ICPPClassType.k_class ) ? ICPPASTVisiblityLabel.v_private : ICPPASTVisiblityLabel.v_public; return ( cls.getKey() == ICPPClassType.k_class ) ? ICPPASTVisibilityLabel.v_private : ICPPASTVisibilityLabel.v_public;
} }
return ICPPASTVisiblityLabel.v_private; return ICPPASTVisibilityLabel.v_private;
} }
IASTCompositeTypeSpecifier cls = (IASTCompositeTypeSpecifier) decl.getParent(); IASTCompositeTypeSpecifier cls = (IASTCompositeTypeSpecifier) decl.getParent();
IASTDeclaration [] members = cls.getMembers(); IASTDeclaration [] members = cls.getMembers();
ICPPASTVisiblityLabel vis = null; ICPPASTVisibilityLabel vis = null;
for (IASTDeclaration member : members) { for (IASTDeclaration member : members) {
if( member instanceof ICPPASTVisiblityLabel ) if( member instanceof ICPPASTVisibilityLabel )
vis = (ICPPASTVisiblityLabel) member; vis = (ICPPASTVisibilityLabel) member;
else if( member == decl ) else if( member == decl )
break; break;
} }
if( vis != null ){ if( vis != null ){
return vis.getVisibility(); return vis.getVisibility();
} else if( cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class ){ } else if( cls.getKey() == ICPPASTCompositeTypeSpecifier.k_class ){
return ICPPASTVisiblityLabel.v_private; return ICPPASTVisibilityLabel.v_private;
} }
return ICPPASTVisiblityLabel.v_public; return ICPPASTVisibilityLabel.v_public;
} }
public ICPPClassType getClassOwner() throws DOMException { public ICPPClassType getClassOwner() throws DOMException {

View file

@ -118,7 +118,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypenameExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTWhileStatement; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTWhileStatement;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
import org.eclipse.cdt.core.dom.ast.gnu.IGNUASTCompoundStatementExpression; import org.eclipse.cdt.core.dom.ast.gnu.IGNUASTCompoundStatementExpression;
@ -3935,7 +3935,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
case IToken.t_private: { case IToken.t_private: {
IToken key = consume(); IToken key = consume();
int l = consume(IToken.tCOLON).getEndOffset(); int l = consume(IToken.tCOLON).getEndOffset();
ICPPASTVisiblityLabel label = createVisibilityLabel(); ICPPASTVisibilityLabel label = createVisibilityLabel();
((ASTNode) label).setOffsetAndLength(key.getOffset(), l - key.getOffset()); ((ASTNode) label).setOffsetAndLength(key.getOffset(), l - key.getOffset());
label.setVisibility(token2Visibility(key.getType())); label.setVisibility(token2Visibility(key.getType()));
astClassSpecifier.addMemberDeclaration(label); astClassSpecifier.addMemberDeclaration(label);
@ -3980,7 +3980,7 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
} }
protected ICPPASTVisiblityLabel createVisibilityLabel() { protected ICPPASTVisibilityLabel createVisibilityLabel() {
return new CPPASTVisibilityLabel(); return new CPPASTVisibilityLabel();
} }
@ -3988,11 +3988,11 @@ public class GNUCPPSourceParser extends AbstractGNUSourceCodeParser {
protected int token2Visibility(int type) { protected int token2Visibility(int type) {
switch (type) { switch (type) {
case IToken.t_public: case IToken.t_public:
return ICPPASTVisiblityLabel.v_public; return ICPPASTVisibilityLabel.v_public;
case IToken.t_protected: case IToken.t_protected:
return ICPPASTVisiblityLabel.v_protected; return ICPPASTVisibilityLabel.v_protected;
case IToken.t_private: case IToken.t_private:
return ICPPASTVisiblityLabel.v_private; return ICPPASTVisibilityLabel.v_private;
} }
return 0; return 0;
} }

View file

@ -32,7 +32,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation; import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation;
import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousDeclaration; import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguousDeclaration;
import org.eclipse.cdt.internal.core.dom.parser.IASTDeclarationAmbiguity; import org.eclipse.cdt.internal.core.dom.parser.IASTDeclarationAmbiguity;
@ -100,8 +100,8 @@ public class DeclarationWriter extends NodeWriter{
writeUsingDeclaration((ICPPASTUsingDeclaration) declaration); writeUsingDeclaration((ICPPASTUsingDeclaration) declaration);
} else if (declaration instanceof ICPPASTUsingDirective) { } else if (declaration instanceof ICPPASTUsingDirective) {
writeUsingDirective((ICPPASTUsingDirective) declaration); writeUsingDirective((ICPPASTUsingDirective) declaration);
} else if (declaration instanceof ICPPASTVisiblityLabel) { } else if (declaration instanceof ICPPASTVisibilityLabel) {
writeVisibilityLabel((ICPPASTVisiblityLabel) declaration); writeVisibilityLabel((ICPPASTVisibilityLabel) declaration);
} }
if(hasTrailingComments(declaration)) { if(hasTrailingComments(declaration)) {
@ -118,18 +118,18 @@ public class DeclarationWriter extends NodeWriter{
} }
} }
private void writeVisibilityLabel(ICPPASTVisiblityLabel visiblityLabel) { private void writeVisibilityLabel(ICPPASTVisibilityLabel visiblityLabel) {
scribe.decrementIndentationLevel(); scribe.decrementIndentationLevel();
switch (visiblityLabel.getVisibility()) { switch (visiblityLabel.getVisibility()) {
case ICPPASTVisiblityLabel.v_private: case ICPPASTVisibilityLabel.v_private:
scribe.print(PRIVATE); scribe.print(PRIVATE);
scribe.print(':'); scribe.print(':');
break; break;
case ICPPASTVisiblityLabel.v_protected: case ICPPASTVisibilityLabel.v_protected:
scribe.print(PROTECTED); scribe.print(PROTECTED);
scribe.print(':'); scribe.print(':');
break; break;
case ICPPASTVisiblityLabel.v_public: case ICPPASTVisibilityLabel.v_public:
scribe.print(PUBLIC); scribe.print(PUBLIC);
scribe.print(':'); scribe.print(':');
break; break;

View file

@ -173,7 +173,7 @@ public class CIndex implements IIndex {
} }
} }
// bug 192352, files can reside in multiple fragments, remove duplicates // bug 192352, files can reside in multiple fragments, remove duplicates
if (fragCount > 1 || (flags & IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES) != 0) { if (fragCount > 1 || (flags & IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES) != 0) {
HashMap<String, IIndexFile> fileMap= new HashMap<String, IIndexFile>(); HashMap<String, IIndexFile> fileMap= new HashMap<String, IIndexFile>();
for (Iterator<IIndexFragmentName> iterator = result.iterator(); iterator.hasNext();) { for (Iterator<IIndexFragmentName> iterator = result.iterator(); iterator.hasNext();) {
final IIndexFragmentName name = iterator.next(); final IIndexFragmentName name = iterator.next();

View file

@ -43,17 +43,17 @@ public interface IIndexFragment {
*/ */
final int FIND_REFERENCES = IIndex.FIND_REFERENCES; final int FIND_REFERENCES = IIndex.FIND_REFERENCES;
/** /**
* @see IIndex#SEARCH_ACCROSS_LANGUAGE_BOUNDARIES * @see IIndex#SEARCH_ACROSS_LANGUAGE_BOUNDARIES
*/ */
final int SEARCH_ACCROSS_LANGUAGE_BOUNDARIES= IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES; final int SEARCH_ACROSS_LANGUAGE_BOUNDARIES= IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES;
/** /**
* @see IIndex#FIND_DECLARATIONS_DEFINITIONS * @see IIndex#FIND_DECLARATIONS_DEFINITIONS
*/ */
final int FIND_DECLARATIONS_DEFINITIONS = IIndex.FIND_DECLARATIONS_DEFINITIONS; final int FIND_DECLARATIONS_DEFINITIONS = IIndex.FIND_DECLARATIONS_DEFINITIONS;
/** /**
* @see IIndex#FIND_ALL_OCCURENCES * @see IIndex#FIND_ALL_OCCURRENCES
*/ */
final int FIND_ALL_OCCURENCES = IIndex.FIND_ALL_OCCURENCES; final int FIND_ALL_OCCURRENCES = IIndex.FIND_ALL_OCCURRENCES;
/** /**
* Property key for the fragment ID. The fragment ID should uniquely identify the fragments usage within * Property key for the fragment ID. The fragment ID should uniquely identify the fragments usage within

View file

@ -747,7 +747,7 @@ public class PDOM extends PlatformObject implements IPDOM {
if (myBinding instanceof PDOMBinding) { if (myBinding instanceof PDOMBinding) {
PDOMBinding pdomBinding = (PDOMBinding) myBinding; PDOMBinding pdomBinding = (PDOMBinding) myBinding;
findNamesForMyBinding(pdomBinding, options, names); findNamesForMyBinding(pdomBinding, options, names);
if ((options & SEARCH_ACCROSS_LANGUAGE_BOUNDARIES) != 0) { if ((options & SEARCH_ACROSS_LANGUAGE_BOUNDARIES) != 0) {
PDOMBinding[] xlangBindings= getCrossLanguageBindings(binding); PDOMBinding[] xlangBindings= getCrossLanguageBindings(binding);
for (PDOMBinding xlangBinding : xlangBindings) { for (PDOMBinding xlangBinding : xlangBindings) {
findNamesForMyBinding(xlangBinding, options, names); findNamesForMyBinding(xlangBinding, options, names);
@ -757,7 +757,7 @@ public class PDOM extends PlatformObject implements IPDOM {
else if (myBinding instanceof PDOMMacroContainer) { else if (myBinding instanceof PDOMMacroContainer) {
final PDOMMacroContainer macroContainer = (PDOMMacroContainer) myBinding; final PDOMMacroContainer macroContainer = (PDOMMacroContainer) myBinding;
findNamesForMyBinding(macroContainer, options, names); findNamesForMyBinding(macroContainer, options, names);
if ((options & SEARCH_ACCROSS_LANGUAGE_BOUNDARIES) != 0) { if ((options & SEARCH_ACROSS_LANGUAGE_BOUNDARIES) != 0) {
PDOMMacroContainer[] xlangBindings= getCrossLanguageBindings(macroContainer); PDOMMacroContainer[] xlangBindings= getCrossLanguageBindings(macroContainer);
for (PDOMMacroContainer xlangBinding : xlangBindings) { for (PDOMMacroContainer xlangBinding : xlangBindings) {
findNamesForMyBinding(xlangBinding, options, names); findNamesForMyBinding(xlangBinding, options, names);

View file

@ -19,36 +19,36 @@ import org.eclipse.cdt.internal.core.envvar.EnvironmentVariableManager;
* *
* @since 3.0 * @since 3.0
*/ */
public class EnvirinmentVariable implements IEnvironmentVariable, Cloneable { public class EnvironmentVariable implements IEnvironmentVariable, Cloneable {
protected String fName; protected String fName;
protected String fValue; protected String fValue;
protected String fDelimiter; protected String fDelimiter;
protected int fOperation; protected int fOperation;
public EnvirinmentVariable(String name, String value, int op, String delimiter){ public EnvironmentVariable(String name, String value, int op, String delimiter){
fName = name; fName = name;
fOperation = op; fOperation = op;
fValue = value; fValue = value;
fDelimiter = delimiter; fDelimiter = delimiter;
} }
protected EnvirinmentVariable(){ protected EnvironmentVariable(){
} }
public EnvirinmentVariable(String name){ public EnvironmentVariable(String name){
this(name,null,ENVVAR_REPLACE,null); this(name,null,ENVVAR_REPLACE,null);
} }
public EnvirinmentVariable(String name, String value){ public EnvironmentVariable(String name, String value){
this(name,value,ENVVAR_REPLACE,null); this(name,value,ENVVAR_REPLACE,null);
} }
public EnvirinmentVariable(String name, String value, String delimiter){ public EnvironmentVariable(String name, String value, String delimiter){
this(name,value,ENVVAR_REPLACE,delimiter); this(name,value,ENVVAR_REPLACE,delimiter);
} }
public EnvirinmentVariable(IEnvironmentVariable var){ public EnvironmentVariable(IEnvironmentVariable var){
this(var.getName(),var.getValue(),var.getOperation(),var.getDelimiter()); this(var.getName(),var.getValue(),var.getOperation(),var.getDelimiter());
} }

View file

@ -418,7 +418,7 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
} }
}; };
CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(fDescriptionListener, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADDED | CProjectDescriptionEvent.DATA_APPLIED | CProjectDescriptionEvent.ABOUT_TO_APPLY); CProjectDescriptionManager.getInstance().addCProjectDescriptionListener(fDescriptionListener, CProjectDescriptionEvent.APPLIED | CProjectDescriptionEvent.LOADED | CProjectDescriptionEvent.DATA_APPLIED | CProjectDescriptionEvent.ABOUT_TO_APPLY);
} }
} }
@ -431,7 +431,7 @@ public class CConfigBasedDescriptorManager implements ICDescriptorManager {
private void doHandleEvent(CProjectDescriptionEvent event){ private void doHandleEvent(CProjectDescriptionEvent event){
try { try {
switch(event.getEventType()){ switch(event.getEventType()){
case CProjectDescriptionEvent.LOADDED:{ case CProjectDescriptionEvent.LOADED:{
CProjectDescription des = (CProjectDescription)event.getNewCProjectDescription(); CProjectDescription des = (CProjectDescription)event.getNewCProjectDescription();
CConfigBasedDescriptor dr = getLoaddedDescriptor(des); CConfigBasedDescriptor dr = getLoaddedDescriptor(des);
if(dr != null){ if(dr != null){

View file

@ -28,7 +28,7 @@ import org.eclipse.cdt.utils.envvar.EnvVarOperationProcessor;
* *
* @since 3.0 * @since 3.0
*/ */
public class BuildSustemEnvironmentSupplier implements public class BuildSystemEnvironmentSupplier implements
ICoreEnvironmentVariableSupplier { ICoreEnvironmentVariableSupplier {
/** /**

View file

@ -147,7 +147,7 @@ public class ContributedEnvironment implements IContributedEnvironment{
public String getOrigin(IEnvironmentVariable var) { public String getOrigin(IEnvironmentVariable var) {
if(var instanceof EnvVarDescriptor) { if(var instanceof EnvVarDescriptor) {
ICoreEnvironmentVariableSupplier sup = ((EnvVarDescriptor)var).getSupplier(); ICoreEnvironmentVariableSupplier sup = ((EnvVarDescriptor)var).getSupplier();
if (sup instanceof BuildSustemEnvironmentSupplier) if (sup instanceof BuildSystemEnvironmentSupplier)
return Messages.getString("ContributedEnvironment.0"); //$NON-NLS-1$ return Messages.getString("ContributedEnvironment.0"); //$NON-NLS-1$
if (sup instanceof EclipseEnvironmentSupplier) if (sup instanceof EclipseEnvironmentSupplier)
return Messages.getString("ContributedEnvironment.1"); //$NON-NLS-1$ return Messages.getString("ContributedEnvironment.1"); //$NON-NLS-1$

View file

@ -13,7 +13,7 @@ package org.eclipse.cdt.internal.core.envvar;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Properties; import java.util.Properties;
import org.eclipse.cdt.core.envvar.EnvirinmentVariable; import org.eclipse.cdt.core.envvar.EnvironmentVariable;
import org.eclipse.cdt.core.envvar.IEnvironmentVariable; import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
import org.eclipse.cdt.utils.spawner.EnvironmentReader; import org.eclipse.cdt.utils.spawner.EnvironmentReader;
@ -33,7 +33,7 @@ public class EclipseEnvironmentSupplier implements ICoreEnvironmentVariableSuppl
String value = EnvironmentReader.getEnvVar(name); String value = EnvironmentReader.getEnvVar(name);
if(value == null) if(value == null)
return null; return null;
return new EnvirinmentVariable(name,value,IEnvironmentVariable.ENVVAR_REPLACE,null); return new EnvironmentVariable(name,value,IEnvironmentVariable.ENVVAR_REPLACE,null);
} }
return null; return null;
} }
@ -52,7 +52,7 @@ public class EclipseEnvironmentSupplier implements ICoreEnvironmentVariableSuppl
for( int i = 0; i < variables.length ; i++){ for( int i = 0; i < variables.length ; i++){
String name = (String)en.nextElement(); String name = (String)en.nextElement();
String value = values.getProperty(name); String value = values.getProperty(name);
variables[i] = new EnvirinmentVariable(name,value,IEnvironmentVariable.ENVVAR_REPLACE,null); variables[i] = new EnvironmentVariable(name,value,IEnvironmentVariable.ENVVAR_REPLACE,null);
} }
return variables; return variables;
} }

View file

@ -17,7 +17,7 @@ import java.util.List;
import org.eclipse.cdt.core.cdtvariables.CdtVariableException; import org.eclipse.cdt.core.cdtvariables.CdtVariableException;
import org.eclipse.cdt.core.cdtvariables.ICdtVariable; import org.eclipse.cdt.core.cdtvariables.ICdtVariable;
import org.eclipse.cdt.core.envvar.EnvirinmentVariable; import org.eclipse.cdt.core.envvar.EnvironmentVariable;
import org.eclipse.cdt.core.envvar.IContributedEnvironment; import org.eclipse.cdt.core.envvar.IContributedEnvironment;
import org.eclipse.cdt.core.envvar.IEnvironmentVariable; import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
import org.eclipse.cdt.core.envvar.IEnvironmentVariableManager; import org.eclipse.cdt.core.envvar.IEnvironmentVariableManager;
@ -50,7 +50,7 @@ public class EnvironmentVariableManager implements
// private EnvVarVariableSubstitutor fVariableSubstitutor; // private EnvVarVariableSubstitutor fVariableSubstitutor;
public static final UserDefinedEnvironmentSupplier fUserSupplier = new UserDefinedEnvironmentSupplier(); public static final UserDefinedEnvironmentSupplier fUserSupplier = new UserDefinedEnvironmentSupplier();
public static final BuildSustemEnvironmentSupplier fExternalSupplier = new BuildSustemEnvironmentSupplier(); public static final BuildSystemEnvironmentSupplier fExternalSupplier = new BuildSystemEnvironmentSupplier();
public static final EclipseEnvironmentSupplier fEclipseSupplier = new EclipseEnvironmentSupplier(); public static final EclipseEnvironmentSupplier fEclipseSupplier = new EclipseEnvironmentSupplier();
private ContributedEnvironment fContributedEnvironment; private ContributedEnvironment fContributedEnvironment;
@ -81,7 +81,7 @@ public class EnvironmentVariableManager implements
int varSupplierNum = getVarMacroSupplierNum(var,varMacroInfo); int varSupplierNum = getVarMacroSupplierNum(var,varMacroInfo);
value = resolveToString(new MacroDescriptor(macro,varMacroInfo,varSupplierNum)); value = resolveToString(new MacroDescriptor(macro,varMacroInfo,varSupplierNum));
removeResolvedMacro(var.getName()); removeResolvedMacro(var.getName());
return new EnvirinmentVariable(var.getName(),value,var.getOperation(),var.getDelimiter()); return new EnvironmentVariable(var.getName(),value,var.getOperation(),var.getDelimiter());
} }
protected IVariableContextInfo getVarMacroContextInfo(EnvVarDescriptor var){ protected IVariableContextInfo getVarMacroContextInfo(EnvVarDescriptor var){
@ -384,7 +384,7 @@ public class EnvironmentVariableManager implements
var = ((EnvVarVariableSubstitutor)sub).resolveVariable(des); var = ((EnvVarVariableSubstitutor)sub).resolveVariable(des);
else if(des.getOperation() != IEnvironmentVariable.ENVVAR_REMOVE){ else if(des.getOperation() != IEnvironmentVariable.ENVVAR_REMOVE){
String name = des.getName(); String name = des.getName();
var = new EnvirinmentVariable(name,sub.resolveToString(name),des.getOperation(),des.getDelimiter()); var = new EnvironmentVariable(name,sub.resolveToString(name),des.getOperation(),des.getDelimiter());
} }
} catch (CdtVariableException e){ } catch (CdtVariableException e){
} }

View file

@ -124,7 +124,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplatedTypeTemplateParameter;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTryBlockStatement; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTryBlockStatement;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTWhileStatement; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTWhileStatement;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
import org.eclipse.cdt.core.dom.ast.gnu.c.ICASTKnRFunctionDeclarator; import org.eclipse.cdt.core.dom.ast.gnu.c.ICASTKnRFunctionDeclarator;
@ -328,8 +328,8 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
return visit((IASTSimpleDeclaration)node); return visit((IASTSimpleDeclaration)node);
} else if (node instanceof IASTASMDeclaration) { } else if (node instanceof IASTASMDeclaration) {
return visit((IASTASMDeclaration)node); return visit((IASTASMDeclaration)node);
} else if (node instanceof ICPPASTVisiblityLabel) { } else if (node instanceof ICPPASTVisibilityLabel) {
return visit((ICPPASTVisiblityLabel)node); return visit((ICPPASTVisibilityLabel)node);
} else if (node instanceof ICPPASTNamespaceDefinition) { } else if (node instanceof ICPPASTNamespaceDefinition) {
return visit((ICPPASTNamespaceDefinition)node); return visit((ICPPASTNamespaceDefinition)node);
} else if (node instanceof ICPPASTNamespaceAlias) { } else if (node instanceof ICPPASTNamespaceAlias) {
@ -754,8 +754,8 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
scribe.startNewLine(); scribe.startNewLine();
for (int i = 0; i < memberDecls.length; i++) { for (int i = 0; i < memberDecls.length; i++) {
IASTDeclaration declaration = memberDecls[i]; IASTDeclaration declaration = memberDecls[i];
if (declaration instanceof ICPPASTVisiblityLabel) { if (declaration instanceof ICPPASTVisibilityLabel) {
visit((ICPPASTVisiblityLabel)declaration); visit((ICPPASTVisibilityLabel)declaration);
} else { } else {
declaration.accept(this); declaration.accept(this);
} }
@ -791,8 +791,8 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
scribe.startNewLine(); scribe.startNewLine();
for (int i = 0; i < memberDecls.length; i++) { for (int i = 0; i < memberDecls.length; i++) {
IASTDeclaration declaration = memberDecls[i]; IASTDeclaration declaration = memberDecls[i];
if (declaration instanceof ICPPASTVisiblityLabel) { if (declaration instanceof ICPPASTVisibilityLabel) {
visit((ICPPASTVisiblityLabel)declaration); visit((ICPPASTVisibilityLabel)declaration);
} else { } else {
declaration.accept(this); declaration.accept(this);
} }
@ -1429,7 +1429,7 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
scribe.startNewLine(); scribe.startNewLine();
for (int i = 0; i < memberDecls.length; i++) { for (int i = 0; i < memberDecls.length; i++) {
IASTDeclaration declaration = memberDecls[i]; IASTDeclaration declaration = memberDecls[i];
if (declaration instanceof ICPPASTVisiblityLabel) { if (declaration instanceof ICPPASTVisibilityLabel) {
if (preferences.indent_body_declarations_compare_to_access_specifier) { if (preferences.indent_body_declarations_compare_to_access_specifier) {
scribe.indent(); scribe.indent();
} }
@ -1437,7 +1437,7 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
if (preferences.indent_body_declarations_compare_to_access_specifier) { if (preferences.indent_body_declarations_compare_to_access_specifier) {
scribe.unIndent(); scribe.unIndent();
} }
visit((ICPPASTVisiblityLabel)declaration); visit((ICPPASTVisibilityLabel)declaration);
} else { } else {
if (preferences.indent_body_declarations_compare_to_access_specifier) { if (preferences.indent_body_declarations_compare_to_access_specifier) {
scribe.indent(); scribe.indent();
@ -1467,18 +1467,18 @@ public class CodeFormatterVisitor extends CPPASTVisitor {
return PROCESS_SKIP; return PROCESS_SKIP;
} }
private int visit(ICPPASTVisiblityLabel node) { private int visit(ICPPASTVisibilityLabel node) {
if (node.getNodeLocations()[0] instanceof IASTMacroExpansionLocation) { if (node.getNodeLocations()[0] instanceof IASTMacroExpansionLocation) {
skipNode(node); skipNode(node);
} else { } else {
switch (node.getVisibility()) { switch (node.getVisibility()) {
case ICPPASTVisiblityLabel.v_private: case ICPPASTVisibilityLabel.v_private:
scribe.printNextToken(Token.t_private, false); scribe.printNextToken(Token.t_private, false);
break; break;
case ICPPASTVisiblityLabel.v_protected: case ICPPASTVisibilityLabel.v_protected:
scribe.printNextToken(Token.t_protected, false); scribe.printNextToken(Token.t_protected, false);
break; break;
case ICPPASTVisiblityLabel.v_public: case ICPPASTVisibilityLabel.v_public:
scribe.printNextToken(Token.t_public, false); scribe.printNextToken(Token.t_public, false);
break; break;
} }

View file

@ -14,7 +14,7 @@ import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.eclipse.cdt.core.envvar.EnvirinmentVariable; import org.eclipse.cdt.core.envvar.EnvironmentVariable;
import org.eclipse.cdt.core.envvar.IEnvironmentVariable; import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
import org.eclipse.cdt.internal.core.envvar.EnvironmentVariableManager; import org.eclipse.cdt.internal.core.envvar.EnvironmentVariableManager;
@ -47,24 +47,24 @@ public class EnvVarOperationProcessor {
switch(added.getOperation()){ switch(added.getOperation()){
case IEnvironmentVariable.ENVVAR_REMOVE: case IEnvironmentVariable.ENVVAR_REMOVE:
return new EnvirinmentVariable(name,null,IEnvironmentVariable.ENVVAR_REMOVE,null); return new EnvironmentVariable(name,null,IEnvironmentVariable.ENVVAR_REMOVE,null);
case IEnvironmentVariable.ENVVAR_APPEND:{ case IEnvironmentVariable.ENVVAR_APPEND:{
String delimiter = added.getDelimiter(); String delimiter = added.getDelimiter();
return new EnvirinmentVariable(name, return new EnvironmentVariable(name,
performAppend(initial.getValue(),added.getValue(),delimiter), performAppend(initial.getValue(),added.getValue(),delimiter),
// IEnvironmentVariable.ENVVAR_APPEND, // IEnvironmentVariable.ENVVAR_APPEND,
delimiter); delimiter);
} }
case IEnvironmentVariable.ENVVAR_PREPEND:{ case IEnvironmentVariable.ENVVAR_PREPEND:{
String delimiter = added.getDelimiter(); String delimiter = added.getDelimiter();
return new EnvirinmentVariable(name, return new EnvironmentVariable(name,
performPrepend(initial.getValue(),added.getValue(),delimiter), performPrepend(initial.getValue(),added.getValue(),delimiter),
// IEnvironmentVariable.ENVVAR_PREPEND, // IEnvironmentVariable.ENVVAR_PREPEND,
delimiter); delimiter);
} }
case IEnvironmentVariable.ENVVAR_REPLACE: case IEnvironmentVariable.ENVVAR_REPLACE:
default: default:
return new EnvirinmentVariable(added.getName(),added.getValue(),added.getDelimiter()); return new EnvironmentVariable(added.getName(),added.getValue(),added.getDelimiter());
} }
} }

View file

@ -10,7 +10,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.utils.envvar; package org.eclipse.cdt.utils.envvar;
import org.eclipse.cdt.core.envvar.EnvirinmentVariable; import org.eclipse.cdt.core.envvar.EnvironmentVariable;
import org.eclipse.cdt.core.settings.model.ICStorageElement; import org.eclipse.cdt.core.settings.model.ICStorageElement;
/** /**
@ -20,7 +20,7 @@ import org.eclipse.cdt.core.settings.model.ICStorageElement;
* @since 3.0 * @since 3.0
* *
*/ */
public class StorableEnvVar extends EnvirinmentVariable { public class StorableEnvVar extends EnvironmentVariable {
public static final String VARIABLE_ELEMENT_NAME = "variable"; //$NON-NLS-1$ public static final String VARIABLE_ELEMENT_NAME = "variable"; //$NON-NLS-1$
public static final String NAME = "name"; //$NON-NLS-1$ public static final String NAME = "name"; //$NON-NLS-1$
public static final String VALUE = "value"; //$NON-NLS-1$ public static final String VALUE = "value"; //$NON-NLS-1$

View file

@ -193,7 +193,7 @@ public class CHQueries {
private static void findCalledBy(IIndex index, IBinding callee, boolean includeOrdinaryCalls, ICProject project, CalledByResult result) private static void findCalledBy(IIndex index, IBinding callee, boolean includeOrdinaryCalls, ICProject project, CalledByResult result)
throws CoreException { throws CoreException {
IIndexName[] names= index.findNames(callee, IIndex.FIND_REFERENCES | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); IIndexName[] names= index.findNames(callee, IIndex.FIND_REFERENCES | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
for (IIndexName rname : names) { for (IIndexName rname : names) {
if (includeOrdinaryCalls || rname.couldBePolymorphicMethodCall()) { if (includeOrdinaryCalls || rname.couldBePolymorphicMethodCall()) {
IIndexName caller= rname.getEnclosingDefinition(); IIndexName caller= rname.getEnclosingDefinition();

View file

@ -45,7 +45,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateSpecialization;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.internal.core.model.ASTStringUtil; import org.eclipse.cdt.internal.core.model.ASTStringUtil;
@ -257,7 +257,7 @@ class CStructureCreatorVisitor extends CPPASTVisitor {
} }
} else if (node instanceof IASTASMDeclaration) { } else if (node instanceof IASTASMDeclaration) {
// ignored // ignored
} else if (node instanceof ICPPASTVisiblityLabel) { } else if (node instanceof ICPPASTVisibilityLabel) {
// ignored // ignored
} else if (node instanceof ICPPASTNamespaceDefinition) { } else if (node instanceof ICPPASTNamespaceDefinition) {
// handled below // handled below
@ -387,7 +387,7 @@ class CStructureCreatorVisitor extends CPPASTVisitor {
} }
} else if (node instanceof IASTASMDeclaration) { } else if (node instanceof IASTASMDeclaration) {
// ignored // ignored
} else if (node instanceof ICPPASTVisiblityLabel) { } else if (node instanceof ICPPASTVisibilityLabel) {
// ignored // ignored
} else if (node instanceof ICPPASTNamespaceDefinition) { } else if (node instanceof ICPPASTNamespaceDefinition) {
// handled below // handled below

View file

@ -1890,7 +1890,7 @@ public class SemanticHighlightings {
else if (!(binding instanceof ICExternalBinding)) { else if (!(binding instanceof ICExternalBinding)) {
return false; return false;
} }
IIndexName[] decls= index.findNames(binding, IIndex.FIND_DECLARATIONS | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); IIndexName[] decls= index.findNames(binding, IIndex.FIND_DECLARATIONS | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
for (IIndexName decl : decls) { for (IIndexName decl : decls) {
IIndexFile indexFile= decl.getFile(); IIndexFile indexFile= decl.getFile();
if (indexFile != null && indexFile.getLocation().getFullPath() != null) { if (indexFile != null && indexFile.getLocation().getFullPath() != null) {

View file

@ -134,9 +134,9 @@ public class ToggleSourceAndHeaderAction extends TextEditorAction {
final IIndexName[] partnerNames; final IIndexName[] partnerNames;
try { try {
if (isDefinition) { if (isDefinition) {
partnerNames= fIndex.findNames(binding, IIndex.FIND_DECLARATIONS | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); partnerNames= fIndex.findNames(binding, IIndex.FIND_DECLARATIONS | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
} else { } else {
partnerNames= fIndex.findNames(binding, IIndex.FIND_DEFINITIONS | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); partnerNames= fIndex.findNames(binding, IIndex.FIND_DEFINITIONS | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
} }
if (partnerNames.length == 0) { if (partnerNames.length == 0) {
++fSuspect; ++fSuspect;

View file

@ -98,7 +98,7 @@ public class IndexerStrategyBlock extends AbstractCOptionPage {
ICProjectDescriptionManager prjDescMgr= CCorePlugin.getDefault().getProjectDescriptionManager(); ICProjectDescriptionManager prjDescMgr= CCorePlugin.getDefault().getProjectDescriptionManager();
ICProjectDescriptionWorkspacePreferences prefs= prjDescMgr.getProjectDescriptionWorkspacePreferences(false); ICProjectDescriptionWorkspacePreferences prefs= prjDescMgr.getProjectDescriptionWorkspacePreferences(false);
boolean useActive= prefs.getConfigurationReltations() == ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE; boolean useActive= prefs.getConfigurationRelations() == ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE;
fUseActiveBuildButton.setSelection(useActive); fUseActiveBuildButton.setSelection(useActive);
fUseFixedBuildConfig.setSelection(!useActive); fUseFixedBuildConfig.setSelection(!useActive);

View file

@ -20,7 +20,7 @@ import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration; import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.rewrite.ASTRewrite; import org.eclipse.cdt.core.dom.rewrite.ASTRewrite;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTVisibilityLabel; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTVisibilityLabel;
@ -66,8 +66,8 @@ public class AddDeclarationNodeToClassChange {
for(int i = 0; i < members.length; i++) { for(int i = 0; i < members.length; i++) {
IASTDeclaration declaration = members[i]; IASTDeclaration declaration = members[i];
if(declaration instanceof ICPPASTVisiblityLabel){ if(declaration instanceof ICPPASTVisibilityLabel){
currentVisibility = VisibilityEnum.from((ICPPASTVisiblityLabel) declaration); currentVisibility = VisibilityEnum.from((ICPPASTVisibilityLabel) declaration);
} }
if (declaration instanceof IASTSimpleDeclaration) { if (declaration instanceof IASTSimpleDeclaration) {
@ -127,7 +127,7 @@ public class AddDeclarationNodeToClassChange {
ASTRewrite rewrite = collector.rewriterForTranslationUnit(nodeClass.getTranslationUnit()); ASTRewrite rewrite = collector.rewriterForTranslationUnit(nodeClass.getTranslationUnit());
if(! currentVisibility.equals(visibility)) { if(! currentVisibility.equals(visibility)) {
ICPPASTVisiblityLabel label = new CPPASTVisibilityLabel(visibility.getICPPASTVisiblityLabelVisibility()); ICPPASTVisibilityLabel label = new CPPASTVisibilityLabel(visibility.getICPPASTVisiblityLabelVisibility());
rewrite.insertBefore(nodeClass, null, label, createEditDescription()); rewrite.insertBefore(nodeClass, null, label, createEditDescription());
} }

View file

@ -19,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IScope;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
@ -65,8 +65,8 @@ public class MethodContext {
return null; return null;
} }
public ICPPASTVisiblityLabel getMethodDeclarationASTVisibility(){ public ICPPASTVisibilityLabel getMethodDeclarationASTVisibility(){
ICPPASTVisiblityLabel label = new CPPASTVisibilityLabel(); ICPPASTVisibilityLabel label = new CPPASTVisibilityLabel();
ICPPMember member = ((ICPPMember)qname.resolveBinding()); ICPPMember member = ((ICPPMember)qname.resolveBinding());
try { try {

View file

@ -13,7 +13,7 @@ package org.eclipse.cdt.internal.ui.refactoring;
import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.DOMException;
import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember;
/** /**
@ -64,11 +64,11 @@ public class Visibility {
ICPPMember member = ((ICPPMember)name.resolveBinding()); ICPPMember member = ((ICPPMember)name.resolveBinding());
switch (member.getVisibility()){ switch (member.getVisibility()){
case ICPPASTVisiblityLabel.v_public: case ICPPASTVisibilityLabel.v_public:
return PUBLIC; return PUBLIC;
case ICPPASTVisiblityLabel.v_protected: case ICPPASTVisibilityLabel.v_protected:
return PROTECTED; return PROTECTED;
case ICPPASTVisiblityLabel.v_private: case ICPPASTVisibilityLabel.v_private:
return PRIVATE; return PRIVATE;
default: default:
return UNKNOWN; return UNKNOWN;

View file

@ -56,7 +56,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTSimpleTypeConstructorExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypenameExpression; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTypenameExpression;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTDeclSpecifier;
import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation; import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation;
import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer; import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer;
@ -258,9 +258,9 @@ public class TrailNodeEqualityChecker implements EqualityChecker<IASTNode> {
ICPPASTUsingDeclaration using = (ICPPASTUsingDeclaration) node; ICPPASTUsingDeclaration using = (ICPPASTUsingDeclaration) node;
return trailUsing.isTypename() == using.isTypename(); return trailUsing.isTypename() == using.isTypename();
} else if (trailNode instanceof ICPPASTVisiblityLabel) { } else if (trailNode instanceof ICPPASTVisibilityLabel) {
ICPPASTVisiblityLabel trailVisibility = (ICPPASTVisiblityLabel) trailNode; ICPPASTVisibilityLabel trailVisibility = (ICPPASTVisibilityLabel) trailNode;
ICPPASTVisiblityLabel visibility = (ICPPASTVisiblityLabel) node; ICPPASTVisibilityLabel visibility = (ICPPASTVisibilityLabel) node;
return trailVisibility.getVisibility() == visibility.getVisibility(); return trailVisibility.getVisibility() == visibility.getVisibility();
} else { } else {

View file

@ -11,7 +11,7 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.ui.refactoring.utils; package org.eclipse.cdt.internal.ui.refactoring.utils;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisiblityLabel; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTVisibilityLabel;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier;
/** /**
@ -31,13 +31,13 @@ public enum VisibilityEnum {
this.stringRepresentation = stringRepresentation; this.stringRepresentation = stringRepresentation;
} }
public static VisibilityEnum from(ICPPASTVisiblityLabel visibility) { public static VisibilityEnum from(ICPPASTVisibilityLabel visibility) {
switch(visibility.getVisibility()){ switch(visibility.getVisibility()){
case ICPPASTVisiblityLabel.v_private: case ICPPASTVisibilityLabel.v_private:
return VisibilityEnum.v_private; return VisibilityEnum.v_private;
case ICPPASTVisiblityLabel.v_protected: case ICPPASTVisibilityLabel.v_protected:
return VisibilityEnum.v_protected; return VisibilityEnum.v_protected;
case ICPPASTVisiblityLabel.v_public: case ICPPASTVisibilityLabel.v_public:
return VisibilityEnum.v_public; return VisibilityEnum.v_public;
} }
return null; return null;
@ -58,11 +58,11 @@ public enum VisibilityEnum {
public int getICPPASTVisiblityLabelVisibility() { public int getICPPASTVisiblityLabelVisibility() {
switch (this) { switch (this) {
case v_private: case v_private:
return ICPPASTVisiblityLabel.v_private; return ICPPASTVisibilityLabel.v_private;
case v_protected: case v_protected:
return ICPPASTVisiblityLabel.v_protected; return ICPPASTVisibilityLabel.v_protected;
case v_public: case v_public:
return ICPPASTVisiblityLabel.v_public; return ICPPASTVisibilityLabel.v_public;
} }
return 0; return 0;
} }

View file

@ -34,7 +34,7 @@ public class PDOMSearchElementQuery extends PDOMSearchQuery {
private ISourceReference element; private ISourceReference element;
public PDOMSearchElementQuery(ICElement[] scope, ISourceReference element, int flags) { public PDOMSearchElementQuery(ICElement[] scope, ISourceReference element, int flags) {
super(scope, flags | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); super(scope, flags | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
this.element = element; this.element = element;
} }

View file

@ -44,7 +44,7 @@ public class PDOMSearchTextSelectionQuery extends PDOMSearchQuery {
private String searchText; private String searchText;
public PDOMSearchTextSelectionQuery(ICElement[] scope, ITranslationUnit tu, ITextSelection selection, int flags) { public PDOMSearchTextSelectionQuery(ICElement[] scope, ITranslationUnit tu, ITextSelection selection, int flags) {
super(scope, flags | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); super(scope, flags | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
this.tu = tu; this.tu = tu;
this.selection = selection; this.selection = selection;
this.searchText= selection.getText(); this.searchText= selection.getText();

View file

@ -398,7 +398,7 @@ public class OpenDeclarationsAction extends SelectionParseAction implements ASTR
} }
// 2. Try definition in index // 2. Try definition in index
return index.findNames(binding, IIndex.FIND_DEFINITIONS | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); return index.findNames(binding, IIndex.FIND_DEFINITIONS | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
} }
private IName[] findDeclarations(IIndex index, IASTTranslationUnit ast, private IName[] findDeclarations(IIndex index, IASTTranslationUnit ast,
@ -411,7 +411,7 @@ public class OpenDeclarationsAction extends SelectionParseAction implements ASTR
} }
declNames= (IName[]) ArrayUtil.removeNulls(IName.class, declNames); declNames= (IName[]) ArrayUtil.removeNulls(IName.class, declNames);
if (declNames.length == 0) { if (declNames.length == 0) {
declNames= index.findNames(binding, IIndex.FIND_DECLARATIONS | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); declNames= index.findNames(binding, IIndex.FIND_DECLARATIONS | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
} }
return declNames; return declNames;
} }

View file

@ -554,7 +554,7 @@ public class CSourceHover extends AbstractCEditorTextHover {
IName[] declNames= ast.getDefinitionsInAST(binding); IName[] declNames= ast.getDefinitionsInAST(binding);
if (declNames.length == 0 && ast.getIndex() != null) { if (declNames.length == 0 && ast.getIndex() != null) {
// search definitions in index // search definitions in index
declNames = ast.getIndex().findNames(binding, IIndex.FIND_DEFINITIONS | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); declNames = ast.getIndex().findNames(binding, IIndex.FIND_DEFINITIONS | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
} }
return declNames; return declNames;
} }
@ -572,7 +572,7 @@ public class CSourceHover extends AbstractCEditorTextHover {
IName[] declNames= ast.getDeclarationsInAST(binding); IName[] declNames= ast.getDeclarationsInAST(binding);
if (declNames.length == 0 && ast.getIndex() != null) { if (declNames.length == 0 && ast.getIndex() != null) {
// search declarations in index // search declarations in index
declNames= ast.getIndex().findNames(binding, IIndex.FIND_DECLARATIONS | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); declNames= ast.getIndex().findNames(binding, IIndex.FIND_DECLARATIONS | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
} }
return declNames; return declNames;
} }

View file

@ -263,7 +263,7 @@ public class IndexUI {
public static ICElementHandle[] findAllDefinitions(IIndex index, IBinding binding) throws CoreException { public static ICElementHandle[] findAllDefinitions(IIndex index, IBinding binding) throws CoreException {
if (binding != null) { if (binding != null) {
IIndexName[] defs= index.findNames(binding, IIndex.FIND_DEFINITIONS | IIndex.SEARCH_ACCROSS_LANGUAGE_BOUNDARIES); IIndexName[] defs= index.findNames(binding, IIndex.FIND_DEFINITIONS | IIndex.SEARCH_ACROSS_LANGUAGE_BOUNDARIES);
ArrayList<ICElementHandle> result= new ArrayList<ICElementHandle>(); ArrayList<ICElementHandle> result= new ArrayList<ICElementHandle>();
for (int i = 0; i < defs.length; i++) { for (int i = 0; i < defs.length; i++) {

View file

@ -224,7 +224,7 @@ public class IndexerBlock extends AbstractCOptionPage {
if (scope == IndexerPreferences.SCOPE_INSTANCE) { if (scope == IndexerPreferences.SCOPE_INSTANCE) {
ICProjectDescriptionManager prjDescMgr= CCorePlugin.getDefault().getProjectDescriptionManager(); ICProjectDescriptionManager prjDescMgr= CCorePlugin.getDefault().getProjectDescriptionManager();
ICProjectDescriptionWorkspacePreferences prefs= prjDescMgr.getProjectDescriptionWorkspacePreferences(false); ICProjectDescriptionWorkspacePreferences prefs= prjDescMgr.getProjectDescriptionWorkspacePreferences(false);
boolean useActive= prefs.getConfigurationReltations() == ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE; boolean useActive= prefs.getConfigurationRelations() == ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE;
setUseActiveBuildConfig(useActive); setUseActiveBuildConfig(useActive);
} }
} }
@ -302,7 +302,7 @@ public class IndexerBlock extends AbstractCOptionPage {
if (fBuildConfigComboBox != null) { if (fBuildConfigComboBox != null) {
ICProjectDescriptionManager prjDescMgr= CCorePlugin.getDefault().getProjectDescriptionManager(); ICProjectDescriptionManager prjDescMgr= CCorePlugin.getDefault().getProjectDescriptionManager();
ICProjectDescription prefs= prjDescMgr.getProjectDescription(getProject(), false); ICProjectDescription prefs= prjDescMgr.getProjectDescription(getProject(), false);
setUseActiveBuildConfig(prefs.getConfigurationReltations() == ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE); setUseActiveBuildConfig(prefs.getConfigurationRelations() == ICProjectDescriptionPreferences.CONFIGS_LINK_SETTINGS_AND_ACTIVE);
ICConfigurationDescription[] configs= prefs.getConfigurations(); ICConfigurationDescription[] configs= prefs.getConfigurations();
String[] names= new String[configs.length]; String[] names= new String[configs.length];
for (int i = 0; i < configs.length; i++) { for (int i = 0; i < configs.length; i++) {

View file

@ -282,7 +282,7 @@ implements IExecutableExtension, IWizardWithMemory
@Override @Override
public boolean canFinish() { public boolean canFinish() {
if (fMainPage.h_selected != null) { if (fMainPage.h_selected != null) {
if(!fMainPage.h_selected.canFinich()) if(!fMainPage.h_selected.canFinish())
return false; return false;
String s = fMainPage.h_selected.getErrorMessage(); String s = fMainPage.h_selected.getErrorMessage();
if (s != null) return false; if (s != null) return false;

View file

@ -197,7 +197,7 @@ public class CWizardHandler implements Cloneable {
*/ */
public void initialize(EntryDescriptor data) throws CoreException {} public void initialize(EntryDescriptor data) throws CoreException {}
public boolean canFinich() {return true;} public boolean canFinish() {return true;}
@Override @Override
public Object clone() { public Object clone() {

View file

@ -41,7 +41,7 @@ public class StandardExecutableProvider implements IResourceChangeListener, ICPr
public StandardExecutableProvider() { public StandardExecutableProvider() {
ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE);
CoreModel.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(this, CoreModel.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(this,
CProjectDescriptionEvent.DATA_APPLIED | CProjectDescriptionEvent.LOADDED); CProjectDescriptionEvent.DATA_APPLIED | CProjectDescriptionEvent.LOADED);
} }
public void resourceChanged(IResourceChangeEvent event) { public void resourceChanged(IResourceChangeEvent event) {