Can I link to another source file with Doxygen - doxygen

I know that in Doxygen I can link to another function using the #see command. Is it possible to link to another source file? For instance, lets say I have two source files which communicate with one another: a manager and a plugin (or something along those lines), and I want to reference the manager in the 'brief' of the plugin, what would that look like?

Related

What is the vscode command to open a file in preview

I wrote an extension for vscode. After installation the extension folder contains documentation in a markdown file. I want to provide a command that loads this file into the preview pane so it displays rendered with images and hyperlinks etc.
You can do this sort of thing interactively:
and I have the full path to the markdown file, so now all I need is details of the command that implements this context menu item.
Web search does not produce complete or usable results.
After cloning the VS Code repo and trawling through the source I discovered the markdown.showPreview and associated commands.
To give credit where due, Lex Li reported the corresponding package.json entry in a comment while I was looking.
Without parameters this previews the content of the active editor, but as I said in a comment, it supports an optional Uri parameter and the code looks like this:
let pathToManual = path.join(context.extensionPath, "manual.md");
let uriManual: vscode.Uri = vscode.Uri.file(pathToManual);
vscode.commands.executeCommand('markdown.showPreview', uriManual);
For information on constructing workspace relative paths see the answer from Mark. The joinPath method he uses requires a base path as a Uri which is conveniently available for the workspace but not for the extension path.
If you need information on things like showing preview to one side then given the dearth of documentation I recommend cloning the repo and searching it for "markdown.showPreview", then exploring nearby code. If you fold the methods it gets easier to survey your options.
Try:
vscode.commands.executeCommand("markdown.showPreview", vscode.Uri.joinPath(vscode.workspace.workspaceFolders[0].uri,'test.md'));
Your fileName there at the end of course. And that assumed you are in the first or only root of a workspace. You might be able to simplify it using:
vscode.Uri.path(<path to file)
instead of the joinPath that I used.

Displaying images in GitHub documentation

I have a GitHub repository, for which I have created a Wiki. In said Wiki, there are multiple pages, like this one that I tried putting images on. For some reason, those images aren't showing up.
My Markdown code to the page that I have pointed out looks like this :
# Getting started
* [Using protoype](#using-prototype)
* [Working on code](#working-on-code)
* [Installation instructions](#installation-instructions)
* [Front-end code](#front-end-code)
* [Back-end code](#back-end-code)
* [Database code](#database-code)
### Using prototype
1. Go [here](https://mikewarren.me/YALApp/test.html) for the prototype. It will take you to the login page, which should look like this: ![if you see this, it means you probably need to right-click this to open the image in a new tab](../blob/master/loginPage.png)
2. Click on blue bar labelled "Login" to select a sample profile.
3. Log in.
### Working on code
Comes in multiple parts: the installation instructions and the different layers of code. These are discussed below. When discussing the directories these are in, I shall use ~ to symbolize project root directory.
##### Installation instructions
This project is written in node.js and has a `package.json` file at ```~/home/ec2-user/GroupManagementAppServer```. You should be able to ```npm link``` the dependencies the project needs. The database connection is to a MySQL database, so I would recommend a MySQL database management system (I personally use phpMyAdmin) unless you plan on changing that to another (say, MongoDB to keep in the node.js spirit of things).
##### Front-end code
This can be accessed at ```~/var/www/html/YALApp```. JavaScript dependencies that are third-party libraries are one directory up from that.
##### Back-end code
This is written in JavaScript, and can be accessed at ```~/home/ec2-user/GroupManagementAppServer```. Main file is `appServer.js`, and if you are intending to use SSL/TLS, you will have to spell out the pathnames of `privateKey`, `certificate`, and/or `intermediate`. The application uses port number `8080`, and `8443` for https.
##### Database code
I don't have anything connected to the database yet, and thus had no real need to include the script here, but when I do, it will probably be in either ```~``` or ```~/home/ec2-user/GroupManagementAppServer/data```.
I don't know how else to link to the image, which can be found in the repository, besides ../blob/master/[pathToImage]. How to resolve this?
Try and specify the full url of your repo instead of a relative path.
See "Linking to images in a repository"
You can link to an image in a repository on GitHub by copying the URL in your browser and using that as the path to the image.
For example, embedding an image in your wiki using Markdown might look like this:
[[https://github.com/username/repository/blob/master/img/octocat.png|alt=octocat]]

Why don't the Target 8 files implement the project as described in the tutorial?

In Target 8: Define a Custom DOM Tag, the reader is told about custom DOM tags that can be created by extending other tags. A sample is described for an example called "x-converter" before listing the files as "These files implement the app:".
The three files are...
a drseuss.html file (not sure why there's a sudden deviation in the project name and the HTML file, as opposed to the matching names in previous tutorials...),
a converter-element.html file,
and a convertercomponent.dart file.
I tried creating a new application in the latest Dart editor, and replaced the default HTML file contents with that of drseuss.html, replaced the default dart file contents with that of convertercomponent.dart, and added converter-element.html file.
After fixing an include issue (the file from the tutorial refers to drseuss.css and not the default project name's CSS file), I only see the following in the Chromium browser.
As you can see, the element described in the tutorial (converter-element) doesn't show up. Why don't the files provided for the project result in what's shown in the tutorial?
For reference, here's what's shown in the tutorial.
Web UI requires the build.dart script which compiles the various components into the executable output HTML+Dart.
Take a look at the parent folder in the github src that you reference, and you will see the build.dart script.
In addition, you will need the pubspec.yaml from that folder, too, which includes web_ui package, which brings in the dwc tool(Dart Web Components compiler) used by build.dart.
Take a look at the article Tools for Web UI for more information about dwc and build.dart, and Target 6 - Getting Started with Web UI which covers similar ground, but in a tutorial format.

change html output doxygen link

I am working on a project that is heavily documented with doxygen.
In a UI I have a list of all the classes available - I would like to be able to open the right documentation page of the class I select. In order to do that I need an easy to read link, so I can dynamically build it and run it.
Is it there any way I can control the generated link of the html file? Because the ones I have right now are impossible do be built dynamically.
You could use Doxygen's tag file mechanism for that (see GENERATE_TAGFILE in the config file).
A tag file is a reasonably easy to understand and parse XML file that basically lists all symbols in your project, with for each symbol the corresponding (relative) URL to the documentation.
So you could parse the tag file from your UI to resolve the links to the doxygen generated documentation in a robust way.

Use of doxygen's \link command

I have an external HTML file I'd like to have linked form either my doxygen "Related Pages" tab or the left hand frame. It seems I need to use the \link command but I can't find a good example of how to use it or where. I am currently using doxywizard to generate the HTML.
So, is \link something I incorporate into my doxygen config file or do I add it when I build the HTML somehow?
Update
So I ended up having to do the following:
Create a new page (docs_main.html) that had the following:
/*! \mainpage MY TITLE HERE
* \section intro_sec External resources
* My external page
*/
Include that page in my doxygen included files list
Rebuild my documentation
That added to my doxygen "Main Page" the following
MY TITLE HERE
My external page (which was a link to that page)
We have a Markdown support in doxygen nowadays. Your code may be a clearer:
/*! \mainpage MY TITLE HERE
* \anchor intro_sec
* # External resources
* [My external page](http://link_to_my_external_page.html)
*/
The above should render somewhat close to:
External resources
My external page
Doxygen allows you to insert certain HTML commands in to your documentation, including links. In case you didn't know this is how you make a link in HTML:
External file
cdiggins' answer is also worth reading.
The \link (and anything of the form \command or #command) is called a "special command" and is part of the mark-up used in the input files processed by Doxygen not part of the configuration. The \link command does not do what you want.
You could perhaps use the \page command to create a new related page and then use the \htmlinclude command to insert the external HTML file as the contents of that page.
As other answers here looks bits and pieces for a beginner, here is the complete procedure.
1) create an html file with content(ex:abc.html) as below
/*! \mainpage MY TITLE HERE
* \section intro_sec External resources
* My external page
*/
2) Add this file path in config file here
INPUT =
3)Also add your file type here
FILE_PATTERNS =
The above procedure opens your file in doxygen window
Add the below content to open the file in explorer
<b>My external page</b>
Note: If file doesn't open try giving absolute path
You can add a tab to the main navigation bar (with your link) by using a custom layout file.
Take a look at the Customizing the Output page of the Doxygen manual. It's pretty clear about how to do it, assuming I understood your question.