Merge from vscode 33a65245075e4d18908652865a79cf5489c30f40 (#9279)

* Merge from vscode 33a65245075e4d18908652865a79cf5489c30f40

* remove github
This commit is contained in:
Anthony Dresser
2020-02-21 23:42:19 -08:00
committed by GitHub
parent c446cea3a0
commit de5f1eb780
250 changed files with 3724 additions and 2756 deletions

View File

@@ -346,7 +346,7 @@ export interface IRevertOptions {
}
export interface IMoveResult {
editor: IEditorInput | IResourceEditor;
editor: EditorInput | IResourceEditor;
options?: IEditorOptions;
}
@@ -1374,6 +1374,8 @@ export interface IEditorMemento<T> {
clearEditorState(resource: URI, group?: IEditorGroup): void;
clearEditorState(editor: EditorInput, group?: IEditorGroup): void;
moveEditorState(source: URI, target: URI): void;
}
class EditorInputFactoryRegistry implements IEditorInputFactoryRegistry {

View File

@@ -261,6 +261,7 @@ export interface INotificationViewItem {
readonly expanded: boolean;
readonly canCollapse: boolean;
readonly hasProgress: boolean;
readonly onDidChangeExpansion: Event<void>;
readonly onDidClose: Event<void>;
@@ -270,9 +271,6 @@ export interface INotificationViewItem {
collapse(skipEvents?: boolean): void;
toggle(): void;
hasProgress(): boolean;
hasPrompt(): boolean;
updateSeverity(severity: Severity): void;
updateMessage(message: NotificationMessage): void;
updateActions(actions?: INotificationActions): void;
@@ -495,7 +493,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie
}
get canCollapse(): boolean {
return !this.hasPrompt();
return !this.hasPrompt;
}
get expanded(): boolean {
@@ -511,7 +509,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie
return true; // explicitly sticky
}
const hasPrompt = this.hasPrompt();
const hasPrompt = this.hasPrompt;
if (
(hasPrompt && this._severity === Severity.Error) || // notification errors with actions are sticky
(!hasPrompt && this._expanded) || // notifications that got expanded are sticky
@@ -527,7 +525,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie
return !!this._silent;
}
hasPrompt(): boolean {
private get hasPrompt(): boolean {
if (!this._actions) {
return false;
}
@@ -539,7 +537,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie
return this._actions.primary.length > 0;
}
hasProgress(): boolean {
get hasProgress(): boolean {
return !!this._progress;
}
@@ -621,7 +619,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie
}
equals(other: INotificationViewItem): boolean {
if (this.hasProgress() || other.hasProgress()) {
if (this.hasProgress || other.hasProgress) {
return false;
}

View File

@@ -214,6 +214,11 @@ export interface IViewDescriptorCollection extends IDisposable {
export interface IViewContentDescriptor {
readonly content: string;
readonly when?: ContextKeyExpr | 'default';
/**
* ordered preconditions for each button in the content
*/
readonly preconditions?: (ContextKeyExpr | undefined)[];
}
export interface IViewsRegistry {