From c532ede4cd9f807fdb81f371a0fb7f0f93775ab1 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 19 May 2013 10:53:56 -0700 Subject: [PATCH] Cosmetics. --- .../parser/tests/ast2/AST2TemplateTests.java | 16 +++++++--------- .../core/dom/parser/cpp/CPPClassInstance.java | 2 +- .../dom/parser/cpp/CPPClassSpecialization.java | 6 +++--- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index 2371a96d05c..3ad314bd0fa 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -7656,7 +7656,7 @@ public class AST2TemplateTests extends AST2TestBase { } // template - // class ATemplate { + // class A { // int defaultMemberVariable; // public: // int publicMemberVariable; @@ -7665,10 +7665,10 @@ public class AST2TemplateTests extends AST2TestBase { // private: // int privateMemberVariable; // }; - public void testTemplateMemberAccessibilities() throws Exception { + public void testTemplateMemberAccessibility() throws Exception { BindingAssertionHelper bh = getAssertionHelper(); - ICPPClassTemplate aTemplate = bh.assertNonProblem("ATemplate"); + ICPPClassTemplate aTemplate = bh.assertNonProblem("A"); ICPPField defaultMemberVariable = bh.assertNonProblem("defaultMemberVariable"); assertVisibility(ICPPClassType.v_private, aTemplate.getVisibility(defaultMemberVariable)); @@ -7684,12 +7684,10 @@ public class AST2TemplateTests extends AST2TestBase { } // template - // class ATemplate {}; - // - // class A{}; + // class A {}; // // template<> - // class ATemplate { + // class A { // int specializedDefaultVariable; // public: // int specializedPublicVariable; @@ -7698,10 +7696,10 @@ public class AST2TemplateTests extends AST2TestBase { // private: // int specializedPrivateVariable; // }; - public void testTemplateSpecializationMemberAccessibilities() throws Exception { + public void testTemplateSpecializationMemberAccessibility() throws Exception { BindingAssertionHelper bh = getAssertionHelper(); - ICPPClassSpecialization aTemplateSpecialization = bh.assertNonProblem("ATemplate"); + ICPPClassSpecialization aTemplateSpecialization = bh.assertNonProblem("A"); ICPPField defaultMemberVariable = bh.assertNonProblem("specializedDefaultVariable"); assertVisibility(ICPPClassType.v_private, aTemplateSpecialization.getVisibility(defaultMemberVariable)); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java index 6c9a28cc727..35538ad31a2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassInstance.java @@ -98,7 +98,7 @@ public class CPPClassInstance extends CPPClassSpecialization implements ICPPTemp public static boolean isSameClassInstance(ICPPClassSpecialization classInstance, IType type) { assert classInstance instanceof ICPPTemplateInstance; - // require a class instance + // Require a class instance. if (!(type instanceof ICPPClassSpecialization) || !(type instanceof ICPPTemplateInstance) || type instanceof IProblemBinding) { return false; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java index 7d13ebbd670..22376aae212 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPClassSpecialization.java @@ -414,7 +414,7 @@ public class CPPClassSpecialization extends CPPSpecialization } public static boolean isSameClassSpecialization(ICPPClassSpecialization t1, ICPPClassSpecialization t2) { - // exclude class template specialization or class instance + // Exclude class template specialization or class instance. if (t2 instanceof ICPPTemplateInstance || t2 instanceof ICPPTemplateDefinition || t2 instanceof IProblemBinding) { return false; @@ -426,13 +426,13 @@ public class CPPClassSpecialization extends CPPSpecialization if (!CharArrayUtils.equals(t1.getNameCharArray(), t2.getNameCharArray())) return false; - // the argument map is not significant for comparing specializations, the map is + // The argument map is not significant for comparing specializations, the map is // determined by the owner of the specialization. This is different for instances, // which have a separate implementation for isSameType(). final IBinding owner1= t1.getOwner(); final IBinding owner2= t2.getOwner(); - // for a specialization that is not an instance the owner has to be a class-type + // For a specialization that is not an instance the owner has to be a class-type. if (!(owner1 instanceof ICPPClassType) || !(owner2 instanceof ICPPClassType)) return false;