From 870cbdf8915dc7c0d5ec8de84430aea0ad8fb7f7 Mon Sep 17 00:00:00 2001 From: Vogel612 Date: Thu, 22 Aug 2019 21:52:22 +0200 Subject: [PATCH] Revert Description -> MemberDescription rename because I was an idiot --- Rubberduck.Parsing/Annotations/AnnotationType.cs | 2 +- Rubberduck.Parsing/Annotations/DescriptionAnnotation.cs | 2 +- Rubberduck.Parsing/Annotations/VBAParserAnnotationFactory.cs | 2 +- RubberduckTests/Annotations/AttributeAnnotationProviderTests.cs | 2 +- RubberduckTests/Grammar/AnnotationTests.cs | 2 +- RubberduckTests/PostProcessing/AnnotationUpdaterTests.cs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Rubberduck.Parsing/Annotations/AnnotationType.cs b/Rubberduck.Parsing/Annotations/AnnotationType.cs index c173abe579..f7cecf4df7 100644 --- a/Rubberduck.Parsing/Annotations/AnnotationType.cs +++ b/Rubberduck.Parsing/Annotations/AnnotationType.cs @@ -57,7 +57,7 @@ public enum AnnotationType NoIndent = 1 << 18 | ModuleAnnotation, Interface = 1 << 19 | ModuleAnnotation, [FlexibleAttributeValueAnnotation("VB_Description", 1)] - MemberDescription = 1 << 13 | Attribute | MemberAnnotation, + Description = 1 << 13 | Attribute | MemberAnnotation, [FixedAttributeValueAnnotation("VB_UserMemId", "0")] DefaultMember = 1 << 14 | Attribute | MemberAnnotation, [FixedAttributeValueAnnotation("VB_UserMemId", "-4")] diff --git a/Rubberduck.Parsing/Annotations/DescriptionAnnotation.cs b/Rubberduck.Parsing/Annotations/DescriptionAnnotation.cs index e9ee0ba4cd..d3e7e716f4 100644 --- a/Rubberduck.Parsing/Annotations/DescriptionAnnotation.cs +++ b/Rubberduck.Parsing/Annotations/DescriptionAnnotation.cs @@ -10,7 +10,7 @@ namespace Rubberduck.Parsing.Annotations public sealed class DescriptionAnnotation : DescriptionAttributeAnnotationBase { public DescriptionAnnotation(QualifiedSelection qualifiedSelection, VBAParser.AnnotationContext context, IEnumerable parameters) - : base(AnnotationType.MemberDescription, qualifiedSelection, context, parameters) + : base(AnnotationType.Description, qualifiedSelection, context, parameters) {} } } \ No newline at end of file diff --git a/Rubberduck.Parsing/Annotations/VBAParserAnnotationFactory.cs b/Rubberduck.Parsing/Annotations/VBAParserAnnotationFactory.cs index d9860cc528..46c8ca27ea 100644 --- a/Rubberduck.Parsing/Annotations/VBAParserAnnotationFactory.cs +++ b/Rubberduck.Parsing/Annotations/VBAParserAnnotationFactory.cs @@ -24,7 +24,7 @@ public VBAParserAnnotationFactory() _creators.Add(AnnotationType.Folder.ToString().ToUpperInvariant(), typeof(FolderAnnotation)); _creators.Add(AnnotationType.NoIndent.ToString().ToUpperInvariant(), typeof(NoIndentAnnotation)); _creators.Add(AnnotationType.Interface.ToString().ToUpperInvariant(), typeof(InterfaceAnnotation)); - _creators.Add(AnnotationType.MemberDescription.ToString().ToUpperInvariant(), typeof (DescriptionAnnotation)); + _creators.Add(AnnotationType.Description.ToString().ToUpperInvariant(), typeof (DescriptionAnnotation)); _creators.Add(AnnotationType.PredeclaredId.ToString().ToUpperInvariant(), typeof(PredeclaredIdAnnotation)); _creators.Add(AnnotationType.DefaultMember.ToString().ToUpperInvariant(), typeof(DefaultMemberAnnotation)); _creators.Add(AnnotationType.Enumerator.ToString().ToUpperInvariant(), typeof(EnumeratorMemberAnnotation)); diff --git a/RubberduckTests/Annotations/AttributeAnnotationProviderTests.cs b/RubberduckTests/Annotations/AttributeAnnotationProviderTests.cs index 6608095d62..236aed4ff4 100644 --- a/RubberduckTests/Annotations/AttributeAnnotationProviderTests.cs +++ b/RubberduckTests/Annotations/AttributeAnnotationProviderTests.cs @@ -58,7 +58,7 @@ public void ModuleAttributeAnnotationReturnsSpecializedAnnotationsWhereApplicabl } [TestCase("VB_ProcData.VB_Invoke_Func", @"A\n14", AnnotationType.ExcelHotKey, "A")] - [TestCase("VB_Description", "\"SomeDescription\"", AnnotationType.MemberDescription, "\"SomeDescription\"")] + [TestCase("VB_Description", "\"SomeDescription\"", AnnotationType.Description, "\"SomeDescription\"")] [TestCase("VB_VarDescription", "\"SomeDescription\"", AnnotationType.VariableDescription, "\"SomeDescription\"")] [TestCase("VB_UserMemId", "0", AnnotationType.DefaultMember)] [TestCase("VB_UserMemId", "-4", AnnotationType.Enumerator)] diff --git a/RubberduckTests/Grammar/AnnotationTests.cs b/RubberduckTests/Grammar/AnnotationTests.cs index 45bdc99c77..2b3b100257 100644 --- a/RubberduckTests/Grammar/AnnotationTests.cs +++ b/RubberduckTests/Grammar/AnnotationTests.cs @@ -139,7 +139,7 @@ public void MemberAttributeAnnotation_TypeIsMemberAttribute() public void DescriptionAnnotation_TypeIsDescription() { var annotation = new DescriptionAnnotation(new QualifiedSelection(), null, new[] { "Desc"}); - Assert.AreEqual(AnnotationType.MemberDescription, annotation.AnnotationType); + Assert.AreEqual(AnnotationType.Description, annotation.AnnotationType); } [Category("Grammar")] diff --git a/RubberduckTests/PostProcessing/AnnotationUpdaterTests.cs b/RubberduckTests/PostProcessing/AnnotationUpdaterTests.cs index b458ced6e1..bdad3e83bc 100644 --- a/RubberduckTests/PostProcessing/AnnotationUpdaterTests.cs +++ b/RubberduckTests/PostProcessing/AnnotationUpdaterTests.cs @@ -728,7 +728,7 @@ End Sub var fooDeclaration = state.DeclarationFinder .UserDeclarations(DeclarationType.Procedure) .First(decl => decl.IdentifierName == "Foo"); - var annotationToUpdate = fooDeclaration.Annotations.First(annotation => annotation.AnnotationType == AnnotationType.MemberDescription); + var annotationToUpdate = fooDeclaration.Annotations.First(annotation => annotation.AnnotationType == AnnotationType.Description); var annotationUpdater = new AnnotationUpdater(); annotationUpdater.UpdateAnnotation(rewriteSession, annotationToUpdate, newAnnotation, newAnnotationValues);