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
 auto generated switch
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Vertexwahn
Senior Member

35 Posts

Posted - Sep 04 2011 :  8:13:54 PM  Show Profile  Reply with Quote
given the following code:

enum Suit { Diamonds, Hearts, Clubs, Spades };


somebody is coding a switch statement like this:


Suit suit = getUserInput();

switch(suit)


Visual Asssist should automatically generate all cases like this:


Suit suit = getUserInput();

switch(suit)
{
  case Diamonds:
     break;

  case Hearts:
     break;

  case Clubs:
     break;

  case Spades:
     break;

   default:
      break;
}

feline
Whole Tomato Software

United Kingdom
18983 Posts

Posted - Sep 05 2011 :  1:20:24 PM  Show Profile  Reply with Quote
We are considering adding a refactoring to do this at some point:

case=19137

For now, VA's Smart Suggestions should help you while manually writing the switch statement:

http://www.wholetomato.com/products/features/smartSuggestions.asp

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 21 2015 :  12:27:10 AM  Show Profile  Reply with Quote
case=19137 is implemented in build 2073 as the command "Add Missing Case Statements"
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