Opening a local file from some comment text

I can successfully call external URLs from comment tags thanks to the following:
https://www.jetbrains.com/help/resharper/Navigation_and_Search__Navigating_Between_To_do_Items.html#linking-to-do-items-to-external-resources

But is there a way to do the same with local file paths? Let me explain my case, which might not be uncommon: in some comments, I have a relative file path to some documentation HTML file located in the project tree.

Let's say I have the source file:

d:/project/source/foo.cpp

and I have this comment:

// DOC: ../doc/rendering.html

I wish I could Control-click (or whatever) to open the file

d:/project/doc/rendering.html

I can do this with Visual Assist and wish I could do it with Resharper++.

4 comments
Comment actions Permalink

Hello,

ReSharper already allows navigating to local files but at the moment only from Doxygen-style comments where syntax allows a file path, e.g.

/// \file ../doc/rendering.html

I guess we can try to look for file paths in simple comments and provide navigation there too. Filed a feature request: https://youtrack.jetbrains.com/issue/RSCPP-33627/Navigation-for-local-file-paths-in-code-comments

Thanks!

0
Comment actions Permalink

Thanks, I have filed a feature request. But even with the /// \file syntax, I could not succeed in opening a relative file (or maybe there is an option to activate?)

0
Comment actions Permalink

No, I think it should work as is. Make sure you click on the last path component, i.e. on the file name. If it still doesn't work, it'd be great if you could attach a sample solution which demonstrates the issue.

Thanks!

0
Comment actions Permalink

I see, this works as you describe. However, the HTML file opens inside Visual Studio rather than from google chrome.

0

Please sign in to leave a comment.