1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 01:35:39 +02:00

Fixed typos.

This commit is contained in:
Sergey Prigogin 2011-12-05 19:48:09 -08:00
parent b140bf8ba6
commit 693a79de5e
6 changed files with 23 additions and 23 deletions

View file

@ -337,9 +337,9 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
if (parentConfig != null) { if (parentConfig != null) {
name = parentConfig.getName(); name = parentConfig.getName();
// If this contructor is called to clone an existing // If this constructor is called to clone an existing
// configuration, the parent of the parent should be stored. // configuration, the parent of the parent should be stored.
// As of 2.1, there is still one single level of inheritence to // As of 2.1, there is still one single level of inheritance to
// worry about // worry about
parent = parentConfig.getParent() == null ? parentConfig : parentConfig.getParent(); parent = parentConfig.getParent() == null ? parentConfig : parentConfig.getParent();
} }
@ -485,7 +485,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
// if(!baseCfg.isExtensionConfig) // if(!baseCfg.isExtensionConfig)
// cloneChildren = true; // cloneChildren = true;
// If this contructor is called to clone an existing // If this constructor is called to clone an existing
// configuration, the parent of the cloning config should be stored. // configuration, the parent of the cloning config should be stored.
parent = baseCfg.isExtensionConfig || baseCfg.getParent() == null ? baseCfg : baseCfg.getParent(); parent = baseCfg.isExtensionConfig || baseCfg.getParent() == null ? baseCfg : baseCfg.getParent();
@ -633,7 +633,7 @@ public class Configuration extends BuildObject implements IConfiguration, IBuild
if(!cloneConfig.isExtensionConfig) if(!cloneConfig.isExtensionConfig)
cloneChildren = true; cloneChildren = true;
// If this contructor is called to clone an existing // If this constructor is called to clone an existing
// configuration, the parent of the cloning config should be stored. // configuration, the parent of the cloning config should be stored.
parent = cloneConfig.isExtensionConfig || cloneConfig.getParent() == null ? cloneConfig : cloneConfig.getParent(); parent = cloneConfig.isExtensionConfig || cloneConfig.getParent() == null ? cloneConfig : cloneConfig.getParent();
parentId = parent.getId(); parentId = parent.getId();

View file

@ -98,8 +98,8 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
public int visit(IASTExpression expression) { public int visit(IASTExpression expression) {
if (!constructorsStack.empty() && expression instanceof IASTFunctionCallExpression) { if (!constructorsStack.empty() && expression instanceof IASTFunctionCallExpression) {
Set<IField> actualContructorFields = constructorsStack.peek(); Set<IField> actualConstructorFields = constructorsStack.peek();
if (!actualContructorFields.isEmpty()) { if (!actualConstructorFields.isEmpty()) {
boolean skipCurrentConstructor = false; boolean skipCurrentConstructor = false;
IASTFunctionCallExpression fCall = (IASTFunctionCallExpression)expression; IASTFunctionCallExpression fCall = (IASTFunctionCallExpression)expression;
IASTExpression fNameExp = fCall.getFunctionNameExpression(); IASTExpression fNameExp = fCall.getFunctionNameExpression();
@ -108,7 +108,7 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
IBinding fBinding = fName.getName().resolveBinding(); IBinding fBinding = fName.getName().resolveBinding();
if (fBinding instanceof ICPPMethod) { if (fBinding instanceof ICPPMethod) {
ICPPMethod method = (ICPPMethod)fBinding; ICPPMethod method = (ICPPMethod)fBinding;
ICompositeType constructorOwner = actualContructorFields.iterator().next().getCompositeTypeOwner(); ICompositeType constructorOwner = actualConstructorFields.iterator().next().getCompositeTypeOwner();
if (constructorOwner == method.getClassOwner() && !method.getType().isConst()) { if (constructorOwner == method.getClassOwner() && !method.getType().isConst()) {
skipCurrentConstructor = true; skipCurrentConstructor = true;
} }
@ -152,12 +152,12 @@ public class ClassMembersInitializationChecker extends AbstractIndexAstChecker {
public int visit(IASTName name) { public int visit(IASTName name) {
if (!constructorsStack.empty()) { if (!constructorsStack.empty()) {
Set<IField> actualContructorFields = constructorsStack.peek(); Set<IField> actualConstructorFields = constructorsStack.peek();
if (!actualContructorFields.isEmpty()) { if (!actualConstructorFields.isEmpty()) {
IBinding binding = name.resolveBinding(); IBinding binding = name.resolveBinding();
if (actualContructorFields.contains(binding)) { if (actualConstructorFields.contains(binding)) {
if ((CPPVariableReadWriteFlags.getReadWriteFlags(name) & PDOMName.WRITE_ACCESS) != 0) { if ((CPPVariableReadWriteFlags.getReadWriteFlags(name) & PDOMName.WRITE_ACCESS) != 0) {
actualContructorFields.remove(binding); actualConstructorFields.remove(binding);
} }
} }
} }

View file

@ -53,7 +53,7 @@ public class ClassMembersInitializationCheckerTest extends CheckerTestCase {
// int m; // int m;
// C() { m = 0; } // No warnings. // C() { m = 0; } // No warnings.
// }; // };
public void testAssignmentsInContructorShouldBeChecked() { public void testAssignmentsInConstructorShouldBeChecked() {
loadCodeAndRun(getAboveComment()); loadCodeAndRun(getAboveComment());
checkNoErrors(); checkNoErrors();
} }
@ -171,7 +171,7 @@ public class ClassMembersInitializationCheckerTest extends CheckerTestCase {
// int i1, i2; // int i1, i2;
// }; // };
// C::C() : i1(0) {} // 1 warning for: i2. // C::C() : i1(0) {} // 1 warning for: i2.
public void testExternalContructorHandling() { public void testExternalConstructorHandling() {
loadCodeAndRun(getAboveComment()); loadCodeAndRun(getAboveComment());
checkErrorLines(5); checkErrorLines(5);
} }
@ -184,7 +184,7 @@ public class ClassMembersInitializationCheckerTest extends CheckerTestCase {
// T2 t2; // T2 t2;
// }; // };
// C::C() : i1(0), t1(T1()) {} // 1 warning for: i2. // C::C() : i1(0), t1(T1()) {} // 1 warning for: i2.
public void testExternalContructorOfTemplateClassHandling() { public void testExternalConstructorOfTemplateClassHandling() {
loadCodeAndRun(getAboveComment()); loadCodeAndRun(getAboveComment());
checkErrorLines(8); checkErrorLines(8);
} }
@ -196,7 +196,7 @@ public class ClassMembersInitializationCheckerTest extends CheckerTestCase {
// }; // };
// template <typename T> // template <typename T>
// C::C() : i1(0) {} // 1 warning for: i2. // C::C() : i1(0) {} // 1 warning for: i2.
public void testExternalTemplateContructorHandling() { public void testExternalTemplateConstructorHandling() {
loadCodeAndRun(getAboveComment()); loadCodeAndRun(getAboveComment());
checkErrorLines(7); checkErrorLines(7);
} }
@ -212,7 +212,7 @@ public class ClassMembersInitializationCheckerTest extends CheckerTestCase {
// template <typename T1, typename T2> // template <typename T1, typename T2>
// template <typename T> // template <typename T>
// C<T1,T2>::C() : i1(0), t1(T1()) {} // 1 warning for: i2. // C<T1,T2>::C() : i1(0), t1(T1()) {} // 1 warning for: i2.
public void testExternalTemplateContructorOfTemplateClassHandling() { public void testExternalTemplateConstructorOfTemplateClassHandling() {
loadCodeAndRun(getAboveComment()); loadCodeAndRun(getAboveComment());
checkErrorLines(11); checkErrorLines(11);
} }

View file

@ -122,7 +122,7 @@ public class ReturnCheckerTest extends CheckerTestCase {
// return; // return;
// } // }
// }; // };
public void testContructorRetValue() { public void testConstructorRetValue() {
loadCodeAndRunCpp(getAboveComment()); loadCodeAndRunCpp(getAboveComment());
checkErrorLine(3, ReturnChecker.RET_ERR_VALUE_ID); checkErrorLine(3, ReturnChecker.RET_ERR_VALUE_ID);
} }
@ -136,7 +136,7 @@ public class ReturnCheckerTest extends CheckerTestCase {
// return; // return;
// } // }
// }; // };
public void testContructor_Bug323602() { public void testConstructor_Bug323602() {
IProblemPreference macro = getPreference(ReturnChecker.RET_NO_VALUE_ID, ReturnChecker.PARAM_IMPLICIT); IProblemPreference macro = getPreference(ReturnChecker.RET_NO_VALUE_ID, ReturnChecker.PARAM_IMPLICIT);
macro.setValue(Boolean.TRUE); macro.setValue(Boolean.TRUE);
loadCodeAndRunCpp(getAboveComment()); loadCodeAndRunCpp(getAboveComment());

View file

@ -192,8 +192,8 @@ public class GenerateActionGroup extends ActionGroup implements ISelectionChange
// editor.setAction("AddDelegateMethods", fAddDelegateMethods); //$NON-NLS-1$ // editor.setAction("AddDelegateMethods", fAddDelegateMethods); //$NON-NLS-1$
// //
// fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(editor); // fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(editor);
// fAddUnimplementedConstructors.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_UNIMPLEMENTED_CONTRUCTORS); // fAddUnimplementedConstructors.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_UNIMPLEMENTED_CONSTRUCTORS);
// editor.setAction("AddUnimplementedConstructors", fAddUnimplementedConstructors); //$NON-NLS-1$ // editor.setAction("AddUnimplementedConstructors", fAddUnimplementedConstructors); //$NON-NLS-1$
// //
// fGenerateConstructorUsingFields= new GenerateNewConstructorUsingFieldsAction(editor); // fGenerateConstructorUsingFields= new GenerateNewConstructorUsingFieldsAction(editor);
// fGenerateConstructorUsingFields.setActionDefinitionId(ICEditorActionDefinitionIds.GENERATE_CONSTRUCTOR_USING_FIELDS); // fGenerateConstructorUsingFields.setActionDefinitionId(ICEditorActionDefinitionIds.GENERATE_CONSTRUCTOR_USING_FIELDS);
@ -277,8 +277,8 @@ public class GenerateActionGroup extends ActionGroup implements ISelectionChange
// fAddDelegateMethods.setActionDefinitionId(ICEditorActionDefinitionIds.CREATE_DELEGATE_METHODS); // fAddDelegateMethods.setActionDefinitionId(ICEditorActionDefinitionIds.CREATE_DELEGATE_METHODS);
// //
// fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(site); // fAddUnimplementedConstructors= new AddUnimplementedConstructorsAction(site);
// fAddUnimplementedConstructors.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_UNIMPLEMENTED_CONTRUCTORS); // fAddUnimplementedConstructors.setActionDefinitionId(ICEditorActionDefinitionIds.ADD_UNIMPLEMENTED_CONSTRUCTORS);
// //
// fGenerateConstructorUsingFields= new GenerateNewConstructorUsingFieldsAction(site); // fGenerateConstructorUsingFields= new GenerateNewConstructorUsingFieldsAction(site);
// fGenerateConstructorUsingFields.setActionDefinitionId(ICEditorActionDefinitionIds.GENERATE_CONSTRUCTOR_USING_FIELDS); // fGenerateConstructorUsingFields.setActionDefinitionId(ICEditorActionDefinitionIds.GENERATE_CONSTRUCTOR_USING_FIELDS);
// //

View file

@ -80,7 +80,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
@Deprecated @Deprecated
public AbstractErrorParserBlock(Preferences prefs) { public AbstractErrorParserBlock(Preferences prefs) {
this(); this();
// usingDeprecatedContructor = true; // usingDeprecatedConstructor = true;
fPrefs = prefs; fPrefs = prefs;
} }