Revert "replace severity with needsAttention, https://github.com/microsoft/vscode/issues/129037"

This reverts commit e93a59545c.
This commit is contained in:
Johannes Rieken
2021-09-02 09:00:44 +02:00
parent 3704133893
commit 02aeb6acca
6 changed files with 35 additions and 37 deletions

View File

@@ -7,7 +7,8 @@ import { MainContext, MainThreadLanguagesShape, IMainContext, ExtHostLanguagesSh
import type * as vscode from 'vscode';
import { ExtHostDocuments } from 'vs/workbench/api/common/extHostDocuments';
import * as typeConvert from 'vs/workbench/api/common/extHostTypeConverters';
import { StandardTokenType, Range, Position } from 'vs/workbench/api/common/extHostTypes';
import { StandardTokenType, Range, Position, LanguageStatusSeverity } from 'vs/workbench/api/common/extHostTypes';
import Severity from 'vs/base/common/severity';
import { disposableTimeout } from 'vs/base/common/async';
import { DisposableStore, IDisposable } from 'vs/base/common/lifecycle';
import { IExtensionDescription } from 'vs/platform/extensions/common/extensions';
@@ -91,6 +92,7 @@ export class ExtHostLanguages implements ExtHostLanguagesShape {
selector,
id,
name: extension.displayName ?? extension.name,
severity: LanguageStatusSeverity.Information,
command: undefined,
text: '',
detail: '',
@@ -109,7 +111,7 @@ export class ExtHostLanguages implements ExtHostLanguagesShape {
selector: data.selector,
label: data.text,
detail: data.detail ?? '',
needsAttention: data.needsAttention,
severity: data.severity === LanguageStatusSeverity.Error ? Severity.Error : data.severity === LanguageStatusSeverity.Warning ? Severity.Warning : Severity.Info,
command: data.command && this._commands.toInternal(data.command, commandDisposables),
accessibilityInfo: data.accessibilityInformation
});
@@ -154,11 +156,11 @@ export class ExtHostLanguages implements ExtHostLanguagesShape {
data.detail = value;
updateAsync();
},
get needsAttention() {
return data.needsAttention;
get severity() {
return data.severity;
},
set needsAttention(value) {
data.needsAttention = value;
set severity(value) {
data.severity = value;
updateAsync();
},
get accessibilityInformation() {