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
 Create VA snippet for other languages
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ontherocks
Junior Member

13 Posts

Posted - Nov 24 2014 :  01:48:54 AM  Show Profile  Reply with Quote
I want to create a VA snippet for a language other than C++/C#/XAML.
The "VA Snippet Editor" has options for "Language", only for C++, C# and XAML.
How do I go about it?



accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 24 2014 :  1:25:13 PM  Show Profile  Reply with Quote
I think that this will help:
http://docs.wholetomato.com/default.asp?W326
Go to Top of Page

ontherocks
Junior Member

13 Posts

Posted - Nov 26 2014 :  07:03:24 AM  Show Profile  Reply with Quote
Ok. This enabled additional other predefined languages (Html, JavaScript, Text, VB) . The one which I am looking for is not in this list. Can I add something other than these? Or would it fall under "Text"?

Edited by - ontherocks on Nov 26 2014 07:27:05 AM
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Nov 26 2014 :  2:37:35 PM  Show Profile  Reply with Quote
You cannot add new languages, but I think you can try this one:
http://docs.wholetomato.com/default.asp?W353

So you can add additional extensions for a language. You just need to select one that you don't do programming in.

Edited by - accord on Nov 26 2014 2:39:05 PM
Go to Top of Page

ontherocks
Junior Member

13 Posts

Posted - Nov 26 2014 :  11:34:58 PM  Show Profile  Reply with Quote
I tried adding my file extension to a language that I do not use (ExtXaml).
However, the keyboard shortcuts that I specify, do not work.
I have to click the Toolbar button "Insert VA Snippet" then click "VA Snippets with shortcuts" to insert the snippet.

Edited by - ontherocks on Nov 26 2014 11:44:52 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Nov 27 2014 :  3:50:49 PM  Show Profile  Reply with Quote
What file extension are you working in, and which language have you mapped it to?

Which IDE and version of VA are you using?

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

ontherocks
Junior Member

13 Posts

Posted - Nov 28 2014 :  05:38:11 AM  Show Profile  Reply with Quote
File extension - .sch (Proprietary)
Mapped in registry to - "XAML" (ExtXaml) [tried with "Text" (ExtPlainText) too]
IDE - VS2012

VA and some more details:

VA_X.dll file version 10.9.2052.0 built 2014.11.05
DevEnv.exe version 11.0.51106.1 Professional
msenv.dll version 11.0.51106.1
Comctl32.dll version 6.10.7601.17514
Windows 7 6.1 Build 7601 Service Pack 1
8 processors (x86-64, WOW64)
Language info: 1252, 0x409
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Nov 29 2014 :  01:39:44 AM  Show Profile  Reply with Quote
Are you getting the VA context and definition fields at the top of the editor in the .sch files?

This is working correctly for me, and I am seeing these fields in the editor after setting the registry key and loading VS2012.

In the IDE options dialog, keyboard mappings section, which scope have you used for the command VAssistX.VaSnippetInsert ? I have this mapped to Ctrl+# in the Text Editor.

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

ontherocks
Junior Member

13 Posts

Posted - Dec 02 2014 :  12:08:27 AM  Show Profile  Reply with Quote
Not sure which "fields" are you talking about.

There is no keyboard shortcut mapped in Text Editor for VAssistX.VaSnippetInsert



I was talking about the keyboard shortcut that I define in "VA Snippet Editor". These do not work in my file.



So, for example if it was a .cpp file, I would just type "/com" in some line and the "Add Comment" snippet would appear and then I would hit TAB or ENTER to insert the snippet. However, in my file if I type "/com" the snippet does not appear. With the cursor at that line I would like to insert the "Add Comment" Snippet, I have to I have to click the Toolbar button "Insert VA Snippet" then click "VA Snippets with shortcuts" to insert the "Add Comment" snippet.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Dec 02 2014 :  11:44:14 PM  Show Profile  Reply with Quote
Sorry, I misunderstood what was going wrong here. I see what you are doing now. Can you please try turning On:

VA Options -> Listboxes -> Enable Visual Assist completion, suggestion and member listboxes in C#

this should fix the problem for you, and snippets should now be suggested and work as expected in your sch files.

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

ontherocks
Junior Member

13 Posts

Posted - Dec 19 2014 :  02:50:01 AM  Show Profile  Reply with Quote
That worked! :)
Thanks.
Go to Top of Page

tgaldi
New Member

2 Posts

Posted - Jun 23 2017 :  09:37:03 AM  Show Profile  Reply with Quote
Hi,

I'm trying to use snippets for F#.

I've added .fs .fsx to:

HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\<IDE spec>\ExtPlainText

I've enabled other languages with:

HKCU\Software\Whole Tomato\Visual Assist X\<IDE spec>\RestrictVaToPrimaryFileTypes = 00

I've added a snippet for Text in the snippet editor, but it still does not work.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jun 24 2017 :  05:59:40 AM  Show Profile  Reply with Quote
The problem is that F# is a programming language the IDE understands, so it probably isn't treating the files as text files, which is confusing VA. What happens if you try telling VA that F# is actually C++ code?

https://wholetomato.fogbugz.com/default.asp?W328

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

tgaldi
New Member

2 Posts

Posted - Jun 25 2017 :  09:02:49 AM  Show Profile  Reply with Quote
I tried with C++ and c# but snippets still do not work.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jun 26 2017 :  08:09:47 AM  Show Profile  Reply with Quote
Unfortunately VA does not support F#, and we don't have any current plans to add support for F#. Have you tried using the IDE Code Snippets:

IDE Tools menu -> Code Snippets Manager...

a quick search also turned up this extension, which might help:

https://visualstudiogallery.msdn.microsoft.com/d19080ad-d44c-46ae-b65c-55cede5f708b/view/

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