}
function renderExternalClassPanel(d) {
+ const pkg = d.package || '';
+ const mod = d.module || '';
+ // Build the most informative description we can from whatever
+ // package/module info the dump preserved. The plugin records both
+ // for every QualName, so for a normal external reference both are
+ // present.
+ let status;
+ if (pkg && mod) {
+ status = `Defined in module <code>${escape(mod)}</code> ` +
+ `(package <code>${escape(pkg)}</code>) — not extracted by ` +
+ `the plugin in this program. Add the package to your ` +
+ `plugin run if you'd like its instances and superclasses ` +
+ `to surface here.`;
+ } else if (mod) {
+ status = `Defined in module <code>${escape(mod)}</code> — not ` +
+ `extracted by the plugin in this program.`;
+ } else if (pkg) {
+ status = `Defined in package <code>${escape(pkg)}</code> — not ` +
+ `extracted by the plugin in this program.`;
+ } else {
+ status = `Referenced but not extracted by the plugin in this program.`;
+ }
return `
<h2>${escape(d.label)}</h2>
- <p class="pkgmod">${escape(d.package || '')} · ${escape(d.module || '')}</p>
+ <p class="pkgmod">${escape(pkg)} · ${escape(mod)}</p>
${panelButtons(d.id, { canPin: false, canMute: true })}
<dl>
- <dt>Status</dt><dd><em>External (not defined in this program)</em></dd>
+ <dt>Status</dt><dd>${status}</dd>
</dl>`;
}