Skip to content

Commit

Permalink
Revert Description -> MemberDescription rename because I was an idiot
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogel612 committed Aug 22, 2019
1 parent 73a3ffd commit 870cbdf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Rubberduck.Parsing/Annotations/AnnotationType.cs
Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion Rubberduck.Parsing/Annotations/DescriptionAnnotation.cs
Expand Up @@ -10,7 +10,7 @@ namespace Rubberduck.Parsing.Annotations
public sealed class DescriptionAnnotation : DescriptionAttributeAnnotationBase
{
public DescriptionAnnotation(QualifiedSelection qualifiedSelection, VBAParser.AnnotationContext context, IEnumerable<string> parameters)
: base(AnnotationType.MemberDescription, qualifiedSelection, context, parameters)
: base(AnnotationType.Description, qualifiedSelection, context, parameters)
{}
}
}
Expand Up @@ -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));
Expand Down
Expand Up @@ -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)]
Expand Down
2 changes: 1 addition & 1 deletion RubberduckTests/Grammar/AnnotationTests.cs
Expand Up @@ -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")]
Expand Down
2 changes: 1 addition & 1 deletion RubberduckTests/PostProcessing/AnnotationUpdaterTests.cs
Expand Up @@ -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);
Expand Down

0 comments on commit 870cbdf

Please sign in to comment.