Goto-Line command

Germany

One useful feature in the Multi-Language Add-In is the Goto Line button Image on the toolbar.

When you can see a string in the source code editor, you can locate the string in the Add-In's source code grid by:

  • placing the cursor somewhere within the string and
  • clicking on the Goto Line button.


I have made two extensions to this feature in the latest version:

  • support in ASP/HTML files
  • access via the context menu


To be honest, I had forgotten that this feature was disabled in ASP files. Recently I noticed this and decided to add it immediately. It works identically in ASP files to source code files, so there is not much to describe.

Even when I first implemented the Goto Line command, I knew that it would be appropriate to put it in the context menu. Since I had never added an item to the context menu, I decided to do it later, which I have, but it ended up being a very long time later.

Recently I made exactly the same change to the VB6 Add-In and it was pathetically easy. Since I was extending this feature anyway, I figured it couldn't be too difficult to add a command to the context menu in Visual Studio either. Adding a command was in fact quite easy. Putting an icon next to it was unreasonably difficult. (Given previous experience with icons in Visual Studio, that didn't surprise me.)

So now there is a new command in the context menu in a source code window, as shown in the following screenshot.
Image
It works identically to the Goto Line button on the toolbar (which I also circled on the screenshot). Simply click in the string in the editor window using the right (or secondary) mouse button, and then select Show in Multi-Language from the context menu.

If you click somewhere which is not in a string, then the Add-In will show the error message Selected line does not contain a string.

Phil