Skip to content

Commit

Permalink
Include tasklet contents in graph search
Browse files Browse the repository at this point in the history
  • Loading branch information
tbennun authored May 8, 2024
1 parent 8941e11 commit b74a385
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/renderer/renderer_elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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<TaskletCodeToken> = new Set();
public readonly outputTokens: Set<TaskletCodeToken> = new Set();
Expand Down

0 comments on commit b74a385

Please sign in to comment.