async init()

in vscode/qodana/src/core/extension.ts [57:88]


    async init(): Promise<void> {
        if (!this.context) {
            throw new Error('Context is not set');
        }
        this.auth = await Auth.create(this.context);

        this.linkService = await LinkService.create(this.context);
        this.localRunService = new LocalRunsService(this.context);

        this.languageClient = await getLanguageClient(this.context);
        this.languageClient.onDidChangeState(
            async (stateChangeEvent) => {
                Events.instance.fireServerStateChange(stateChangeEvent.newState);
            }
        );
        this.statusIcon.notAttachedToReport();
        this.baselineFilterIcon.toggle(this.context?.workspaceState.get(WS_BASELINE_ISSUES, false));

        if (!await config.configIsValid(this.context, true)) {
            this.statusIcon.settingsNotValid();
        }
        config.sectionChangeHandler(this.languageClient, this.context);
        onReportFile(this.languageClient, this.context);
        onServerStateChange(this.context);
        onBaselineStatusChange(this.languageClient, this.context);
        onConfigChange(this.languageClient, this.context);
        onTimerCallback(this.context, this.auth);
        onUrlCallback(this.context, this.auth);
        onReportOpened();
        onReportClosed();
        await this.languageClient.start();
    }