Merge from vscode 27ada910e121e23a6d95ecca9cae595fb98ab568

This commit is contained in:
ADS Merger
2020-04-30 00:53:43 +00:00
parent 87e5239713
commit 93f35ca321
413 changed files with 7190 additions and 8756 deletions

View File

@@ -32,7 +32,7 @@ import { IFilesConfigurationService, AutoSaveMode } from 'vs/workbench/services/
export const DirtyWorkingCopiesContext = new RawContextKey<boolean>('dirtyWorkingCopies', false);
export const ActiveEditorContext = new RawContextKey<string | null>('activeEditor', null);
export const ActiveEditorIsReadonlyContext = new RawContextKey<boolean>('activeEditorIsReadonly', false);
export const ActiveEditorAvailableEditorsContext = new RawContextKey<string>('availableEditors', '');
export const ActiveEditorAvailableEditorIdsContext = new RawContextKey<string>('activeEditorAvailableEditorIds', '');
export const EditorsVisibleContext = new RawContextKey<boolean>('editorIsOpen', false);
export const EditorPinnedContext = new RawContextKey<boolean>('editorPinned', false);
export const EditorGroupActiveEditorDirtyContext = new RawContextKey<boolean>('groupActiveEditorDirty', false);
@@ -1304,7 +1304,7 @@ export interface IWorkbenchEditorConfiguration {
interface IEditorPartConfiguration {
showTabs?: boolean;
scrollToSwitchTabs?: 'off' | 'natural' | 'reverse';
scrollToSwitchTabs?: boolean;
highlightModifiedTabs?: boolean;
tabCloseButton?: 'left' | 'right' | 'off';
tabSizing?: 'fit' | 'shrink';

View File

@@ -384,7 +384,7 @@ export class EditorGroup extends Disposable {
moveEditor(candidate: EditorInput, toIndex: number): EditorInput | undefined {
const index = this.indexOf(candidate);
if (index < 0) {
if (index < 0 || toIndex === index) {
return undefined; // {{SQL CARBON EDIT}} strict-null-check
}
@@ -482,6 +482,10 @@ export class EditorGroup extends Disposable {
isPinned(editor: EditorInput): boolean;
isPinned(index: number): boolean;
isPinned(arg1: EditorInput | number): boolean {
if (!this.preview) {
return true; // no preview editor
}
let editor: EditorInput;
let index: number;
if (typeof arg1 === 'number') {
@@ -496,10 +500,6 @@ export class EditorGroup extends Disposable {
return false; // editor not found
}
if (!this.preview) {
return true; // no preview editor
}
return !this.matches(this.preview, editor);
}

View File

@@ -7,7 +7,7 @@ import { IView, IViewPaneContainer } from 'vs/workbench/common/views';
import { IComposite } from 'vs/workbench/common/composite';
export interface IPaneComposite extends IComposite {
openView(id: string, focus?: boolean): IView;
openView<T extends IView>(id: string, focus?: boolean): T | undefined;
getViewPaneContainer(): IViewPaneContainer;
saveState(): void;
}

View File

@@ -8,7 +8,6 @@ import { UriComponents, URI } from 'vs/base/common/uri';
import { Event, Emitter } from 'vs/base/common/event';
import { RawContextKey, ContextKeyExpression } from 'vs/platform/contextkey/common/contextkey';
import { localize } from 'vs/nls';
import { IViewlet } from 'vs/workbench/common/viewlet';
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
import { IDisposable, Disposable, toDisposable } from 'vs/base/common/lifecycle';
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
@@ -443,12 +442,6 @@ export interface IView {
getProgressIndicator(): IProgressIndicator | undefined;
}
export interface IViewsViewlet extends IViewlet {
openView(id: string, focus?: boolean): IView;
}
export const IViewsService = createDecorator<IViewsService>('viewsService');
export interface IViewsService {
@@ -482,6 +475,7 @@ export interface IViewDescriptorService {
readonly onDidChangeContainer: Event<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>;
readonly onDidChangeLocation: Event<{ views: IViewDescriptor[], from: ViewContainerLocation, to: ViewContainerLocation }>;
readonly onDidChangeContainerLocation: Event<{ viewContainer: ViewContainer, from: ViewContainerLocation, to: ViewContainerLocation }>;
moveViewContainerToLocation(viewContainer: ViewContainer, location: ViewContainerLocation): void;
@@ -499,6 +493,8 @@ export interface IViewDescriptorService {
getViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation | null;
getDefaultViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation | null;
getDefaultContainerById(id: string): ViewContainer | null;
getViewLocationById(id: string): ViewContainerLocation | null;
@@ -631,7 +627,7 @@ export interface IEditableData {
validationMessage: (value: string) => { content: string, severity: Severity } | null;
placeholder?: string | null;
startingValue?: string | null;
onFinish: (value: string, success: boolean) => void;
onFinish: (value: string, success: boolean) => Promise<void>;
}
export interface IViewPaneContainer {