Author |
Topic |
|
charfeddine.ahmed
New Member
Tunisia
4 Posts |
Posted - Nov 14 2008 : 03:34:25 AM
|
Well I just created account to be able to put my suggestion. The problem is that instead of the many number of Intellisense parsers like VAssistX product, I can't find one that really answers the very important feature I long for.
What is actually prompting me and encouraging me to post it is the fact I saw the VASnippet Editor and the very possibility that the feature can be easily added to future VAsssitX versions.
Enabling the user to define new shortcuts and make link to a custom definition of what the generated code would be is really a very good step.
Now it suffices for me the following to reach the tremendous things I'd like to do :
First, just allow the user to define (inside the VASniipet editor) a rule of fraglmentation of the inner content of the $Selected$ var. Finally, with the aid of that rule allow him to do a much complex way of constructing the Snippet content (the thing that will replacethe shortcut) by giving access to the fragmentation result.
I explain with a very very very basic example OK ? OK : suppose I'd like to automatize the fact that always when I have a class constructor implementation, then I need to just collect the parameters and assign them to equivalent memebers :
class SomeClass::SomeClass(Type1 param1,Type2 param2..) { this->param1=param1; this->param2=param2; .. }
It would be very easy for me if I can just select the parameters list and invoke a shortcut that just inserts the set of : this->xxx=xxx;
Please can you see what I mean ? Otherwise I can send you at least 30 cases which it will be really not intelligent to ask for their adhoc individual implementation. Instead if we have this model in place, then evrything can be solved.
Looking forward to an answer from you.
Thank you in advance.
|
I love chess and I love XML files. |
Edited by - charfeddine.ahmed on Nov 17 2008 08:13:43 AM |
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Nov 24 2008 : 08:18:38 AM
|
For your specific example, picking up the function parameters, you can do this with VA's Document Method feature. Edit the Snippet to add the line:
this->$MethodArgName$ = $MethodArgName$;
which will generate the code you are wanting, which you can then cut and paste into the inside of the function body.
We are considering allowing the refactoring Snippet tokens in non refactoring Snippets:
case=3204
which might help.
It really depends on how clever you want these rules to get. It is fairly easy to think of rules that would require a programming language to support. We do not have any current plans to add a programming language to VA Snippets, after all the IDE already has a macro programming language of its own. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|