Repository: OmniSharp/omnisharp-vscode (ts)

Issue:
Problems list broken when Roslyn Analyzer is enabled
Problems list is only showing issues from files just opened in editor if "Roslyn Analyzer" is enabled and  "Analyze Open Documents Only" is disabled.
This is true for Errors, Warnings and Infos (which are all _not_ filtered in the problems list).
Note: "Max Project File Count For Diagnostic Analysis" is set much higher than the actual file count and does not even show any effect when set to 0 or negative.
## Steps to Reproduce ##
Settings:
```
  "omnisharp.useModernNet": true,
  "omnisharp.enableRoslynAnalyzers": true,
  "csharp.maxProjectFileCountForDiagnosticAnalysis": 10000
```
## Expected Behavior ##
All Errors, Warnings and Infos across all *.cs files in the workspace are listed under problems.

## Actual Behavior ##
Any Errors, Warnings and Infos of one *.cs file are listed _only_ once that file has been opened in editor. (Any errors in files not being opened are never being listed.)
Once `"omnisharp.enableRoslynAnalyzers": false` is set - all errors are listed again as expected.

### OmniSharp log ###
Starting OmniSharp server at 4/14/2022, 10:39:08 AM
    Target: d:\proj\xxx

OmniSharp server started with .NET 6.0.103
.
    Path: c:\Users\chr\.vscode\extensions\ms-dotnettools.csharp-1.24.4-win32-x64\.omnisharp\1.38.2-net6.0\OmniSharp.dll
    PID: 12388

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on Windows 10.0.19044.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
        Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
[info]: OmniSharp.Services.DotNetCliService
        Using the 'dotnet' on the PATH.
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: .NET Core SDK 6.0.103 17.0.0 - "C:\Program Files\dotnet\sdk\6.0.103\"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: .NET Core SDK 6.0.103 17.0.0 - "C:\Program Files\dotnet\sdk\6.0.103\"
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for ...
...
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location 'd:\proj\xxx' on host 14932.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: ...
...
[info]: OmniSharp.Roslyn.CSharp.Services.Diagnostics.CSharpDiagnosticWorkerWithAnalyzers
        Solution initialized -> queue all documents for code analysis. Initial document count: 286.

## Environment information ##
**VSCode version**: 1.66.2
**C# Extension**: 1.24.4


<details><summary>Dotnet Information</summary>
.NET SDK (reflecting any global.json):
 Version:   6.0.103
 Commit:    2d7bc7059f

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19044
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\6.0.103\

Host (useful for support):
  Version: 6.0.3
  Commit:  c24d9a9c91

.NET SDKs installed:
  1.1.4 [C:\Program Files\dotnet\sdk]
  2.1.300 [C:\Program Files\dotnet\sdk]
  2.1.805 [C:\Program Files\dotnet\sdk]
  2.1.818 [C:\Program Files\dotnet\sdk]
  3.1.405 [C:\Program Files\dotnet\sdk]
  3.1.417 [C:\Program Files\dotnet\sdk]
  5.0.212 [C:\Program Files\dotnet\sdk]
  6.0.103 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 1.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.1.23 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 5.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download
</details>
<details><summary>Visual Studio Code Extensions</summary>

|Extension|Author|Version|
|---|---|---|
|cpptools|ms-vscode|1.9.7|
|csharp|ms-dotnettools|1.24.4|
|data-workspace-vscode|ms-mssql|0.1.1|
|gitlens|eamodio|12.0.6|
|json-pretty-printer|euskadi31|1.1.0|
|jupyter|ms-toolsai|2022.3.1000901801|
|jupyter-keymap|ms-toolsai|1.0.0|
|jupyter-renderers|ms-toolsai|1.0.6|
|live-html-previewer|hdg|0.3.0|
|mssql|ms-mssql|1.13.0|
|python|ms-python|2022.4.1|
|sql-database-projects-vscode|ms-mssql|0.14.1|
|swagger-viewer|Arjun|3.1.2|
|vscode-arduino|vsciot-vscode|0.4.11|
|vscode-commons|redhat|0.0.6|
|vscode-docker|ms-azuretools|1.21.0|
|vscode-postgresql|ms-ossdata|0.3.0|
|vscode-pylance|ms-python|2022.4.1|
|vscode-xml|redhat|0.20.0|
|vscode-yaml|redhat|1.6.0|
|xslt-xpath|deltaxml|1.2.3|;

</details>
output from your clipboard

Pull request description:
Fix #5171
Replaced the deprecated ProjectDiagnosticStatus event with the newer BackgroundDiagnosticStatus.
Now BackgroundWorkStatusBarObserver no longer shows the path to the project file, but this shouldn't be a big deal.
This will fix #5171, without relying on obsolete protocol features, or workaround the discovered issue.

Patch:
diff --git a/src/features/diagnosticsProvider.ts b/src/features/diagnosticsProvider.ts
index c45b6c4a..3dc0a503 100644
--- a/src/features/diagnosticsProvider.ts
+++ b/src/features/diagnosticsProvider.ts
@@ -16,7 +16,7 @@ import { TextDocument } from '../vscodeAdapter';
 import OptionProvider from '../observers/OptionProvider';
 import { Subject, Subscription } from 'rxjs';
 import { debounceTime } from 'rxjs/operators';
-import { DiagnosticStatus } from '../omnisharp/protocol';
+import { BackgroundDiagnosticStatus } from '../omnisharp/protocol';
 import { LanguageMiddlewareFeature } from '../omnisharp/LanguageMiddlewareFeature';
 
 export class Advisor {
@@ -154,7 +154,7 @@ class DiagnosticsProvider extends AbstractSupport {
         this._disposable = new CompositeDisposable(this._diagnostics,
             this._server.onPackageRestore(() => this._validateAllPipe.next("onPackageRestore"), this),
             this._server.onProjectChange(() => this._validateAllPipe.next("onProjectChanged"), this),
-            this._server.onProjectDiagnosticStatus(this._onProjectAnalysis, this),
+            this._server.onBackgroundDiagnosticStatus(this._onBackgroundAnalysis, this),
             vscode.workspace.onDidOpenTextDocument(event => this._onDocumentOpenOrChange(event), this),
             vscode.workspace.onDidChangeTextDocument(event => this._onDocumentOpenOrChange(event.document), this),
             vscode.workspace.onDidCloseTextDocument(this._onDocumentClose, this),
@@ -210,9 +210,9 @@ class DiagnosticsProvider extends AbstractSupport {
         }
     }
 
-    private _onProjectAnalysis(event: protocol.ProjectDiagnosticStatus) {
-        if (event.Status == DiagnosticStatus.Ready &&
-            event.ProjectFilePath === "(100 %)") {
+    private _onBackgroundAnalysis(event: protocol.BackgroundDiagnosticStatusMessage) {
+        if (event.Status == BackgroundDiagnosticStatus.Finished &&
+            event.NumberFilesRemaining === 0) {
             this._validateAllPipe.next();
         }
     }
diff --git a/src/observers/BackgroundWorkStatusBarObserver.ts b/src/observers/BackgroundWorkStatusBarObserver.ts
index 46cddee1..84c2ed53 100644
--- a/src/observers/BackgroundWorkStatusBarObserver.ts
+++ b/src/observers/BackgroundWorkStatusBarObserver.ts
@@ -4,18 +4,19 @@
  *--------------------------------------------------------------------------------------------*/
 
 import { BaseStatusBarItemObserver } from './BaseStatusBarItemObserver';
-import { BaseEvent, OmnisharpProjectDiagnosticStatus } from '../omnisharp/loggingEvents';
+import { BaseEvent, OmnisharpBackgroundDiagnosticStatus } from '../omnisharp/loggingEvents';
 import { EventType } from '../omnisharp/EventType';
-import { DiagnosticStatus } from '../omnisharp/protocol';
+import { BackgroundDiagnosticStatus } from '../omnisharp/protocol';
 
 export class BackgroundWorkStatusBarObserver extends BaseStatusBarItemObserver {
     public post = (event: BaseEvent) => {
-        if (event.type === EventType.ProjectDiagnosticStatus) {
-            let asProjectEvent = <OmnisharpProjectDiagnosticStatus>event;
+        if (event.type === EventType.BackgroundDiagnosticStatus) {
+            let asProjectEvent = <OmnisharpBackgroundDiagnosticStatus>event;
 
-            if (asProjectEvent.message.Status === DiagnosticStatus.Processing) {
-                let projectFile = asProjectEvent.message.ProjectFilePath.replace(/^.*[\\\/]/, '');
-                this.SetAndShowStatusBar(`$(sync~spin) Analyzing ${projectFile}`, 'o.showOutput', undefined, `Analyzing ${projectFile}`);
+            if (asProjectEvent.message.Status !== BackgroundDiagnosticStatus.Finished) {
+                let {NumberFilesRemaining, NumberFilesTotal} = asProjectEvent.message;
+                let message = `Analyzing ${NumberFilesTotal} files - Remaining ${NumberFilesRemaining} files`;
+                this.SetAndShowStatusBar(`$(sync~spin) ${message}`, 'o.showOutput', null, `${message}`);
             }
             else {
                 this.ResetAndHideStatusBar();
diff --git a/src/omnisharp/EventType.ts b/src/omnisharp/EventType.ts
index 4f8c2514..d398f91a 100644
--- a/src/omnisharp/EventType.ts
+++ b/src/omnisharp/EventType.ts
@@ -79,11 +79,12 @@ export enum EventType {
     OmnisharpServerOnStart = 72,
     OmnisharpOnBeforeServerInstall = 73,
     ProjectConfigurationReceived = 74,
-    ProjectDiagnosticStatus = 75,
+    // ProjectDiagnosticStatus = 75, Obsolete, use BackgroundDiagnosticStatus
     DotNetTestRunInContextStart = 76,
     DotNetTestDebugInContextStart = 77,
     TelemetryErrorEvent = 78,
     OmnisharpServerRequestCancelled = 79,
+    BackgroundDiagnosticStatus = 80,
 }
 
 //Note that the EventType protocol is shared with Razor.VSCode and the numbers here should not be altered
diff --git a/src/omnisharp/loggingEvents.ts b/src/omnisharp/loggingEvents.ts
index b67b40ff..f469d476 100644
--- a/src/omnisharp/loggingEvents.ts
+++ b/src/omnisharp/loggingEvents.ts
@@ -98,9 +98,9 @@ export class OmnisharpServerOnError implements BaseEvent {
     constructor(public errorMessage: protocol.ErrorMessage) { }
 }
 
-export class OmnisharpProjectDiagnosticStatus implements BaseEvent {
-    type = EventType.ProjectDiagnosticStatus;
-    constructor(public message: protocol.ProjectDiagnosticStatus) { }
+export class OmnisharpBackgroundDiagnosticStatus implements BaseEvent {
+    type = EventType.BackgroundDiagnosticStatus;
+    constructor(public message: protocol.BackgroundDiagnosticStatusMessage) { }
 }
 
 export class OmnisharpServerMsBuildProjectDiagnostics implements BaseEvent {
diff --git a/src/omnisharp/protocol.ts b/src/omnisharp/protocol.ts
index 0e0c4572..87ba5092 100644
--- a/src/omnisharp/protocol.ts
+++ b/src/omnisharp/protocol.ts
@@ -285,15 +285,17 @@ export interface ProjectInformationResponse {
     MsBuildProject: MSBuildProject;
 }
 
-export enum DiagnosticStatus {
-    Processing = 0,
-    Ready = 1
+export enum BackgroundDiagnosticStatus {
+    Started = 0,
+    Progress = 1,
+    Finished = 2
 }
 
-export interface ProjectDiagnosticStatus {
-    Status: DiagnosticStatus;
-    ProjectFilePath: string;
-    Type: "background";
+export interface BackgroundDiagnosticStatusMessage {
+    Status: BackgroundDiagnosticStatus;
+    NumberProjects: number;
+    NumberFilesTotal: number;
+    NumberFilesRemaining: number;
 }
 
 export interface WorkspaceInformationResponse {
diff --git a/src/omnisharp/server.ts b/src/omnisharp/server.ts
index a0bdda57..bf984a09 100644
--- a/src/omnisharp/server.ts
+++ b/src/omnisharp/server.ts
@@ -69,7 +69,7 @@ module Events {
     export const ProjectAdded = 'ProjectAdded';
     export const ProjectRemoved = 'ProjectRemoved';
 
-    export const ProjectDiagnosticStatus = 'ProjectDiagnosticStatus';
+    export const BackgroundDiagnosticStatus = 'BackgroundDiagnosticStatus';
 
     export const MsBuildProjectDiagnostics = 'MsBuildProjectDiagnostics';
 
@@ -218,8 +218,8 @@ export class OmniSharpServer {
         return this._addListener(Events.ProjectRemoved, listener, thisArg);
     }
 
-    public onProjectDiagnosticStatus(listener: (e: protocol.ProjectDiagnosticStatus) => any, thisArg?: any) {
-        return this._addListener(Events.ProjectDiagnosticStatus, listener, thisArg);
+    public onBackgroundDiagnosticStatus(listener: (e: protocol.BackgroundDiagnosticStatusMessage) => any, thisArg?: any) {
+        return this._addListener(Events.BackgroundDiagnosticStatus, listener, thisArg);
     }
 
     public onMsBuildProjectDiagnostics(listener: (e: protocol.MSBuildProjectDiagnostics) => any, thisArg?: any) {
@@ -319,8 +319,8 @@ export class OmniSharpServer {
             this.eventStream.post(new ObservableEvents.OmnisharpServerOnStart());
         }));
 
-        disposables.add(this.onProjectDiagnosticStatus((message: protocol.ProjectDiagnosticStatus) =>
-            this.eventStream.post(new ObservableEvents.OmnisharpProjectDiagnosticStatus(message))
+        disposables.add(this.onBackgroundDiagnosticStatus((message: protocol.BackgroundDiagnosticStatusMessage) =>
+            this.eventStream.post(new ObservableEvents.OmnisharpBackgroundDiagnosticStatus(message))
         ));
 
         disposables.add(this.onProjectConfigurationReceived((message: protocol.ProjectConfigurationMessage) => {


Test patch:
diff --git a/test/integrationTests/reAnalyze.integration.test.ts b/test/integrationTests/reAnalyze.integration.test.ts
index a014c972..324a689d 100644
--- a/test/integrationTests/reAnalyze.integration.test.ts
+++ b/test/integrationTests/reAnalyze.integration.test.ts
@@ -12,8 +12,8 @@ import testAssetWorkspace from './testAssets/testAssetWorkspace';
 import { poll, assertWithPoll } from './poll';
 import { EventStream } from '../../src/EventStream';
 import { EventType } from '../../src/omnisharp/EventType';
-import { BaseEvent, OmnisharpProjectDiagnosticStatus } from '../../src/omnisharp/loggingEvents';
-import { DiagnosticStatus } from '../../src/omnisharp/protocol';
+import { BaseEvent, OmnisharpBackgroundDiagnosticStatus } from '../../src/omnisharp/loggingEvents';
+import { BackgroundDiagnosticStatus } from '../../src/omnisharp/protocol';
 
 const chai = require('chai');
 chai.use(require('chai-arrays'));
@@ -63,7 +63,7 @@ suite(`ReAnalyze: ${testAssetWorkspace.description}`, function () {
     });
 
     test("When interface is manually renamed, then return correct analysis after re-analysis of project", async function () {
-        let diagnosticStatusEvents = listenEvents<OmnisharpProjectDiagnosticStatus>(eventStream, EventType.ProjectDiagnosticStatus);
+        let diagnosticStatusEvents = listenEvents<OmnisharpBackgroundDiagnosticStatus>(eventStream, EventType.BackgroundDiagnosticStatus);
 
         await vscode.commands.executeCommand("vscode.open", interfaceUri);
 
@@ -73,7 +73,7 @@ suite(`ReAnalyze: ${testAssetWorkspace.description}`, function () {
 
         await vscode.commands.executeCommand('o.reanalyze.currentProject', interfaceImplUri);
 
-        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status === DiagnosticStatus.Ready) !== undefined);
+        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status === BackgroundDiagnosticStatus.Finished) !== undefined);
 
         await assertWithPoll(
             () => vscode.languages.getDiagnostics(interfaceImplUri),
@@ -83,20 +83,20 @@ suite(`ReAnalyze: ${testAssetWorkspace.description}`, function () {
     });
 
     test("When re-analyze of project is executed then eventually get notified about them.", async function () {
-        let diagnosticStatusEvents = listenEvents<OmnisharpProjectDiagnosticStatus>(eventStream, EventType.ProjectDiagnosticStatus);
+        let diagnosticStatusEvents = listenEvents<OmnisharpBackgroundDiagnosticStatus>(eventStream, EventType.BackgroundDiagnosticStatus);
 
         await vscode.commands.executeCommand('o.reanalyze.currentProject', interfaceImplUri);
 
-        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status === DiagnosticStatus.Processing) != undefined);
-        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status === DiagnosticStatus.Ready) != undefined);
+        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status !== BackgroundDiagnosticStatus.Finished) != undefined);
+        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status === BackgroundDiagnosticStatus.Finished) != undefined);
     });
 
     test("When re-analyze of all projects is executed then eventually get notified about them.", async function () {
-        let diagnosticStatusEvents = listenEvents<OmnisharpProjectDiagnosticStatus>(eventStream, EventType.ProjectDiagnosticStatus);
+        let diagnosticStatusEvents = listenEvents<OmnisharpBackgroundDiagnosticStatus>(eventStream, EventType.BackgroundDiagnosticStatus);
 
         await vscode.commands.executeCommand('o.reanalyze.allProjects', interfaceImplUri);
 
-        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status === DiagnosticStatus.Processing) != undefined);
-        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status === DiagnosticStatus.Ready) != undefined);
+        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status !== BackgroundDiagnosticStatus.Finished) != undefined);
+        await poll(() => diagnosticStatusEvents, 15 * 1000, 500, r => r.find(x => x.message.Status === BackgroundDiagnosticStatus.Finished) != undefined);
     });
 });
diff --git a/test/integrationTests/testAssets/testAssets.ts b/test/integrationTests/testAssets/testAssets.ts
index 9319886d..4bf47274 100644
--- a/test/integrationTests/testAssets/testAssets.ts
+++ b/test/integrationTests/testAssets/testAssets.ts
@@ -75,7 +75,7 @@ export class TestAssetWorkspace {
     async waitForIdle(stream: EventStream, timeout: number = 25 * 1000): Promise<void> {
         let event: BaseEvent = { type: 0 };
 
-        const subscription = stream.subscribe((e: BaseEvent) => e.type !== EventType.ProjectDiagnosticStatus && (event = e));
+        const subscription = stream.subscribe((e: BaseEvent) => e.type !== EventType.BackgroundDiagnosticStatus && (event = e));
 
         await poll(() => event, timeout, 500, e => !e || (event = null));
 
diff --git a/test/unitTests/logging/BackgroundWorkStatusBarObserver.test.ts b/test/unitTests/logging/BackgroundWorkStatusBarObserver.test.ts
index 24840441..4e7ba9f5 100644
--- a/test/unitTests/logging/BackgroundWorkStatusBarObserver.test.ts
+++ b/test/unitTests/logging/BackgroundWorkStatusBarObserver.test.ts
@@ -5,9 +5,9 @@
 
 import { expect, should } from 'chai';
 import { StatusBarItem } from '../../../src/vscodeAdapter';
-import { OmnisharpProjectDiagnosticStatus } from '../../../src/omnisharp/loggingEvents';
+import { OmnisharpBackgroundDiagnosticStatus } from '../../../src/omnisharp/loggingEvents';
 import { BackgroundWorkStatusBarObserver } from '../../../src/observers/BackgroundWorkStatusBarObserver';
-import { DiagnosticStatus } from '../../../src/omnisharp/protocol';
+import { BackgroundDiagnosticStatus } from '../../../src/omnisharp/protocol';
 
 suite('BackgroundWorkStatusBarObserver', () => {
     suiteSetup(() => should());
@@ -25,16 +25,16 @@ suite('BackgroundWorkStatusBarObserver', () => {
         hideCalled = false;
     });
 
-    test('OmnisharpProjectDiagnosticStatus.Processing: Show processing message', () => {
-        let event = new OmnisharpProjectDiagnosticStatus({ Status: DiagnosticStatus.Processing, ProjectFilePath: "foo.csproj", Type: "background" });
+    test('OmnisharpBackgroundDiagnosticStatus.Processing: Show processing message', () => {
+        let event = new OmnisharpBackgroundDiagnosticStatus({ Status: BackgroundDiagnosticStatus.Progress, NumberFilesRemaining: 0, NumberFilesTotal: 0, NumberProjects: 0 });
         observer.post(event);
         expect(hideCalled).to.be.false;
         expect(showCalled).to.be.true;
         expect(statusBarItem.text).to.contain('Analyzing');
     });
 
-    test('OmnisharpProjectDiagnosticStatus.Ready: Hide processing message', () => {
-        let event = new OmnisharpProjectDiagnosticStatus({ Status: DiagnosticStatus.Ready, ProjectFilePath: "foo.csproj", Type: "background" });
+    test('OmnisharpBackgroundDiagnosticStatus.Ready: Hide processing message', () => {
+        let event = new OmnisharpBackgroundDiagnosticStatus({ Status: BackgroundDiagnosticStatus.Finished, NumberFilesRemaining: 0, NumberFilesTotal: 0, NumberProjects: 0 });
         observer.post(event);
         expect(hideCalled).to.be.true;
         expect(showCalled).to.be.false;