alt+g in Comments

If you don’t read our build change history page, you might miss some small gold nuggets.  For example, back in build 1734, we added an enhancement to our goto command (alt+g) so that it operates within comments.  The accuracy of goto within comments depends upon uniqueness of identifier name and context of the comment, and there will be plenty of cases where it can’t figure out what you want it to figure out, but it works enough to bring it to your attention.

Open File in Solution tip

I was using the OFIS (Open File in Solution) dialog the other day and it occurred to me that I use some features in it that might not be so apparent to users that didn’t actually write the code for it.  As an aside, this feature was formerly known as Open File in Workspace (or OFIW) before Workspaces were replaced by Solutions in Visual Studio.NET.  It took us a few years after the release of Visual Studio.NET to get around to updating the name (I supposed we had to accumulate a few “What’s a workspace?” queries from new users before making the update).

At any rate, here’s a tip for the OFIS dialog:  you can use the Up and Down arrow keys as well as the Page Up and Page Down keys to navigate up and down through the file list while focus is still in the edit control.  No need to tab around or click in the list to change the selection after having typed in the edit control to filter the list.

This also applies to the Find Symbol in Solution (FSIS) dialog.

Add Include

We recently released a feature for C/C++ that has long been requested: Add Include.  A lot of work had previously been put into our #include completion listboxes – but that work is moot because now you don’t need to type #includes directives by hand.

The Add Include command is available when you place the caret on a symbol which is declared in a header file that is not directly included in the active file.

If the header that the symbol is defined in is already directly included in the current file, the command is disabled.  Otherwise, it is enabled – even though the dependency may already be satisfied by another directive that itself #includes the header.  This is by design as many programming style guidelines mandate explicit inclusion of declarations (as opposed to happenstance or indirect inclusion).

For types and functions, Add Include straightforwardly adds an include directive for the header in which the type or function is declared.  For variables that are declared in the active file, Add Include acts on the type of the variable (no need to go to the declaration of the variable to add the include for its type).  For variables that are not declared in the active file, Add Include operates in the same way as it does for types and functions.

While the command is available in the usual VA Refactor menus, the easiest way to invoke it (at least for keyboardists) is to place the caret on a symbol and press alt+x, r, n.

VA Snippet Tip #1

VA Snippets support a number of reserved strings that enable text substitution when inserted into the text editor.  For example, any occurrence of $selected$ in a snippet is replaced with the actual text editor selection at the time the snippet was invoked.

As noted in a previous post, VA Snippets support shortcuts.  You wouldn’t want to use the $selected$ reserved string with a snippet that you want to invoke via a shortcut since typing the shortcut will overwrite your text selection (in this case, occurrences of $selected$ would simply be removed from the snippet when it is inserted into the text editor).

Instead of using the $selected$ reserved string, use $clipboard$.

Now you can use a shortcut to invoke the snippet with one small extra step:

  • Make your text selection
  • Copy (or Cut)
  • Type the shortcut and accept the snippet suggestion

Methods in File

Here’s a quickie…

When you are in a source window, pressing Alt+M displays the VA X Methods in File list.

Did you know you can filter the list by typing after the list is displayed?  Yeah, most people know that.

Did you know you can filter using multiple strings as in the OFIS and FSIS dialogs?  You can, as of build 1645 (2008.07.10).  The filter supports the use of ‘-‘ to exclude items.

Support for Incomplete Solutions

Several members of the Whole Tomato Software crew attended the Seattle XNA Gamefest held back in July.  It was a great opportunity for us to get face time with quite a few of our customers.  We received a lot of feedback some of which has bubbled up in VA X 10.5.

We learned that many Visual Studio users only work in the IDE for editing and debugging but not for doing builds.  Because it is not being used for builds, people are working with solutions that are empty or are incomplete, adhoc file collections.

To address editing and navigation productivity in these scenarios, we have added optional support for directory based file discovery. If enabled, VA X will scan for files that are in the same directory as any opened file.  Newly discovered files (those which are not already explicitly listed in the solution) are treated as part of the solution in the eyes of VA X.  The files are listed in the VA X file lists (OFIS and VA View) and symbols declared in them are listed in the VA X symbol lists (FSIS and VA View).

File discovery is controlled via two settings on the Projects|File Handling node of the VA X Options dialog.  The first setting enables this support for only when the loaded solution is empty.  The second enables it independently for when files are present in the loaded solution.  The first setting is enabled by default whereas the second is disabled.  If you use partial solutions as described above, then we recommend enabling the second option.

Versionitis (of the host environment)

Yesterday, I posted about a new feature in VA X 10.5.  I failed to mention that the new feature is only supported in Visual Studio versions starting with Visual Studio.NET (vs2002+).  While we continue to support VC++ 6, not all features we introduce going forward will be available in that environment.  That said, we don’t currently have any plans to end VC++ 6 support.

For those of you still using VC++ 6, care to share why?  Are you still using the VC++ 6 compiler and libraries, or have you modified the build environment to use different tools?