Slaughtering Comments

Referring to this post in the Bug Reports Forum, Unfortunately I can’t think of a way to completely solve this at the moment.

See, the problem is that if the symbol is empty, any comment block that starts with at least two slashes will be considered as a Regionerated comment region. For example, if the symbol is”*”, Regionerated comment regions would look like:

// * Private Fields (3)

But if the symbol is “” (empty), the same region would look like

// Private Fields (3)

This looks exactly like any other comment, and must be removed before actually Regionerating to prevent junk from piling up. However, I did minimize the bug’s severity by allowing triple-slash comment blocks such as Xml documentation

blocks. (which were the main reason for reporting this bug)

Would love to hear any ideas you may have on solving this one.

 

This entry was posted on Tuesday, August 21st, 2007at 11:59 pm and is filed under Bugs, Known Issues, Public Beta, What do you think?, v0.6, v0.6.5.0. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response or trackback from your own site.

 

5 Responses to “Slaughtering Comments”

  1. Here’s a nice idea for the symbol which I use: use “[", and end all regions with " ]” …

    Posted by David on August 22nd, 2007 5:34 am

  2. I can’t remember providing support for end-symbols yet.

    Have I been sleep-programming again? :-)

    Still, some people might prefer no symbols at all, and I am having trouble providing a solution for that.

    Posted by Omer Rauchwerger on August 22nd, 2007 9:24 pm

  3. What if you made it such that folks using “comment regions” are required to fill in the Symbol, but people not using “comment regions” will have their comments properly moved around with the code where they’re supposed to be?

    (In my small corner of the world, it’s either a “region” or it’s a “comment,” but there’s no real notion of “comment region.”)

    Posted by Travis on August 24th, 2007 11:07 pm

  4. Travis,

    That’s a good idea, however, it will create a difference between the way “Visible”/”Invisible” regions are created and the way “Comment” regions are created.

    All region styles are handled in the same way inside the Code Layout document and inside the code that does the rendering so I will prefer avoiding special cases.

    Regarding “Comment regions”, well, I agree this is a bit confusing, but in my point of view, comments are just one way to create a logical region. (which has nothing to do with the actual “#region” declaration)

    Perhaps they should be called groups or something like that to avoid to confusion.

    Thanks!

    Posted by Omer Rauchwerger on August 25th, 2007 12:35 pm

  5. I meant, adding the “]” symbol manually to the region’s name suffix.

    BTW, using the region name at the endregion would also be a nice feature.

    Posted by David on August 30th, 2007 6:26 am

 

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>