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
 automatic using namespace;
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

meissnersd
Senior Member

34 Posts

Posted - Sep 19 2008 :  10:05:01 AM  Show Profile  Reply with Quote
My buddy is a fan of ReSharper and we were comparing that with Visual Assist X. Kind of a "who's is better" session

Anyway one feature he hit me with is if a C# type name is not recognized and if it is a well known type but not imported by the using block, when his cursor is on the offending typename he gets a little dropdown that allows the
using namespace;
to be automatically added at the top.

Example:
if I just type
Thread t = new Thread( mymethod );
it would notice that System.Threading namespace needs to be added to the using block at the top and give you a fast control to just add it.
I think it also adds System assemblies to the references section as needed...

It would have to be sophisticated since simple types can easily collide in namespaces, (which is the whole point of namespaces) but you can give the user several choices in a dropdown, similar to when they start type an identifier with multiple matches . And it would have to be user driven. The system guessing wrong and automatically inserting stuff would be annoying.

Karl



meissnersd
Senior Member

34 Posts

Posted - Sep 19 2008 :  10:12:07 AM  Show Profile  Reply with Quote
Actually another "nice to have" feature is that is highlights using name spaces with are not needed by the code in the file.
It is nearly such a big deal though.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Sep 22 2008 :  10:58:37 AM  Show Profile  Reply with Quote
VA has this feature in C#. You should see listbox "suggestions" appear as you type so long as you have:

VA Options -> Advanced -> Refactoring -> Include refactoring suggestions in listboxes

turned on.

Highlighting unused using namespace lines is not something we currently do.

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