Developer's Diary
Software development, with Terry Ebdon
|
Ideally the list of daily journal pages would be reversed on the corresponding month page.
e.g.
What's the smallest change I can make that doesn't need a change to Doxygen or it's layout? MonthPage.addSubPage()
currently appends to the month page:
Changing this would be non-trivial, and possibly brittle. If the list was ordered I could tell it to reverse itself. But that needs script / CSS, to inject the reversed
attribute and hide the numbers. A better way would be to sort the list, with JavaScript, at run-time. This should have minimal overhead; the list has, at most, 31 items.
I added a few lines of script to the month page, based on a "stack overflow" answer from user VisioN.
I found that Doxygen was confused by the $ symbol, that jQuery uses, and was deleting things like $(Document) from the generated HTML page. Replacing $
with jQuery
solved the problem. (Fortunately I'd seen this before, when working on Liferay.) An alternative work-around would be to escape the dollar symbol, with \$, but I find that less reliable and possibly confusing.
jquery.js
file in the output folder.This is the working code:
This script solution works, with some restrictions.
The navigation side-bar shows sub-pages in ascending date order, not descending. That's expected, as the page order matches the order that Doxygen parses them. i.e. the order they're mentioned in the monthly journal page. The list isn't reversed until run-time, after the navigation bar has been built.
The script only runs in HTML pages, so the above solution can't work for Latex / PDF output.
By default the [TOC] and \tableofcontents commands only work if there are section headers with anchors. There's a configuration option to get a table of contents without anchors:
This forces markdown style headers, up to level 3, to be included. It generates its own anchors, to allow this. Unfortunately that triggers the bug that prevents me using heading anchors in the first place: superscript characters, like th stop working. The <sup> and </sup> tags are displayed as if they've been escaped.
This machine only has the modelling framework (EMF) installed. I've been using Atom for recent development; time to get back to using a proper IDE. I'll start with a clean install of Eclipse Oxygen and add the Groovy plug-ins. I don't need EMF, as I really don't like it and found other tools to be more useful for modelling.
I'm currently on Groovy 2.4.7. That's recent enough that I shouldn't need to update.
I though I'd told the Eclipse installer to not install Groovy, but it seems to have done so. Eclipse is using Groovy 2.4.12, but a command prompt still uses 2.4.7. That'd be one reason that the download was so slow.
I'd forgotten how tiny Eclipse's buttons are, on a high resolution screen. They're really difficult to differentiate. This was supposed to have been fixed in Eclipse Nemo, according to various stack exchange posts. But the fix may have only addressed part of the issue, maybe? Eclipse Bug 421383 is marked as fixed. There's an interesting comment, No. 60, which details a work-around for Microsoft Windows. Subsequent posts verify that it works, so will be worth a try. Subsequent comments detail possible issues and further work-around. A similar fix is on this stack exchange page
On the plus side, Eclipse finally supports zooming text (via ctrl/+, CTRL/-), without having to search for plug-ins.
A test project runs fine. I've imported WebDoxy as a project, but it doesn't run. There's a conflict between Eclipse and AntBuilder
. This is a major set-back, as WebDoxy depends heavily on AntBuilder
.
The Eclipse build path seems to use the embeddable jar from its Groovy 2.4.12 install. This should be fine.
wds
.
Find me coding on GitHub, networking on LinkedIn, answering questions on Stack Exchange and hanging out on twitter.