From b74a3858128fe839c0033948fe1f4c5d9b9b00da Mon Sep 17 00:00:00 2001 From: Tal Ben-Nun Date: Wed, 8 May 2024 10:48:48 -0700 Subject: [PATCH] Include tasklet contents in graph search --- src/renderer/renderer_elements.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/renderer/renderer_elements.ts b/src/renderer/renderer_elements.ts index b37909db..dde9836f 100644 --- a/src/renderer/renderer_elements.ts +++ b/src/renderer/renderer_elements.ts @@ -213,6 +213,11 @@ export class SDFGElement { return this.data.label; } + // Text used for matching the element during a search + public text_for_find(): string { + return this.label(); + } + // Produces HTML for a hover-tooltip public tooltip(container: HTMLElement): void { container.className = 'sdfvtooltip'; @@ -2182,6 +2187,12 @@ export class Tasklet extends SDFGNode { this.highlightCode(); } + public text_for_find(): string { + // Include code when searching + const code = this.attributes().code.string_data; + return this.label() + " " + code; + } + private highlightedCode: TaskletCodeToken[][] = []; public readonly inputTokens: Set = new Set(); public readonly outputTokens: Set = new Set();