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
 Technical Support
 Snippet for switch statement
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

slimfinger
New Member

6 Posts

Posted - Jan 29 2013 :  11:44:25 AM  Show Profile  Reply with Quote
The default Intellisense snippet "switch statement auto-fill for enums in C#" (as detailed here: http://t-notes.blogspot.com/2008/12/switch-statement-auto-fill-for-enums-in.html) does not seem to be working in my version of VS2010 with VAX v. 10.6.1856.0.

Does VA disable these default snippets? Anyone know how to remedy this?

*moved to the general release section by feline*

Edited by - feline on Jan 30 2013 6:46:23 PM

feline
Whole Tomato Software

United Kingdom
19189 Posts

Posted - Jan 30 2013 :  6:45:56 PM  Show Profile  Reply with Quote
Are you pressing tab after accepting the IDE snippet from the listbox?

Using VS2010 and VA 1925 I type "switch" in a .cs file, select the IDE snippet from the listbox and press Tab to accept it. I then press Tab a second time to activate the snippet, and it is inserted and works as expected.

Testing this a bit further, it does not actually matter how you enter the word "switch", just placing the caret at the end of the word and pressing Tab is enough to trigger the IDE snippet.

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

slimfinger
New Member

6 Posts

Posted - Jan 31 2013 :  10:07:46 PM  Show Profile  Reply with Quote
Yes. I've pressed everything, I'm sure.

I'm not talking about the VA snippets, which do work. Did you visit the link I provided?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19189 Posts

Posted - Feb 01 2013 :  9:06:06 PM  Show Profile  Reply with Quote
Which version of VA are you using?

This is what I am seeing, typing in a .cs file, using the following code:

class test_general
{
	public enum BodyWorkColor { Black, Red, Yellow, White, Blue };

	void testSwitchSnippet()
	{
		BodyWorkColor colorTest;
		|
	}
}

on simply typing the keyword "switch":



on selecting the IDE switch item in the listbox, which is not actually required, but is useful to make sure this item is being suggested:



On pressing Tab once to accept the listbox:



On pressing Tab a second time, to expand the IDE Snippet:



if I now type "colorTest" to replace "switch_on" and press Enter, then the entire switch statement is generated. At which point do you start to get different results to me?

Is switch for the IDE snippet ever listed in the listbox for you?

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 - Feb 01 2013 :  10:56:41 PM  Show Profile  Reply with Quote
I suspect this was fixed sometime after build 1856.
Go to Top of Page

slimfinger
New Member

6 Posts

Posted - Feb 05 2013 :  4:09:14 PM  Show Profile  Reply with Quote
Odd; this is now working. I don't know if something was hosed, or if possibly I hadn't done the "press tab a second time to expand the snippet". Anyway, thanks.
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