Home All Groups Group Topic Archive Search About

Refactoring code snippet

Author
20 Jun 2006 9:25 AM
Steve B.
Hello,

I've two questions about refactoring code snippets :

1. Can I add my own code snippet in the context menu (under Refactor menu) ?
2. Where can I find good tutorials ?

I especially want to create a refactoring code snippet (however I'm not sure
a code snippet is enough, I'll maybe need to create an addin) that can take
a "hard-coded" string and put it into a res files, and replace the hard
coded string by the properties generated by the res file.

Thanks for any tips.
Steve

Author
20 Jun 2006 12:17 PM
Cowboy (Gregory A. Beamer)
Yes, you can, but I have no info on how to do this. I have a clue, however.

Microsoft has released new snippets that you can download. Monitor your
machine with one of those utilities that catalogs the drive and you will see
what files it touches. In the case of snippets, I believe it is more a case
of adding to a configuration file, as the snippets are installed in a
directory of your choice.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
Show quote
"Steve B." <steve_beauge@com.msn_swap_com_and_msn> wrote in message
news:OKKAFuElGHA.4224@TK2MSFTNGP05.phx.gbl...
> Hello,
>
> I've two questions about refactoring code snippets :
>
> 1. Can I add my own code snippet in the context menu (under Refactor menu)
> ?
> 2. Where can I find good tutorials ?
>
> I especially want to create a refactoring code snippet (however I'm not
> sure
> a code snippet is enough, I'll maybe need to create an addin) that can
> take
> a "hard-coded" string and put it into a res files, and replace the hard
> coded string by the properties generated by the res file.
>
> Thanks for any tips.
> Steve
>
>
>
Author
20 Jun 2006 1:07 PM
Jim Wooley
You can find the snippet editor at http://msdn.microsoft.com/vbasic/downloads/tools/snippeteditor/.
It should include some getting started documentation to help you out. It's
not really going to do what you need (extracting code and placing it in the
resource file). You probably need to look into creating an add-in or macro
for this.

Jim Wooley
http://devauthority.com/blogs/jwooley/default.aspx

Show quote
> Hello,
>
> I've two questions about refactoring code snippets :
>
> 1. Can I add my own code snippet in the context menu (under Refactor
> menu) ? 2. Where can I find good tutorials ?
>
> I especially want to create a refactoring code snippet (however I'm
> not sure a code snippet is enough, I'll maybe need to create an addin)
> that can take a "hard-coded" string and put it into a res files, and
> replace the hard coded string by the properties generated by the res
> file.
>
> Thanks for any tips.
> Steve

AddThis Social Bookmark Button