Skip to content

Commit c1c1b91

Browse files
committed
made <module> a child of <before> and <after> tags for annotations; allows having new module type in the <after> example.
1 parent 735e02a commit c1c1b91

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

Rubberduck.Parsing/Annotations/Concrete/DefaultMemberAnnotation.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
77
/// @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.
88
/// </summary>
99
/// <example>
10-
/// <module name="Class1" type="Class Module">
1110
/// <before>
11+
/// <module name="Class1" type="Class Module">
1212
/// <![CDATA[
1313
/// Option Explicit
1414
/// Private InternalState As VBA.Collection
@@ -27,8 +27,10 @@ namespace Rubberduck.Parsing.Annotations.Concrete
2727
/// Set InternalState = New VBA.Collection
2828
/// End Sub
2929
/// ]]>
30+
/// </module>
3031
/// </before>
3132
/// <after>
33+
/// <module name="Class1" type="Class Module">
3234
/// <![CDATA[
3335
/// Option Explicit
3436
/// Private InternalState As VBA.Collection
@@ -48,8 +50,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
4850
/// Set InternalState = New VBA.Collection
4951
/// End Sub
5052
/// ]]>
51-
/// </after>
5253
/// </module>
54+
/// </after>
5355
/// </example>
5456
public sealed class DefaultMemberAnnotation : FixedAttributeValueAnnotationBase
5557
{

Rubberduck.Parsing/Annotations/Concrete/ExcelHotKeyAnnotation.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
1414
/// 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!
1515
/// </parameter>
1616
/// <example>
17-
/// <module name="Module1" type="Standard Module">
1817
/// <before>
18+
/// <module name="Module1" type="Standard Module">
1919
/// <![CDATA[
2020
/// Option Explicit
2121
///
@@ -24,8 +24,10 @@ namespace Rubberduck.Parsing.Annotations.Concrete
2424
/// '...
2525
/// End Sub
2626
/// ]]>
27+
/// </module>
2728
/// </before>
2829
/// <after>
30+
/// <module name="Module1" type="Standard Module">
2931
/// <![CDATA[
3032
/// Option Explicit
3133
///
@@ -35,8 +37,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
3537
/// '...
3638
/// End Sub
3739
/// ]]>
38-
/// </after>
3940
/// </module>
41+
/// </after>
4042
/// </example>
4143
public sealed class ExcelHotKeyAnnotation : FlexibleAttributeValueAnnotationBase
4244
{

Rubberduck.Parsing/Annotations/Concrete/ExposedModuleAnnotation.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ namespace Rubberduck.Parsing.Annotations.Concrete
99
/// @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.
1010
/// </summary>
1111
/// <example>
12-
/// <module name="Class1" type="Class Module">
1312
/// <before>
13+
/// <module name="Class1" type="Class Module">
1414
/// <![CDATA[
1515
/// '@Exposed
1616
/// Option Explicit
1717
///
1818
/// Public Sub DoSomething()
1919
/// End Sub
2020
/// ]]>
21+
/// </module>
2122
/// </before>
2223
/// <after>
24+
/// <module name="Class1" type="Class Module">
2325
/// <![CDATA[
2426
/// Attribute VB_Exposed = True
2527
/// '@Exposed
@@ -28,8 +30,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
2830
/// Public Sub DoSomething()
2931
/// End Sub
3032
/// ]]>
31-
/// </after>
3233
/// </module>
34+
/// </after>
3335
/// </example>
3436
public sealed class ExposedModuleAnnotation : FixedAttributeValueAnnotationBase
3537
{

Rubberduck.Parsing/Annotations/Concrete/InterfaceAnnotation.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ namespace Rubberduck.Parsing.Annotations.Concrete
99
/// Code Explorer uses an "interface" icon to represent class modules with this annotation.
1010
/// </remarks>
1111
/// <example>
12-
/// <module name="Tests" type="Standard Module">
12+
/// <before>
13+
/// <module name="Something" type="Class Module">
1314
/// <![CDATA[
1415
/// '@Interface
1516
/// Option Explicit
@@ -18,6 +19,18 @@ namespace Rubberduck.Parsing.Annotations.Concrete
1819
/// End Sub
1920
/// ]]>
2021
/// </module>
22+
/// </before>
23+
/// <after>
24+
/// <module name="Something" type="Interface Module">
25+
/// <![CDATA[
26+
/// '@Interface
27+
/// Option Explicit
28+
///
29+
/// Public Sub DoSomething()
30+
/// End Sub
31+
/// ]]>
32+
/// </module>
33+
/// </after>
2134
/// </example>
2235
public sealed class InterfaceAnnotation : AnnotationBase
2336
{

Rubberduck.Parsing/Annotations/Concrete/PredeclaredIdAnnotation.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ namespace Rubberduck.Parsing.Annotations
77
/// Consider keeping the default/predeclared instance stateless.
88
/// </remarks>
99
/// <example>
10-
/// <module name="Class1" type="Class Module">
1110
/// <before>
11+
/// <module name="Class1" type="Class Module">
1212
/// <![CDATA[
1313
/// '@PredeclaredId
1414
/// Option Explicit
@@ -17,8 +17,10 @@ namespace Rubberduck.Parsing.Annotations
1717
/// Set Create = New Class1
1818
/// End Sub
1919
/// ]]>
20+
/// </module>
2021
/// </before>
2122
/// <after>
23+
/// <module name="Class1" type="Predeclared Class">
2224
/// <![CDATA[
2325
/// Attribute VB_PredeclaredId = True
2426
/// '@PredeclaredId
@@ -28,8 +30,8 @@ namespace Rubberduck.Parsing.Annotations
2830
/// Set Create = New Class1
2931
/// End Sub
3032
/// ]]>
31-
/// </after>
3233
/// </module>
34+
/// </after>
3335
/// </example>
3436
public sealed class PredeclaredIdAnnotation : FixedAttributeValueAnnotationBase
3537
{

0 commit comments

Comments
 (0)