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
 [autotext] scripting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gosh
Junior Member

14 Posts

Posted - Jun 29 2007 :  07:22:16 AM  Show Profile  Reply with Quote
Add any scripting language to the autotext functionality would make it even better.
What I mean is that adding functions bringing intelligence to the autotext functionality.
Example:
$SymbolName$ REPEAT( G?-G?, 79 - LEN($SymbolName$))
This would insert a line of G?-G? that extends to 80 characters

Tip: Boost has a parser that may fit
http://www.codeproject.com/vcpp/stl/introduction_spirit.asp
http://boost.org/libs/spirit/index.html

read about "infix to postfix" if simple formulas is the thing to use, not that hard to implement.


Edited by - gosh on Jun 29 2007 07:25:15 AM

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jun 29 2007 :  12:09:19 PM  Show Profile  Reply with Quote
We don't have any current plans to do anything like this.

Unless you allow for some form of input then all of these functions will simply produce a fixed output, the same output every time, so you might as well replace the function with its output. In a sense this is the whole point of Autotext, you write the complex piece of code only once, and then re-use it easily.

If you allow some suitable form of input then you have added another programming language people need to learn to get their job done.

Have you considered using IDE macro's to do some of this? See here for some thoughts on this:

http://docs.wholetomato.com?W382

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

gosh
Junior Member

14 Posts

Posted - Jun 29 2007 :  2:25:33 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

We don't have any current plans to do anything like this.


You already have it but it is hardcoded maybe?
This are examples where I think you call som functions in order to replace it with a value.
$YEAR_02$, $MONTH$, $FILE_PATH_UPPER$ e.t.c.

Extend this, first step could be to let the user writing forumals in the text and it will be a lot "smarter", also easy to extend for you
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jun 29 2007 :  2:51:27 PM  Show Profile  Reply with Quote
These examples are hard coded.

Do you have any specific examples of things you are trying to do?

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

gosh
Junior Member

14 Posts

Posted - Jun 29 2007 :  5:05:26 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

These examples are hard coded.

Do you have any specific examples of things you are trying to do?



If I make a class the class differs depending on how it should act. Maybe the class should be compatible with stl and use operators for sorting, it could be nested in another class, it could be a window class etc.
One way to solve this a bit is to make a lot of templates for each type of class but it would be pretty constant.

Lets say that I typed G?classG? this and there was a command called IF
---------
Shortcut G?classG?
code
class $class_name$ : public $parent_class$
[G?]
{{IF( $ parent_class $ = G?CWndG?; G?this text is inserted if class is derived from CWndG?; G?G? )}}
{{IF( $ parent_class $ = G?CObjectG?; G?this text is inserted if class is derived from CObjectG?; G? standard classG? )}}
[G?]
---------
The G?{{G? is used to mark that formula is there and it needs to be parsed and processed in order to output text in this sample and }} ends it.
Then it will be possible to create some logics depending on values parameters have. Also if you add this type of functionality then I sure it will pop up a lot of ideas on what could be done and it will be easy to extend it with formulas that is appropriate to functionality in visual assist.
I have done this in our applications and it is of great value. There are some samples of formula functionality on www.codeproject.com (havenG??t checked them though).

If you add this and make it general I am sure you will find other uses for it, scanning code and make modifications depending on rules set etc.


Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jun 30 2007 :  07:59:10 AM  Show Profile  Reply with Quote
The class example makes sense, and is interesting.

My main concern here is the work required to implement this, verses the benefit our customers will get from it. Using a parsing framework will help with doing it, but first you have to design the language you are going to use, and decide what features it is going to offer.

Based on the support questions I see I get the feeling most people are not using the existing power of autotext.

Taking this class exmple this could just as easily be done by having 3 or 4 autotext entries, all using the same shortcut "class", where each is designed around a different base class. This is about the same amount of work to setup, and actually less work to use, since you just select "class derived from CWnd" in the autotest suggestion listbox and this saves you having to type in this base class name, or remember the set of base classes that the autotext rule supports and understands.

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

gosh
Junior Member

14 Posts

Posted - Jun 30 2007 :  11:10:05 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

The class example makes sense, and is interesting.

My main concern here is the work required to implement this, verses the benefit our customers will get from it. Using a parsing framework will help with doing it, but first you have to design the language you are going to use, and decide what features it is going to offer.



If people don't use the full power of some functionality you have to ask why? Is the functionality userfriendly? Is it to complicated?
If a user has modified the autotext file and let's say he/she has up to 20 different autotext sections, this will be too much I think even if there is good help on viewing the output or getting hints about the output.
When I program I don't want to think about things like this, I just want it to work. My mind is at the sourcecode that I develop.

I want to have one commenting style when a function is commented in the class header and another when the class in the cpp file. Is this possible now? Also I do some JavaScript and there is a different type of functionheader.
It would be great to have a function like this
{{IF( GetActiveFileExtension() = "h"; "[...]";"")}}
{{IF( GetActiveFileExtension() = "cpp"; "[...]";"")}}

Yes the functionality needs to have some design considirations done, and if the developer doesn't have done this before it may be difficult. If someone has done it then this then this functionality is pretty easy to implement. To do this kind of functionality will also increase the skills of the developer. I think that developers that hardcode almost everything should have some tasks where they can see how flexible a more general solution is.
We did this in our applications and the first version used the EXCEL formulas. Using another applications solution may help to design it.
Maybe it is possible to use another script engine, like javascript that could be used in visual assist.

Visual Assist is a kickass product :). If you add this type of functionality and let users create intelligent functionality that they can share with others then you will get even more back from this. Maybe it will be possible to create addins also.
In another thread I suggested that VA should read variables from a file. With this type of functionality you could create a function that read data from a file.
ReadValueFromFile("filename","variable name"); and the file had some specific format. Using some intelligent functionality in this function it will be possible to have different settings depending on the project you are working on.
You will get a million new ideas from this! Some useful to ;)


Edited by - gosh on Jun 30 2007 11:13:12 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 02 2007 :  06:58:45 AM  Show Profile  Reply with Quote
You make good arguments for how this helps, but I am confused by the first part of your post.

You seem to be suggesting the current autotext system is to complicated, since people are not really using it. I have often wondered why people do not make more use of autotext myself, but have yet to reach any useful conclusions.

If the current system is too complex then adding all of this is only going to make it worse, since the system becomes a lot more complex.

I have asked internally to get a second opinion on this. I see the appeal, but I also see some of the problems, support being one of them.

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

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Jul 02 2007 :  11:59:23 AM  Show Profile  Reply with Quote
With respect to using Autotext, this is my take - maybe this extends to other users as well:

1. The amount of predefined autotext entries that come with VA is already intimidating. They might be meant to be useful, but I never really took the time to check them all out. The entries I know most about are those that are triggered by typing common things like "#" or "/**".

2. I'm a programmer, not a typist, so most of the time when I type I look at the keyboard and miss all those useful suggestions that unexpectedly pop up at the screen simply because I'm not looking! Of course, when I expect a suggestion to pop up, especially for long typenames and the like, I do see the list, but often much earlier than expected, and filled with a lot of Autotext suggestions that I'm not interested in at all. Waiting for the right suggestions to be presented is sometimes a game of chance, and, as a result, I sometimes need to type a lot more of the actual symbol than I'm comfortable with.

3. Invoking autotext entries that refer to 'selected' text is somewhat awkward. You need to select something, then shift-rightclick the selection. Then select 'Insert Autotext', then an entry from a longish list of suggestions. There's various problems of usability I see with this approach:
- There's too many single steps involved.
- The list of autotext entries is quite long, and not all entries in this submenu show what exactly they produce. There's not even a preview, so unless you're already familiar with the autotext entry you're looking for, you have to go trial and error. The description (if present) isn't shown either.
- If you add more custom autotext entries, the submenu gets bigger, along with the above problem.

4. In spite of various improvements the autotext editor is still a bit clumsy to use. Here are some issues that I have and which, I think, shouldn't be too hard to improve:
- Calling up the autotext editor takes too many steps for my taste. I'm not even calling it up a lot to edit, just to look up what a certain entry currently is defined like. How about adding a command to open it that I can assign a key to?
- The list of entries is too long to comfortably navigate. I'm missing ways to filter that list, introduce more (user defined) subgroups, or just incremental search.
- The editor window could use a few improvements. I'd suggest a preview (divided into 'before' and 'after' view), and I would very much like a suggestion list popping up whenever I type '$'. (IIRC there's already a case for the latter)

Regarding item 3 above, I'd suggest to design a dialog box, similar to the one turning up when you use autotext with parameters. Assigning a key to opening that dialog would reduce it's invocation to a minimum. It could present a list of existing autotext entries that use selected text (just like the submenu currently presented, but not limited in width or length - it could even provide incremental search or filtering). Once the user selects an entry, the dialog could show the entry's description and maybe even a preview.

Hope this helps,
Stefan
Go to Top of Page

gosh
Junior Member

14 Posts

Posted - Jul 02 2007 :  2:23:20 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

You seem to be suggesting the current autotext system is to complicated, since people are not really using it.



It isnG??t too complicated to create autotext entries. That is very easy. It is too complicated to use it. This will not make it harder to use it, it will make it much simpler to use.
LetG??s say that you will add functionality that the developer can open a window in debug when watching a variable, if it is a string the developer could test this string if it is one SQL select string against the database.
Parameters used to connect database is added to a textfile in project, and you could create functions connecting database and execute a SQL query. Maybe .NET developers will like that.
If you add the JScript engine MS uses it will be possible to create very intelligent functionality. And it is easy to add this.

Edited by - gosh on Jul 02 2007 2:25:01 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 02 2007 :  3:35:24 PM  Show Profile  Reply with Quote
gosh I don't understand what you are talking about here. Perhaps I am not thinking big enough. sl@sh is at the "how do I find an item in the tree view" level of detail, while I am not sure what you are picturing here.

I have never triggered a SQL prompt / query from inside the IDE. When I have connected to a SQL database it was a MySQL database sitting on a UNIX server, so I had the SQL command prompt in a dumb terminal window totally separate to the IDE. So I don't immediately have the correct mental image in my head for what you are talking about here.

I assume you are talking about using autotext in something other than the IDE editor, instead in some form of SQL interface window inside the IDE.

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

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 02 2007 :  4:18:06 PM  Show Profile  Reply with Quote
sl@sh thank you for this!

It is going to take a little discussing, but I can see a new FAQ or two, something of a "beginners guide to autotext" needing to emerge from all of this.

quote:
Originally posted by sl@sh

1. The amount of predefined autotext entries that come with VA is already intimidating. They might be meant to be useful, but I never really took the time to check them all out. The entries I know most about are those that are triggered by typing common things like "#" or "/**".


Personally I long ago deleted 95% of them, since they were not helping me. The idea is to produce a set that should be useful to lots of people, but this makes it overly large for any one person. It is supposed to serve as a starting point, rather than an official "you must use this" list, but we have obviously not communicated this clearly (or at all?) to people.


quote:
Originally posted by sl@sh

2. I'm a programmer, not a typist, so most of the time when I type I look at the keyboard and miss all those useful suggestions that unexpectedly pop up at the screen simply because I'm not looking! Of course, when I expect a suggestion to pop up, especially for long typenames and the like, I do see the list, but often much earlier than expected, and filled with a lot of Autotext suggestions that I'm not interested in at all. Waiting for the right suggestions to be presented is sometimes a game of chance, and, as a result, I sometimes need to type a lot more of the actual symbol than I'm comfortable with.


I see what you mean here. I see two obvious problems here. You mainly looking at the keyboard is problem number 3, but there is not much we can do about this one for the moment

The autotext suggestions appearing and then disappearing without being used, or useful, is partly down to the simple size of the list of possible shortcuts, it is to long, so you end up largely not using it.

When typing long typenames you are actually after a suggestion listbox (question mark icons) which is a separate feature. The problem here is that they appear when they think they will, since it is based on VA's best guess, based on what you have been typing, etc. Here the solution is to stop typing and press CTRL-SPACE to force a completion listbox. If you have:

VA Options -> Advanced -> listboxes -> allow acronyms
VA Options -> Advanced -> listboxes -> allow shorthand

turned on then with practice (this does take time to get used to, and a change of typing habits) you can narrow down the list and get the item you want very quickly, with very limited typing.

For the suggestion lists I personally keep:

VA Options -> Advanced -> suggestions -> Include bits of code from surrounding lines

turned on, and keep an eye on the screen when ever I type a long symbol, knowing that if I have recently used it, or it is used locally VA is good at guessing what I want and suggesting it. This is not fool proof, but it does work quite well. I fall back to CTRL-SPACE when ever the suggestion I was does not turn up quickly enough for my tastes.


quote:
Originally posted by sl@sh

3. Invoking autotext entries that refer to 'selected' text is somewhat awkward. You need to select something, then shift-rightclick the selection. Then select 'Insert Autotext', then an entry from a longish list of suggestions. There's various problems of usability I see with this approach:
- There's too many single steps involved.
- The list of autotext entries is quite long, and not all entries in this submenu show what exactly they produce. There's not even a preview, so unless you're already familiar with the autotext entry you're looking for, you have to go trial and error. The description (if present) isn't shown either.
- If you add more custom autotext entries, the submenu gets bigger, along with the above problem.


The number of steps is quite easy, IF you already know the answer
Select the text and press the toolbar button for "Insert Autotext", which should be present on the VAssistX toolbar by default.

Alternatively bind a keyboard shortcut to the command VAssistX.AutotextInsert. Both methods go directly to this list. Only autotext items that use $selected$ will be listed, which helps to keep the list fairly short.

It does sound like it would be useful for you to work through the autotext list and delete out the items that you do not use, which would make for a much more streamlined experience.

You are quite right about the level of information though. I have put in a feature request to show the description (if given) or the code as a tooltip for the current item:

case=7428


quote:
Originally posted by sl@sh

4. In spite of various improvements the autotext editor is still a bit clumsy to use. Here are some issues that I have and which, I think, shouldn't be too hard to improve:
- Calling up the autotext editor takes too many steps for my taste. I'm not even calling it up a lot to edit, just to look up what a certain entry currently is defined like. How about adding a command to open it that I can assign a key to?
- The list of entries is too long to comfortably navigate. I'm missing ways to filter that list, introduce more (user defined) subgroups, or just incremental search.
- The editor window could use a few improvements. I'd suggest a preview (divided into 'before' and 'after' view), and I would very much like a suggestion list popping up whenever I type '$'. (IIRC there's already a case for the latter)


To get to the autotext editor you can click on the Insert Autotext toolbar button, and at the bottom of the menu that appears select "Edit Autotext..."

Alternatively bind a keyboard shortcut to the command VAssistX.AutotextEdit - this was only added in 1555 so it is very new.

Once you get into the autotext editor I myself asked for some way to filter / search the tree a while ago. Great minds think alike

case=606

Inside the edit window, right click, select "Insert" and then you can pick the $foo$ token that you want to insert. They are listed by groups, to keep the list from being to long. Not quite as impressive as a list that appears as you type, it is true, but easy to use and it works well.

I am not sure how the preview would work, since several of the $foo$ tokens are situation specific. There are ones for file name, $clipboard$, all of the refactoring specific ones, and of course $end$.

There is a preview of sorts when entering an autotext item that prompts you for a value.


quote:
Originally posted by sl@sh

Regarding item 3 above, I'd suggest to design a dialog box, similar to the one turning up when you use autotext with parameters. Assigning a key to opening that dialog would reduce it's invocation to a minimum. It could present a list of existing autotext entries that use selected text (just like the submenu currently presented, but not limited in width or length - it could even provide incremental search or filtering). Once the user selects an entry, the dialog could show the entry's description and maybe even a preview.


Strange you should suggest this

case=607

You are the only other person to have suggested this since I put in that case. Clearly an "obvious" idea

Hopefully this helps a little. Certainly you have given me something to think about.

Thinking about FAQ's and autotext I already added this one:

http://docs.wholetomato.com?W264

but it is no help at all for any of your points here. Instead it is supposed to help with a fairly specific situation.

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

sl@sh
Tomato Guru

Switzerland
204 Posts

Posted - Jul 03 2007 :  08:00:33 AM  Show Profile  Reply with Quote
Thanks, feline, for your detailed answer. Some of the things you suggested I wasn't aware of, so that surely helps (and, besides, if I hadn't already known you would be looking at it that closely I might not have bothered to write such a lengthy posting - yes, you can take this as a compliment )

As to the 'Autotext starting point': have you considered that trimming that list down to a usable size does require looking at, and understanding them first? Looking only at the list already makes people hesitate at that task. Also, I'm a bit conservative at times (never thought I would be, had you asked me 20 years ago, but here I am), and am reluctant to delete stuff when I don't know a considerably easy way to get it back. If there is such a way short of reinstalling VA, I am not aware of it.

I would much prefer a list of basic entries that most users will find useful - which I think would also make them more interested in working with autotext to start with, plus a way to add items from a list. This would be much easier on the user than asking him to delete stuff.

quote:
The number of steps is quite easy, IF you already know the answer
Select the text and press the toolbar button for "Insert Autotext", which should be present on the VAssistX toolbar by default.

Gaaah, the answer was right in front of me and I missed it! *takes whole tomatoes from his eyes*

Thanks for pointing this out, as well as the new command for AutotextEdit, wasn't aware of that either.

I *am* aware of the context menu within Autotext Editor, but am not very fond of it - I prefer keeping my hands to the keyboard (again, the not being a typist issue...). Yes the context menu helps, especially when I'm not sure of the predefined symbols that exist, but the subdivision into a two-step menu also means I might have to look into various submenus sometimes, just to find the one I am looking for If it was possible to get a suggestion list box during typing the resulting list would be trimmed down to just a few entries quite fast - this would immediately solve the 'looking for symbol' issue, unless you don't know what letter(s) it starts with (but then you're in trouble anyway)
Go to Top of Page

gosh
Junior Member

14 Posts

Posted - Jul 03 2007 :  10:05:58 AM  Show Profile  Reply with Quote
quote:
Originally posted by feline

I have never triggered a SQL prompt / query from inside the IDE.


You can't do that now

quote:
Originally posted by feline

gosh I don't understand what you are talking about here.

The "Text Visualizer" in VS 2005 gives some hints about what I mean.
That is invaluable tool for me. I remember when you need to either create code to trace long text or recalculate the pointer in order to check text that wasnG??t visible in windows for the debugger. Also checking for valid XML format, I use a lot of XML formatted text in the application now.
Database applications are very common so if there was functionality to check things in the debugger then I think that would be very helpful.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 03 2007 :  11:53:58 AM  Show Profile  Reply with Quote
gosh I am now totally confused. You appear to be talking about checking the state of variables while debugging / stepping through your program.

I agree that this is a very important thing, but what does this have to do with autotext?

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

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 03 2007 :  12:17:17 PM  Show Profile  Reply with Quote
quote:
Originally posted by sl@sh

Thanks, feline, for your detailed answer. Some of the things you suggested I wasn't aware of, so that surely helps (and, besides, if I hadn't already known you would be looking at it that closely I might not have bothered to write such a lengthy posting - yes, you can take this as a compliment )


Thank you I have strong views on the level of support people should get, and try to live up to my own high standards.

I know exactly what you mean about not wanting to delete the default autotext entries, and the "what if I need them later" feeling.

I am not sure if you know where the autotext entries are stored or not. They are simply stored in a "plain text" file. It is plain text, but it has some odd characters in there, that are used to mark the end of each record. See here for the basics:

http://support.wholetomato.com?W434

When you install a new build of VA the current default autotext, which hardly ever changes, comes with it. It looks like this is saved to the directory:

C:\\Program Files\\Visual Assist X\\Autotext\\Latest\
So all you need to do to retrieve one or more entries is open your personal autotext file and the latest full file and copy across the entries you want.

I am starting to think that what we need to do is produce a "slimline C++" autotext file for people to download and use as an alternative start point. Clearly the "here is everything" file is not helping everyone. The trick will be deciding what makes sense in a "slimline C++" autotext file.

For now I would recommend the following. Backup your current autotext file, which is probably:

C:\\Documents and Settings\\%USERNAME%\\Application Data\\VisualAssist\\Autotext\\cpp.tpl

and then go into the autotext editor and just delete everything that does not seem useful. Be fairly ruthless, and then add things back in again over time if / when you want them.

If you decide you do not like the results just copy your backup back into place. You can edit the autotext file quite happily with an external editor while the IDE is running, so simply replacing the file should be no bother.


Suggestions inside the autotext editor, you make a good case here. The first counter argument is "prompts", for example the autotext entry for dynamic casting:

$New_type$ *$New_pointer$ = dynamic_cast<$New_type$ *>($Cast_this$);
if($New_pointer$)
{
	$end$
}


where all of the $foo$ tokens are there to prompt the user to fill in values, rather than inbuilt ones.

At this point in time we are probably better of focussing on other improvements to VA. Improving autotext, I suspect tooltips on the autotext listboxes when typing would be a lot more useful that suggestions inside the editor, since you spend much more time using autotext than you do editing it.

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

gosh
Junior Member

14 Posts

Posted - Jul 03 2007 :  12:23:03 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

I agree that this is a very important thing, but what does this have to do with autotext?


Nothing, what I meant was that if you add some language engine to autotext then this engine could be used in other areas too. By doing that increasing the value of adding it.

I am just trying to helping out here, to make the product better. Skip it if you don't like the idea

Edited by - gosh on Jul 03 2007 12:26:09 PM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Jul 03 2007 :  12:34:56 PM  Show Profile  Reply with Quote
I sort of understand now. The idea makes sense, and does have an appeal, but at the moment we need to focus on helping people make more use of our existing autotext features, and general bug fixing.

Look at the IDE's own macro system. From what I see here hardly anyone uses it. This is not a good advert for "add a language and people will come"

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

kevinsikes
Tomato Guru

USA
271 Posts

Posted - Jul 03 2007 :  4:09:35 PM  Show Profile  Reply with Quote
Hello gosh,

Thank you for your suggestions. As an automation nut, I think it would be great to script AutoText, but we must weigh the cost of development against the benefit of this feature. As I see it, this can be implemented in one of two ways:

1) Add a scripting engine to Visual Assist X.
2) Expose Visual Assist X AutoText variables to Visual Studio macros through the automation object model.

While each method requires nontrivial development effort, the latter method appeals to me because users can create macros in a familiar environment without learning the intricacies of yet another program's internal script processor. This may also appease the occasional requests we receive for a VA X API.

A sample Visual Studio VBScript macro would look something like this:

    Sub VaxMacro()
        Dim strName
	strName = VAX.AutoText.ResolveString("SymbolName")
        ' or better yet, a deeper object model
	' strName = VAX.Parser.Scope(DTE.ActiveDocument).Name
        DTE.ActiveDocument.Selection.Text = "// " & strName & StrDup(80 - Len(strName), "-") & vbCrLf
    End Sub

Would this method accomplish your goals? I'm happy to discuss this at our next dev meeting, but I'd like to get an idea of how many customers would find this useful first.

Kevin Sikes
Infotainment Platform Design Engineer
Ford Motor Company
Go to Top of Page

gosh
Junior Member

14 Posts

Posted - Jul 03 2007 :  4:36:54 PM  Show Profile  Reply with Quote
quote:
Originally posted by kevinsikes


1) Add a scripting engine to Visual Assist X.
2) Expose Visual Assist X AutoText variables to Visual Studio macros through the automation object model.

While each method requires nontrivial development effort, the latter method appeals to me because users can create macros in a familiar environment without learning the intricacies of yet another program's internal script processor.

if that is possible it would be great :-)
I have only made addins for Visual Studio 6.0 and don't know what is possible now. Accessing VAX from macros and beeing able to run macros from the autotext would do just fine!


quote:
Originally posted by kevinsikes


This may also appease the occasional requests we receive for a VA X API.

A sample Visual Studio VBScript macro would look something like this:

    Sub VaxMacro()
        Dim strName
	strName = VAX.AutoText.ResolveString("SymbolName")
        ' or better yet, a deeper object model
	' strName = VAX.Parser.Scope(DTE.ActiveDocument).Name
        DTE.ActiveDocument.Selection.Text = "// " & strName & StrDup(80 - Len(strName), "-") & vbCrLf
    End Sub

Would this method accomplish your goals? I'm happy to discuss this at our next dev meeting, but I'd like to get an idea of how many customers would find this useful first.


YES!! :-)

I don't use macros in the VS now because it is to difficult too remember them. Narrowing what the programmer needs to remember is the key I think.

Edited by - gosh on Jul 03 2007 5:29:14 PM
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