Merge from vscode 52dcb723a39ae75bee1bd56b3312d7fcdc87aeed (#6719)

This commit is contained in:
Anthony Dresser
2019-08-12 21:31:51 -07:00
committed by GitHub
parent 00250839fc
commit 7eba8c4c03
616 changed files with 9472 additions and 7087 deletions

View File

@@ -38,8 +38,8 @@ export interface IWorkbenchContributionsRegistry {
}
class WorkbenchContributionsRegistry implements IWorkbenchContributionsRegistry {
private instantiationService: IInstantiationService;
private lifecycleService: ILifecycleService;
private instantiationService: IInstantiationService | undefined;
private lifecycleService: ILifecycleService | undefined;
private readonly toBeInstantiated: Map<LifecyclePhase, IConstructorSignature0<IWorkbenchContribution>[]> = new Map<LifecyclePhase, IConstructorSignature0<IWorkbenchContribution>[]>();
@@ -67,7 +67,7 @@ class WorkbenchContributionsRegistry implements IWorkbenchContributionsRegistry
this.lifecycleService = accessor.get(ILifecycleService);
[LifecyclePhase.Starting, LifecyclePhase.Ready, LifecyclePhase.Restored, LifecyclePhase.Eventually].forEach(phase => {
this.instantiateByPhase(this.instantiationService, this.lifecycleService, phase);
this.instantiateByPhase(this.instantiationService!, this.lifecycleService!, phase);
});
}

View File

@@ -30,6 +30,8 @@ export const NoEditorsVisibleContext: ContextKeyExpr = EditorsVisibleContext.toN
export const TextCompareEditorVisibleContext = new RawContextKey<boolean>('textCompareEditorVisible', false);
export const TextCompareEditorActiveContext = new RawContextKey<boolean>('textCompareEditorActive', false);
export const ActiveEditorGroupEmptyContext = new RawContextKey<boolean>('activeEditorGroupEmpty', false);
export const ActiveEditorGroupIndexContext = new RawContextKey<number>('activeEditorGroupIndex', -1);
export const ActiveEditorGroupLastContext = new RawContextKey<boolean>('activeEditorGroupLast', false);
export const MultipleEditorGroupsContext = new RawContextKey<boolean>('multipleEditorGroups', false);
export const SingleEditorGroupsContext = MultipleEditorGroupsContext.toNegated();
export const InEditorZenModeContext = new RawContextKey<boolean>('inZenMode', false);

View File

@@ -17,8 +17,8 @@ import { withUndefinedAsNull } from 'vs/base/common/types';
* The base text editor model leverages the code editor model. This class is only intended to be subclassed and not instantiated.
*/
export abstract class BaseTextEditorModel extends EditorModel implements ITextEditorModel, IModeSupport {
protected textEditorModelHandle: URI | null;
private createdEditorModel: boolean;
protected textEditorModelHandle: URI | null = null;
private createdEditorModel: boolean | undefined;
private readonly modelDisposeListener = this._register(new MutableDisposable());

View File

@@ -243,7 +243,7 @@ export interface INotificationViewItem {
readonly silent: boolean;
readonly message: INotificationMessage;
readonly source: string | undefined;
readonly actions: INotificationActions;
readonly actions: INotificationActions | undefined;
readonly progress: INotificationViewItemProgress;
readonly expanded: boolean;
@@ -391,10 +391,10 @@ export class NotificationViewItem extends Disposable implements INotificationVie
// RegEx: [, anything not ], ], (, http://|https://|command:, no whitespace)
private static LINK_REGEX = /\[([^\]]+)\]\(((?:https?:\/\/|command:)[^\)\s]+)(?: "([^"]+)")?\)/gi;
private _expanded: boolean;
private _expanded: boolean | undefined;
private _actions: INotificationActions;
private _progress: NotificationViewItemProgress;
private _actions: INotificationActions | undefined;
private _progress: NotificationViewItemProgress | undefined;
private readonly _onDidExpansionChange: Emitter<void> = this._register(new Emitter<void>());
readonly onDidExpansionChange: Event<void> = this._onDidExpansionChange.event;
@@ -505,7 +505,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie
}
get expanded(): boolean {
return this._expanded;
return !!this._expanded;
}
get severity(): Severity {
@@ -534,6 +534,10 @@ export class NotificationViewItem extends Disposable implements INotificationVie
}
hasPrompt(): boolean {
if (!this._actions) {
return false;
}
if (!this._actions.primary) {
return false;
}
@@ -562,7 +566,7 @@ export class NotificationViewItem extends Disposable implements INotificationVie
return this._source;
}
get actions(): INotificationActions {
get actions(): INotificationActions | undefined {
return this._actions;
}
@@ -635,8 +639,8 @@ export class NotificationViewItem extends Disposable implements INotificationVie
return false;
}
const primaryActions = this._actions.primary || [];
const otherPrimaryActions = other.actions.primary || [];
const primaryActions = (this._actions && this._actions.primary) || [];
const otherPrimaryActions = (other.actions && other.actions.primary) || [];
if (primaryActions.length !== otherPrimaryActions.length) {
return false;
}
@@ -704,4 +708,4 @@ class StatusMessageViewItem {
return { message, options };
}
}
}

View File

@@ -17,7 +17,6 @@ import { values, keys } from 'vs/base/common/map';
import { Registry } from 'vs/platform/registry/common/platform';
import { IKeybindings } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { IAction } from 'vs/base/common/actions';
import { IMarkdownString } from 'vs/base/common/htmlContent';
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
export const TEST_VIEW_CONTAINER_ID = 'workbench.view.extension.test';
@@ -305,7 +304,7 @@ export interface ITreeView extends IDisposable {
showCollapseAllAction: boolean;
message?: string | IMarkdownString;
message?: string;
readonly visible: boolean;