Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Visual Basic: mark matching end
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

RoSe
Junior Member

15 Posts

Posted - Mar 04 2008 :  03:15:00 AM  Show Profile  Reply with Quote
If you have more cascading if then else, for next ow while do constructs in some bigger methods the line indent is sometimes not sufficient enough to see where the matching end of the construct is (or the beginning to an end). It would be useful to somehow highlight the matching piece of code for the selected start/end of such a construct like highlighting the matching brace of a parameter list for example.

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Mar 07 2008 :  2:54:04 PM  Show Profile  Reply with Quote
How could VA mark the start and end of the block? If you are in a switch statement then there is no "end of block" line to highlight, just the start of the next case, or the end of the switch statement its self.

I understand the problem, I am just not sure how to solve it.

Occasionally I have produced long / complex if or switch statements myself, and the pieces can be taller than the screen. Generally Extract Method should help here, but I understand this is not always ideal.

zen is the art of being at one with the two'ness
Go to Top of Page

RoSe
Junior Member

15 Posts

Posted - Mar 10 2008 :  08:59:30 AM  Show Profile  Reply with Quote
I see this more as a support for reading code. You are definitively right that refactoring the method will be the best solution but sometimes I'm not the owner of the code or have some other reasosn not to touch the existing code. Maybe it could be a triggered function like the search function that will be enabled when I place the cursor on the openeing/closing part of the statement and execute something like 'find matching part' and then the opening and the closing part of the statement will be highlighted. If no matching part is found then nothing is highlighted ...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Mar 10 2008 :  11:45:48 AM  Show Profile  Reply with Quote
For standard blocks this would work quite well. I have put in a feature request to highlight the start and end of the block in VB:

case=14256

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000