#Regions are not being removed during code cleanup
In my #R 7.0 Type Members Layout, I have this pattern:
<!--Default pattern-->
<Pattern RemoveAllRegions="true">
However when I do a code cleanup, the regions are not removed. I tried all the code cleanup profiles. This used to work in R#6.
Please sign in to leave a comment.
Hello abdu
Could you please post your type member layout pattern once again as I don't see it here? Thank you!
Andrey Serebryansky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
I am adding it as an attachment. Insert Raw HTML doesn't to be working or I don't know how to use it.
Attachment(s):
resharper type layout.xml
What's the status of this issue?
Hello
Sorry for delayed response! The pattern you're using will not remove all regions because of two things:
1. The 'RemoveAllRegions=true' attribute is associated with a pattern that matches type members only, so it will not remove regions around a top-level class. You should add a separate pattern that matches top-level classes to avoid that.
2. There are multiple
<Group>
<Name Region="${Name} enum"/>
</Group>
tags inside entries, which can add #region directives, so you should remove them as well.
Let me know if this helps. Thank you!
Andrey Serebryansky
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"