Delphi-RAG-Lint

drag-lint help

drag-lint Chart panel

Since: 1.60.0-alpha

Report charts open in a dockable drag-lint Chart window inside the IDE (drag-lint-view.exe, WebView2): tabs, click to the line, recentre, back / forward.

Read this when you ask a question from drag-lint > Reports and want the chart inside RAD Studio instead of the browser. With drag-lint-view.exe and WebView2Loader.dll installed beside the engine (the installer ships both) every chart opens as a tab of the dockable drag-lint Chart window; a row click opens its line in the editor, a node's recentre asks the same question on that symbol, the page's back / forward buttons walk the history. Needs the Microsoft Edge WebView2 Runtime; without it (or without the host exe) the chart opens in the browser as before.

Where to click

  • RAD Studio main menu: drag-lint > Reports
    1. Put the caret on a routine, field, type or unit
    2. drag-lint > Reports, then pick a question
    3. The chart opens as a tab of the dockable drag-lint Chart window; click a row to open its line, recentre on a node, use back / forward, click a tab to switch

Needs: index, graphviz

Details

Since 1.60, a chart you ask for from drag-lint > Reports opens inside RAD Studio, in a dockable window called drag-lint Chart, instead of in the browser. The window hosts drag-lint-view.exe, a small 64-bit program that shows the chart with Microsoft Edge WebView2. It runs as a separate process and docks into the IDE window. The chart page is the same index.html that drag-lint ask writes, so everything the page can do in the browser it can also do here.

What you can do in it

  • Click a row (a routine, a field, a unit): the editor opens that file at that line. The click uses the same path as the draglint:// links, the plugin's own open-source pipe, so there is nothing to register.
  • Recentre on a node: the same question is asked again with that symbol as the target. The new chart replaces the one in the current tab, and back returns to the chart before.
  • Back / forward: the page's own buttons walk the history of the window.
  • Tabs: every chart you ask from the menu is a new tab in the strip at the top of the page. Click a tab to switch to it, or click its x to close it. All tabs live in ONE viewer process; up to 20 are kept, and the oldest inactive tab goes first.
  • Resize: the chart follows the window size.
  • Dock, undock or move the window (1.61): the IDE gives the window a new handle, so the viewer is closed with the old one and started again on the active tab; the tab strip comes back as it was. Expect a second's blank panel while it restarts. Back / forward history starts fresh after a move.

What it needs

  • drag-lint-view.exe and WebView2Loader.dll beside the plugin BPL or beside drag-lint.exe (the installer and build\stage-engine.ps1 put both beside the engine).
  • The Microsoft Edge WebView2 Runtime (it ships with current Windows 10 / 11).
  • A fresh project index, and Graphviz for the pictures, as for every chart (see Charts and the IDE).

How long a chart takes

Most of the wait for a chart used to be Graphviz starting up, not drawing: each dot.exe built a map of every installed font from scratch (1.6 to 2.2 s at rest, over 12 s on a busy machine). Since 1.62 drag-lint points Graphviz at a font cache that outlives one dot.exe, in %LOCALAPPDATA%\drag-lint\fontconfig (the first chart builds it, about 2 s): a Reports question then takes about 0.3 to 1 s instead of 3.3 to 3.6 s, and site about a third of the time. The pictures are the same bytes (SVG); PNG edges are smoothed slightly differently. It is used only when your Graphviz ships fontconfig (Graphviz 16 for Windows does) and you have not set PANGOCAIRO_BACKEND or FONTCONFIG_FILE yourself; set PANGOCAIRO_BACKEND=win32 to turn it off.

When it falls back to the browser

  • No drag-lint-view.exe found: the Reports menu asks with --open, and the chart opens in your browser as it did before 1.60.
  • The WebView2 Runtime or the loader DLL is missing (the viewer exits with code 3): the window says what to install, and the chart opens in the browser.
  • The viewer does not dock within 15 seconds, or refuses its command line: the window says so, and the chart opens in the browser.

Closing the IDE

The viewer ends with the window. It is also started inside the plugin's kill-on-close job and watches the IDE process, so a crashed or killed IDE leaves no drag-lint-view.exe behind.

Who can drive the viewer

(1.61) The viewer obeys navigate / back / forward / post / close only from the window it docked into, or from window of the IDE process that started it. A message from any other program is refused.

Running it from the CLI

There is no CLI verb for the panel. drag-lint ask <question> --target <T> --project <P.dproj> --open opens the same chart in the browser. The viewer itself is drag-lint-view.exe --parent-hwnd <HWND> --parent-pid <PID> --bundle <dir>; it is started by the plugin and is not meant to be run by hand.


All features | CLI reference | IDE menus