Sorry for my dumb questions but I'm new to studio 2005 and I'm not sure how to go about this. I've been using Eclipse 3 for several month now and I have gotten used to some usefull shortcuts that I would like to implement for studio and put them out there as free addins if they don't exist.
I'm trying to focus in two addins:
1) Studio has a feature called "go to definition" under its right menu click that when you click on it or press F12 it goes to the definition of whatever it is that you are on top of. I would like an add in that mimics this same functionality but it gets trigered when you click Ctrl+Click not just when you click F12.
2) My second add in might be slightly more complicated but I'm up to the challenge. I would like an addin that automatically imports or cleans my imports when I make use of a new class. For example: I have a class and I want to start using ArrayList in my class. I want my add in that when I type Ctrl+Shift+O to automatically import System.Collections . So basically it would add a line on the top of the class that says
using System.Collections; |
If anyone knows of any add in that does this I would love to get but if not I would love to make it and put it up for who ever whants it.
Sorry for the long post.
Abe

Help with a simple addin.
runar lyngset
Is ReSharper from JetBrains an option for you The ReSharper features : http://www.jetbrains.com/resharper/features/index.html and the ReSharper feature for 2) http://www.jetbrains.com/resharper/features/codeAssistance.html. For 1) : in Visual Studio 2003 you can edit the keyboard mapping scheme in Tools - Options - Environment - Keyboard. Editing the "Edit.GoToDefinition" shortcut should do it.
Regards,
Bart
吴培
I looked into #1 way back when my DPack collection used be a set of add-ins. The conclusion I came to was it'd very difficult to implement. Hope you figure it out.
As far as #2 goes, DPack offers something in between. It has a feature called Framework Browser. You basically call up a dialog, which caches all FCL types very first time it's used. You'd use that dialog to find a type you’re looking for (ArrayList in your example). When you select a given type, its namespace is copied to the clipboard and corresponding assembly is referenced as well. At that point you can paste it in the using section. The reason it doesn't do that (pasting) automatically is because (a) using syntax differs for various languages and (b) afaik, code model doesn't expose using statements in any form or fashion.
Didn't mean to turn a reply to self-promotion. Just wanted to offer you few more options.
gjwehnes
Hi Abraham,
For your question #1, as Bart has pointed out, you can cutomize the ketboard shortcut in the Tools|Options dialog. You can also save these mappings by exporting them to a vssettings file (Tools->Import and Export Settings...). This file then can be imported also for another Visual Studio install if you want.
For question #2, Visual Studio currently already provides a simple mechanism of creating a using statement. For your example, if you had the statement
private List<string> mylist;
then having hte cursor on the List, and using hte keyboard shortcut Shift+Alt+F10, you should be able to see two options either to put a using statement as you would like or to fully qualify the class in place.
You can also do this from the UI. For the List class, there will be a small red rectangle at the end of the class name (List<string>). If you hover over that you should be able to see a small arrow for a drop down. Clicking the drop down will provide the same options as the keyboard shortcut.
Thanks,
Chetan