T O P I C R E V I E W |
RoSe |
Posted - Mar 04 2008 : 03:15:00 AM 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. |
3 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Mar 10 2008 : 11:45:48 AM 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 |
RoSe |
Posted - Mar 10 2008 : 08:59:30 AM 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 ... |
feline |
Posted - Mar 07 2008 : 2:54:04 PM 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. |