Fortran Code Nav


Download FortranCodeNav for Visual Studio: 2008 / 2010 / 2012 / 2013 (latest: 11-nov-2013)

Unknown macro: {html}

<iframe width="1280" height="720" src="http://www.youtube.com/embed/ApumbtDAqMM?rel=0" frameborder="0" allowfullscreen></iframe>

Make sure to select the highest resolution (720p) when watching the video. You can find the resolution settings (cog icon) in the bottom right corner.

About

Fortran CodeNav is a Visual Studio 2008/2010/2012 Add-in which helps you to navigate through Fortran 90 code (or older). It contains a rudimentary parser to generate a code structure representation which is used to provide jump-to and search functionality with limited context-awareness. Additionally it provides scope-aware code completion (Intellisense).

It currently supports the following code elements/blocks:

  • modules
  • subroutines
  • functions
  • interfaces
  • types

Installation

  1. Create the 'Addins' folder under 'My Documents\Visual Studio 20##\' if it does not exist yet.
  2. Place the contents of the installation package in the 'Addins' folder. (such that the FortranCodeNavAddIn.AddIn file is directly in the 'Addins' folder)
  3. Run Visual Studio.

The software is now ready to be used. If you encounter any issues during installation, please read the section 'Optional Installation Steps' in this file.

Usage

Fortran CodeNav is completely controlled using keyboard shortcuts and has no options dialog. Commands typically only work when you have a f90 document view open in Visual Studio.

The definition of 'member' is: modules, subroutines, functions, interfaces and types.

Commands:

Ctrl-Q

Jump to declaration of member under (text) cursor

Alt-Q

List usages of element under (text) cursor

Ctrl-Space

Auto-complete statement, or show completion hints in list (Intellisense)

Ctrl-Alt-Q

Search all code elements in solution

Ctrl-Shift-Q

Search/list all members in current file

Ctrl-Shift-Alt-Q

Search all files in solution

Shift-Alt-Q

Synchronize solution explorer with currently open file

Alt-F1

Open an about / debug dialog (also available from Tools menu)

The search dialog uses two types of text searches. It uses a case-insenstive 'starts-with' search and a second pattern search which takes the casing of the search term into account (see section 'Pattern Search'). Any member matching either search method is shown as search result.

For ReSharper users: Fortran CodeNav does not use ReSharper, so a ReSharper installation is not required. The shortcuts however were chosen to have minimal conflict with the ReSharper IDEA keymapping, for those users who have both installed.

Change Keyboard Shortcuts

Should you really wish to change the shortcut keys used by FortranCodeNav, you can do so in Visual Studio, under Tools->Options and then Environment->Keyboard. In the search box, type in FortranCodeNav and the applicable commands and their current shortcuts are listed. Note that this is not recommended and the shortcuts may be reset after installing a new version, or resetting the addin.

Optional Installation Steps & Troubleshooting

In case the Fortran CodeNav add-in does not appear to work at all, please verify 'Fortran CodeNav' is listed in Visual Studio under 'Tools -> Add-in Manager' and its checkbox is checked, along with the checkbox for 'Startup'.

If you had a prior version of Fortran CodeNav on your system, it may help to run 'reset_fortran_codenav.bat' (which should be present in the Visual Studio AddIn directory) to re-register the addin with Visual Studio. After running this script, please make sure the AddIn is enabled again in the Add-in Manager.

If you have problems with keyboard shortcuts not working, you may want to reset your Visual Studio keyboard shorcuts under Tools->Options->Keyboard and restart Visual Studio. Using Alt-F1, or under Tools->Fortran CodeNav, you can see any keyboard conflicts.

In case of other problems, such as certain files not appearing in the search results, you can have a look at the log file, located at: '%TEMP%\FortranCodeNav.log'. Most likely there is a parsing issue, in those cases please include the logfile and the offending f90 file in your error report.

If you get the error "The Add-in 'Fortran CodeNav' failed to load or caused an exception. Would you like to remove this Add-in?" with error code "80131515", this means Windows has marked the AddIn files are coming from an external untrusted source. You can resolve this situation by manually selected 'Unblock' in the properties window (right click->properties) of each file part of the Fortran CodeNav AddIn (or on the zipfile before unpacking it).

Pattern Search

Pattern search is a method to quickly filter the results without typing out the entire search term. In the pattern search all uppercase letters are considered to be followed by any number of other letters while all lowercase letters must be an exact match.

So the search term 'HL' would match 'hello' whereas the search term 'hl' would not. Expressed as a (case insensitive) wildcard pattern:
hl = 'hl'
HL = 'h*l*'

The pattern search is useful to quickly find members by their acronym:
Sobek = SBK
boundaryconditions = BouCon
wave_to_flow_status = WToFS

Note for ReSharper users: unlike ReSharper, Fortran CodeNav does not take the casing of the member names into account.

Page visits:

Unknown macro: {tracking-info}

home

2008:

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

2010:

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

2012:

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}

+

Unknown macro: {tracking-info}
Unknown macro: {tracking-info}
  • No labels

2 Comments

  1. In Visual Studio 2015 I wasn't able any longer to use Addins.

    CodeNav can however be installed by browsing in the Visual Studio 2015 taskbar

    Tools/Extensions and Updates / Online / CodeNav 

    and press install there.