New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regions are not visible in CodeMaid Spade using VB .NET #342

Closed
aeab13 opened this Issue Sep 17, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@aeab13
Contributor

aeab13 commented Sep 17, 2016

Environment

  • Visual Studio 2015 Community and Enterprise
  • CodeMaid 10.1
  • VB .NET

Description

VB Regions are not visible in Spade.

Steps to recreate

  1. Create an class
  2. Add some methods and create the regions

Current behavior

Regions do not appear in CodeMaid Spade
image_2016-09-17_22-40-37

Expected behavior

Regions should appear like in C#

NOTE: I've trying to see where is this functionality implemented but I haven't been able to find it. If you can tell me which class is doing this functionality, I'll try to fix it.

@codecadwallader

This comment has been minimized.

Owner

codecadwallader commented Sep 19, 2016

Thanks for reporting the issue and looking into it. I think the following is where you'll want to look:

private static IEnumerable<CodeItemRegion> RetrieveCodeRegions(IEnumerable<EditPoint> editPoints)

I suspect the problem may be that the RegionPattern and code within CodeModelHelper are explicitly looking for #region not #Region (i.e. case sensitive matching) as the tags are different between C# and VB. We may want to review any other places that make the same assumption, e.g. GenerateRegionLogic

Links I found (may be others):

private string RegionPattern => @"^[ \t]*#(region|endregion)";

if (regionText.StartsWith("#region ")) // Space required by compiler.

else if (regionText.StartsWith("#endregion"))

cursor.Insert($"#region {region.Name}{Environment.NewLine}");

cursor.Insert("#endregion");

@aeab13

This comment has been minimized.

Contributor

aeab13 commented Sep 20, 2016

Oke! I'll look into it ASAP.
Thank you!

aeab13 added a commit to aeab13/codemaid that referenced this issue Nov 22, 2016

codecadwallader added a commit that referenced this issue Dec 1, 2016

Merge pull request #368 from aeab13/regionsVB
#342: Fixed regions for VB.NET
@codecadwallader

This comment has been minimized.

Owner

codecadwallader commented Dec 1, 2016

Resolved by #368

@codecadwallader codecadwallader added this to the v10.2 milestone Dec 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment