Skip to content

Commit

Permalink
made <module> a child of <before> and <after> tags for annotations; a…
Browse files Browse the repository at this point in the history
…llows having new module type in the <after> example.
  • Loading branch information
retailcoder committed Jul 25, 2020
1 parent 735e02a commit c1c1b91
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 9 deletions.
Expand Up @@ -7,8 +7,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// @DefaultMember annotation, indicates that the member should have a VB_UserMemId attribute value (0) making it the default member of that class. Use the quick-fixes to "Rubberduck Opportunities" code inspections to synchronize annotations and attributes.
/// </summary>
/// <example>
/// <module name="Class1" type="Class Module">
/// <before>
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// Option Explicit
/// Private InternalState As VBA.Collection
Expand All @@ -27,8 +27,10 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// Set InternalState = New VBA.Collection
/// End Sub
/// ]]>
/// </module>
/// </before>
/// <after>
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// Option Explicit
/// Private InternalState As VBA.Collection
Expand All @@ -48,8 +50,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// Set InternalState = New VBA.Collection
/// End Sub
/// ]]>
/// </after>
/// </module>
/// </after>
/// </example>
public sealed class DefaultMemberAnnotation : FixedAttributeValueAnnotationBase
{
Expand Down
Expand Up @@ -14,8 +14,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// A single-letter string argument maps the hotkey. If the letter is in UPPER CASE, the hotkey is Ctrl+Shift+letter; if the letter is lower case, the hotkey is Ctrl+letter. Avoid remapping commonly used keyboard shortcuts!
/// </parameter>
/// <example>
/// <module name="Module1" type="Standard Module">
/// <before>
/// <module name="Module1" type="Standard Module">
/// <![CDATA[
/// Option Explicit
///
Expand All @@ -24,8 +24,10 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// '...
/// End Sub
/// ]]>
/// </module>
/// </before>
/// <after>
/// <module name="Module1" type="Standard Module">
/// <![CDATA[
/// Option Explicit
///
Expand All @@ -35,8 +37,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// '...
/// End Sub
/// ]]>
/// </after>
/// </module>
/// </after>
/// </example>
public sealed class ExcelHotKeyAnnotation : FlexibleAttributeValueAnnotationBase
{
Expand Down
Expand Up @@ -9,17 +9,19 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// @Exposed annotation, indicates the presence of a VB_Exposed module attribute value (True) to make a class visible to a referencing project (classes are otherwise private by default). Use the quick-fixes to "Rubberduck Opportunities" code inspections to synchronize annotations and attributes.
/// </summary>
/// <example>
/// <module name="Class1" type="Class Module">
/// <before>
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// '@Exposed
/// Option Explicit
///
/// Public Sub DoSomething()
/// End Sub
/// ]]>
/// </module>
/// </before>
/// <after>
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// Attribute VB_Exposed = True
/// '@Exposed
Expand All @@ -28,8 +30,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// Public Sub DoSomething()
/// End Sub
/// ]]>
/// </after>
/// </module>
/// </after>
/// </example>
public sealed class ExposedModuleAnnotation : FixedAttributeValueAnnotationBase
{
Expand Down
15 changes: 14 additions & 1 deletion Rubberduck.Parsing/Annotations/Concrete/InterfaceAnnotation.cs
Expand Up @@ -9,7 +9,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// Code Explorer uses an "interface" icon to represent class modules with this annotation.
/// </remarks>
/// <example>
/// <module name="Tests" type="Standard Module">
/// <before>
/// <module name="Something" type="Class Module">
/// <![CDATA[
/// '@Interface
/// Option Explicit
Expand All @@ -18,6 +19,18 @@ namespace Rubberduck.Parsing.Annotations.Concrete
/// End Sub
/// ]]>
/// </module>
/// </before>
/// <after>
/// <module name="Something" type="Interface Module">
/// <![CDATA[
/// '@Interface
/// Option Explicit
///
/// Public Sub DoSomething()
/// End Sub
/// ]]>
/// </module>
/// </after>
/// </example>
public sealed class InterfaceAnnotation : AnnotationBase
{
Expand Down
Expand Up @@ -7,8 +7,8 @@ namespace Rubberduck.Parsing.Annotations
/// Consider keeping the default/predeclared instance stateless.
/// </remarks>
/// <example>
/// <module name="Class1" type="Class Module">
/// <before>
/// <module name="Class1" type="Class Module">
/// <![CDATA[
/// '@PredeclaredId
/// Option Explicit
Expand All @@ -17,8 +17,10 @@ namespace Rubberduck.Parsing.Annotations
/// Set Create = New Class1
/// End Sub
/// ]]>
/// </module>
/// </before>
/// <after>
/// <module name="Class1" type="Predeclared Class">
/// <![CDATA[
/// Attribute VB_PredeclaredId = True
/// '@PredeclaredId
Expand All @@ -28,8 +30,8 @@ namespace Rubberduck.Parsing.Annotations
/// Set Create = New Class1
/// End Sub
/// ]]>
/// </after>
/// </module>
/// </after>
/// </example>
public sealed class PredeclaredIdAnnotation : FixedAttributeValueAnnotationBase
{
Expand Down

0 comments on commit c1c1b91

Please sign in to comment.