Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)

* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998

* fix pipelines

* fix strict-null-checks

* add missing files
This commit is contained in:
Anthony Dresser
2019-10-21 22:12:22 -07:00
committed by GitHub
parent 7c9be74970
commit 1e22f47304
913 changed files with 18898 additions and 16536 deletions

View File

@@ -227,6 +227,25 @@ export interface IStatusMessageOptions {
hideAfter?: number;
}
export enum NotificationsFilter {
/**
* No filter is enabled.
*/
OFF,
/**
* All notifications are configured as silent. See
* `INotificationProperties.silent` for more info.
*/
SILENT,
/**
* All notifications are silent except error notifications.
*/
ERROR
}
/**
* A service to bring up notifications and non-modal prompts.
*
@@ -286,6 +305,13 @@ export interface INotificationService {
* @returns a disposable to hide the status message
*/
status(message: NotificationMessage, options?: IStatusMessageOptions): IDisposable;
/**
* Allows to configure a filter for notifications.
*
* @param filter the filter to use
*/
setFilter(filter: NotificationsFilter): void;
}
export class NoOpNotification implements INotificationHandle {

View File

@@ -3,7 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { INotificationService, INotificationHandle, NoOpNotification, Severity, INotification, IPromptChoice, IPromptOptions, IStatusMessageOptions } from 'vs/platform/notification/common/notification';
import { INotificationService, INotificationHandle, NoOpNotification, Severity, INotification, IPromptChoice, IPromptOptions, IStatusMessageOptions, NotificationsFilter } from 'vs/platform/notification/common/notification';
import { Disposable, IDisposable } from 'vs/base/common/lifecycle';
export class TestNotificationService implements INotificationService {
@@ -35,4 +35,6 @@ export class TestNotificationService implements INotificationService {
status(message: string | Error, options?: IStatusMessageOptions): IDisposable {
return Disposable.None;
}
}
setFilter(filter: NotificationsFilter): void { }
}