Open ChrisBrackett opened 5 years ago
I see what went wrong. I wanted to see if the member.Description attribute could handle a line break so I concatenated one into the text, basically '@Description("Some text " & vbNewLine & vbNewLine & " more text."). Looks like that doesn't work. Could we add an inspection result like "Invalid Attribute Annotation"?.
For now, the obvious workaround is to be less creative with attribute annotations.
Ah! well spotted, hadn't noticed! You could do @Description("Some text \nMore Text")
- the \n
newline isn't currently handled, but could very well be in the future.
Are module/member description attributes a VBE thing just a Rubberduck feature?
@CHR-IS-B we make them more visible and easier to manipulate, but the VBE provides a (rather convoluted) way to tweak them (but ), via the Object Browser - right-click a module or member, select "Properties"; note that Rubberduck can't re-import document modules, so that's essentially (currently) the only way to provide a description attribute for a Worksheet module and its members.
The VBE doesn't provide any way (in VBA at least) to manipulate member attributes other than VB_Description
though.
Got it. That means RD could do anything with member attributes! So I'm thinking '@Description("This procedure makes toast!" & InsertAnimatedGif("Dancing_Dwarf"))
. On second thought...maybe not.
I’ll add a vote that once our plug in architecture is in place of our code base InsertedAnimatedGif feature or any other plug in becomes accessible to annotations.
Rubberduck version information
Description The last time I applied the "Add Missing Attribute" hotfix for a member attribute annotation I went from this:
...to this:
The code couldn't compile with that attribute as a visible line of code (syntax error), however RD did not show an error even after I initiated a couple of redundant reparses.
To Reproduce Steps to reproduce the behavior:
I was able to reproduce the error after exporting the module and re-importing it into a fresh Excel workbook.
Logfile RubberduckLog.txt