T O P I C R E V I E W |
jmatthias |
Posted - Nov 01 2007 : 2:42:50 PM There is one feature missing from VisualAssist that I have thought about for years.
Regularly, I need to find out which file a data type is defined in. This is usually a header file. When you hover over a data type, it would be great if you could append the name of the header file to the end of the tooltip e.g 'class CFoo (Foo.h)'.
Currently I have to go to the class definition (Alt G) and now I have a document open that I don't want. It doesn't sound like much but it's pretty annoying when you consider that VisualAssist knows the name of the header file that defines the class.
To go one step further you could add a context menu item that will add the include statement at the top of the file e.g. #include "Foo.h". That would be excellent.
Thanks - Joel |
4 L A T E S T R E P L I E S (Newest First) |
support |
Posted - Jan 27 2009 : 10:27:50 PM case=226 is implemented in build 1715 Hover over an unrecognized symbol and choose "Add include xxxx" from the refactoring context menu.
|
feline |
Posted - Nov 05 2007 : 08:29:11 AM *nods* this is basically what case=226 describes. |
jmatthias |
Posted - Nov 01 2007 : 10:39:22 PM Hi,
The use case is this...
I need to use the class CFoo in a file and it is not used anywhere else in that file. In order to use CFoo I need to include "Foo.h". But maybe the class CFoo is defined in Bar.h for some reason but I don't remember this, so I have to go to the class definition so that I can determine that it is defined in Bar.h. Then I go back and add #include "Bar.h". I would like a VA command that allows me to select CFoo and execute 'Add Defining Include File'. VS would then put #include "Bar.h" at the bottom of the include file list for me. It would be a little thing that would increase productivity for me when writting new code in a project with a lot of files that does not adhere to the one class per file and name the file the same as the class convention.
My feature submission simply gave two possibilities and if VS implements the second option (described above) then the first feature is unnecessary.
Joel |
feline |
Posted - Nov 01 2007 : 8:12:49 PM Do you only want this information to help with adding #include lines? We are considering adding a feature where VA will suggest / add missing #include lines:
case=226
Outside of this, I am not quite sure why you would care which file a symbol is defined in. I can understand that the full file path might be useful, since this will often tell you something about the library the file belongs to, but I don't quite see the usefulness of the file name on its own. |