Skip to content
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

Digging: In-method regions are shown within Spade #275

Closed
codecadwallader opened this issue Apr 16, 2016 · 3 comments
Closed

Digging: In-method regions are shown within Spade #275

codecadwallader opened this issue Apr 16, 2016 · 3 comments

Comments

@codecadwallader
Copy link
Owner

Environment

  • Visual Studio version: 2015 Community
  • CodeMaid version: 10.0
  • Code language: C#

Description

In-method regions are shown within Spade.

Steps to recreate

  1. Use a class file with in-method regions such as:
namespace ClassLibrary2
{
    internal class Issue272
    {

        #region Public Methods

        public int AMethod()
        {
            #region Declarations

            int x = 5;

            #endregion Declarations

            #region Calculations

            int y = x * 2;

            #endregion Calculations

            #region Returns

            return y;

            #endregion Returns
        }

        #endregion Public Methods
    }
}
  1. Look at the file within Spade and note that the in-method regions show up beneath the method.

Current behavior

In-method regions are shown.

Expected behavior

In-method regions should not be shown.

@codecadwallader codecadwallader self-assigned this Apr 16, 2016
@codecadwallader codecadwallader added this to the v10.1 milestone Apr 16, 2016
codecadwallader added a commit that referenced this issue Apr 16, 2016
…ethod regions. This will prevent them from being removed during reorganization or showing up within Spade.
@codecadwallader
Copy link
Owner Author

I have a proposed fix for this so that regions inside methods will be ignored. This will be available momentarily in our CI channel (v10.0.84 or higher) if anyone would like to test it: http://vsixgallery.com/extension/4c82e17d-927e-42d2-8460-b473ac7df316/

@FlouFlou
Copy link

Hi codecadwallader,
Bravo for your work.
I use only Spade because i was using VsCommands for VS 2010 File Structure. So i get used to see the structure of each file right the way it is coded (file order) for 3 years ! With public only properties, region, methods.... Recently i had to move to VS 2012 (i cant remember why) and the extension VsCommands for VS 2012 File Structure is totally useless (all properties are shown, no region...). So like i said it's very hard to change the way we are used to work. I need to see the file order structure because a lot of files in my solution are more than 2000 lines big.
One day i felt on CodeMaid Spade and it was just amazing. The Spade window is almost the way i want.

I want to ask you some questions.

  • Is there a way to show only public properties (because i use a lot of mvvminpc properties) / methods / region) / region in methods ? (maybe with a !suffix / suffix or the key word private)
  • Is there a way to Spade to keep the collapse/expand the way i leave it ? Because it's annoying when i do some code or switch to en other file and then Spade reload the entire structure and expand all.
  • In this previous example, if i click to many times during the refresh, VS 2012 can freeze. I have to reboot the solution. I'm pretty sure it's CodeMaid fault because the Spade window seems to do some infinite loop or something and i think VS is waiting for it.

Thanks for your job and your reply

@codecadwallader
Copy link
Owner Author

@FlouFlou To avoid confusing other users, please create a new issue for your questions instead of commenting on an old unrelated issue. As a quick response to your questions: No, Yes (default), and try resetting to default settings (known issue if you override some 'skip' options in VS2012).

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

No branches or pull requests

2 participants