onModuleInit()

in src/test-explorer/decorator.ts [22:46]


  onModuleInit() {
    this.ctx.subscriptions.push(
      // Access to the Project View file for use in the markdown command on hover.
      vscode.commands.registerCommand('bazelbsp.openProjectView', async () => {
        const uri = this.store.testController.items.get('root')?.uri
        if (uri) {
          const document = await vscode.workspace.openTextDocument(uri)
          await vscode.window.showTextDocument(document)
        }
      })
    )

    // Set up the decorator type and hover message.
    this.decorationType = vscode.window.createTextEditorDecorationType({
      gutterIconPath: vscode.Uri.file(
        this.ctx.asAbsolutePath('resources/gutter.svg')
      ),
      isWholeLine: true,
      gutterIconSize: 'contain',
    })
    this.hoverMessage = new vscode.MarkdownString(
      '**Test Explorer**\n\nTests in this file are not yet synced.\n\n- [Adjust Project Scope](command:bazelbsp.openProjectView)\n\n- [Sync Now](command:testing.refreshTests)\n\n'
    )
    this.hoverMessage.isTrusted = true
  }