Link Source Comments to Bug Trackers, Source Control and Documentation
How SourceLinks WorksSourceLinks scans source files for comments that match user-defined patterns, and the results are highlighted in the text editor. Double-clicking a result launches a browser or other external application with arguments based on the matched text. If an appropriate API extension is present, SourceLinks can also display a tooltip when hovering over marked text to show additional information.Search patterns are flexible and easy to configure using the SourceLinks options page. You don't need to adopt a strict or arcane syntax in your comments; SourceLinks will work with existing codebases that may contain inconsistent naming conventions. ConfigurationConfigure new profiles or edit existing ones by opening Tools | Options | SourceLinks. Enter keywords used to trigger a match. If there are multiple keywords, separate them with semicolons. Suffixes are optional; multiple suffixes do not require a delimiter. The value dropdown controls what text to match (either numeric only or alphanumeric string) following the keyword and optional suffix. The match pattern is <keyword> [suffix] <value>, where suffix is optional. The behavior dropdown controls whether a web page launches in an internal or external browser, or a command is executed. The URL/Exe field contains the page or command to launch; use %s as a placeholder for the matched value. The Plugin dropdown is explained on the API extensions tab.![]() Click screenshot to view larger options dialog image
To change the colors used to highlight matches, open Tools | Options | Environment | Fonts and Colors. Find the "SourceLinks Marker" item, and adjust the Item Foreground to change the marker edge color, or the Item Background to change the marker fill color.
Integration Samples to Get You StartedFor training purposes, SourceLinks integrates with the Whole Tomato discussion forum by default. It searches in comments for keywords "topic" or "TOPIC_ID" optionally followed by ":" or "=", and then a topic number. For example, this configuration will find "topic 1000", "topic: 1000", and "TOPIC_ID=1000". In the text editor, matches are boxed, and double-clicking the marked text will launch your default browser and open the corresponding forum topic. See the configuration section above for information on setting up your own integrations.API ExtensionsSourceLinks API Extensions allow third-party systems to display custom tooltips when the user hovers over marked text in the editor. For instance, the status of a bug can be displayed in a tooltip when hovering over marked text associated with a bug tracking profile. An API Extension provides the plumbing between SourceLinks and the bug tracking system to populate the tooltip. Available API Extensions are displayed in the Plug-in drop-down list in the SourceLinks options page.To write your own SourceLinks API Extensions, refer to the installed sample project: For Windows 7/Vista: C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\10.0\Extensions\Whole Tomato Software\SourceLinks\<2.x.x>\PluginExample For Windows XP: C:\Documents and Settings\%username%\Local Settings\Application Data\Microsoft\VisualStudio\10.0\Extensions\Whole Tomato Software\SourceLinks\<2.x.x>\PluginExample FogBugz API Extension IncludedSourceLinks includes an API extension that provides tooltips for FogBugz from Fog Creek Software. To use this API extension, navigate to Tools | Options | SourceLinks and click FogBugz in the profile list. Make sure that "FogBugzPlugin" is selected in the Plug-in drop-down list, and click the "Configure" button. Enter your FogBugz server information and credentials, and click "Log On". This API Extension requires FogBugz version 5.0 or later with the FogBugz API installed on the server. |
Whole Tomato Software is the maker of Visual Assist X, a powerful development add-in for Visual Studio. » Learn more ![]() |
FogBugz is a trademark of Fog Creek Software, Inc.
Visual Studio is a registered trademark of Microsoft Corporation in the United States and/or other countries.