Merge from vscode 2e5312cd61ff99c570299ecc122c52584265eda2

This commit is contained in:
ADS Merger
2020-04-23 02:50:35 +00:00
committed by Anthony Dresser
parent 3603f55d97
commit 7f1d8fc32f
659 changed files with 22709 additions and 12497 deletions

View File

@@ -32,6 +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 EditorsVisibleContext = new RawContextKey<boolean>('editorIsOpen', false);
export const EditorPinnedContext = new RawContextKey<boolean>('editorPinned', false);
export const EditorGroupActiveEditorDirtyContext = new RawContextKey<boolean>('groupActiveEditorDirty', false);
@@ -69,6 +70,11 @@ export interface IEditorPane extends IComposite {
*/
readonly input: IEditorInput | undefined;
/**
* The assigned options of the editor.
*/
readonly options: EditorOptions | undefined;
/**
* The assigned group this editor is showing in.
*/
@@ -1298,6 +1304,7 @@ export interface IWorkbenchEditorConfiguration {
interface IEditorPartConfiguration {
showTabs?: boolean;
scrollToSwitchTabs?: 'off' | 'natural' | 'reverse';
highlightModifiedTabs?: boolean;
tabCloseButton?: 'left' | 'right' | 'off';
tabSizing?: 'fit' | 'shrink';

View File

@@ -23,11 +23,13 @@ export function WORKBENCH_BACKGROUND(theme: IColorTheme): Color {
// < --- Tabs --- >
//#region Tab Background
export const TAB_ACTIVE_BACKGROUND = registerColor('tab.activeBackground', {
dark: editorBackground,
light: editorBackground,
hc: editorBackground
}, nls.localize('tabActiveBackground', "Active tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
}, nls.localize('tabActiveBackground', "Active tab background color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_UNFOCUSED_ACTIVE_BACKGROUND = registerColor('tab.unfocusedActiveBackground', {
dark: TAB_ACTIVE_BACKGROUND,
@@ -39,7 +41,45 @@ export const TAB_INACTIVE_BACKGROUND = registerColor('tab.inactiveBackground', {
dark: '#2D2D2D',
light: '#ECECEC',
hc: null
}, nls.localize('tabInactiveBackground', "Inactive tab background color. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
}, nls.localize('tabInactiveBackground', "Inactive tab background color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_UNFOCUSED_INACTIVE_BACKGROUND = registerColor('tab.unfocusedInactiveBackground', {
dark: TAB_INACTIVE_BACKGROUND,
light: TAB_INACTIVE_BACKGROUND,
hc: TAB_INACTIVE_BACKGROUND
}, nls.localize('tabUnfocusedInactiveBackground', "Inactive tab background color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
//#endregion
//#region Tab Foreground
export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', {
dark: Color.white,
light: '#333333',
hc: Color.white
}, nls.localize('tabActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_INACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', {
dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5),
light: transparent(TAB_ACTIVE_FOREGROUND, 0.7),
hc: Color.white
}, nls.localize('tabInactiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_UNFOCUSED_ACTIVE_FOREGROUND = registerColor('tab.unfocusedActiveForeground', {
dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5),
light: transparent(TAB_ACTIVE_FOREGROUND, 0.7),
hc: Color.white
}, nls.localize('tabUnfocusedActiveForeground', "Active tab foreground color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_UNFOCUSED_INACTIVE_FOREGROUND = registerColor('tab.unfocusedInactiveForeground', {
dark: transparent(TAB_INACTIVE_FOREGROUND, 0.5),
light: transparent(TAB_INACTIVE_FOREGROUND, 0.5),
hc: Color.white
}, nls.localize('tabUnfocusedInactiveForeground', "Inactive tab foreground color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
//#endregion
//#region Tab Hover Foreground/Background
export const TAB_HOVER_BACKGROUND = registerColor('tab.hoverBackground', {
dark: null,
@@ -53,11 +93,21 @@ export const TAB_UNFOCUSED_HOVER_BACKGROUND = registerColor('tab.unfocusedHoverB
hc: null
}, nls.localize('tabUnfocusedHoverBackground', "Tab background color in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_BORDER = registerColor('tab.border', {
dark: '#252526',
light: '#F3F3F3',
hc: contrastBorder
}, nls.localize('tabBorder', "Border to separate tabs from each other. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_HOVER_FOREGROUND = registerColor('tab.hoverForeground', {
dark: null,
light: null,
hc: null
}, nls.localize('tabHoverForeground', "Tab foreground color when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_UNFOCUSED_HOVER_FOREGROUND = registerColor('tab.unfocusedHoverForeground', {
dark: transparent(TAB_HOVER_FOREGROUND, 0.5),
light: transparent(TAB_HOVER_FOREGROUND, 0.5),
hc: null
}, nls.localize('tabUnfocusedHoverForeground', "Tab foreground color in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
//#endregion
//#region Tab Borders
export const TAB_ACTIVE_BORDER = registerColor('tab.activeBorder', {
dark: null,
@@ -83,6 +133,22 @@ export const TAB_UNFOCUSED_ACTIVE_BORDER_TOP = registerColor('tab.unfocusedActiv
hc: null
}, nls.localize('tabActiveUnfocusedBorderTop', "Border to the top of an active tab in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_HOVER_BORDER = registerColor('tab.hoverBorder', {
dark: null,
light: null,
hc: null
}, nls.localize('tabHoverBorder', "Border to highlight tabs when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_UNFOCUSED_HOVER_BORDER = registerColor('tab.unfocusedHoverBorder', {
dark: transparent(TAB_HOVER_BORDER, 0.5),
light: transparent(TAB_HOVER_BORDER, 0.7),
hc: null
}, nls.localize('tabUnfocusedHoverBorder', "Border to highlight tabs in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
//#endregion
//#region Tab Modified Border
export const TAB_ACTIVE_MODIFIED_BORDER = registerColor('tab.activeModifiedBorder', {
dark: '#3399CC',
light: '#33AAEE',
@@ -107,41 +173,13 @@ export const TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER = registerColor('tab.unfocus
hc: Color.white
}, nls.localize('unfocusedINactiveModifiedBorder', "Border on the top of modified (dirty) inactive tabs in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_HOVER_BORDER = registerColor('tab.hoverBorder', {
dark: null,
light: null,
hc: null
}, nls.localize('tabHoverBorder', "Border to highlight tabs when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
//#endregion
export const TAB_UNFOCUSED_HOVER_BORDER = registerColor('tab.unfocusedHoverBorder', {
dark: transparent(TAB_HOVER_BORDER, 0.5),
light: transparent(TAB_HOVER_BORDER, 0.7),
hc: null
}, nls.localize('tabUnfocusedHoverBorder', "Border to highlight tabs in an unfocused group when hovering. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_ACTIVE_FOREGROUND = registerColor('tab.activeForeground', {
dark: Color.white,
light: '#333333',
hc: Color.white
}, nls.localize('tabActiveForeground', "Active tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_INACTIVE_FOREGROUND = registerColor('tab.inactiveForeground', {
dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5),
light: transparent(TAB_ACTIVE_FOREGROUND, 0.7),
hc: Color.white
}, nls.localize('tabInactiveForeground', "Inactive tab foreground color in an active group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_UNFOCUSED_ACTIVE_FOREGROUND = registerColor('tab.unfocusedActiveForeground', {
dark: transparent(TAB_ACTIVE_FOREGROUND, 0.5),
light: transparent(TAB_ACTIVE_FOREGROUND, 0.7),
hc: Color.white
}, nls.localize('tabUnfocusedActiveForeground', "Active tab foreground color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_UNFOCUSED_INACTIVE_FOREGROUND = registerColor('tab.unfocusedInactiveForeground', {
dark: transparent(TAB_INACTIVE_FOREGROUND, 0.5),
light: transparent(TAB_INACTIVE_FOREGROUND, 0.5),
hc: Color.white
}, nls.localize('tabUnfocusedInactiveForeground', "Inactive tab foreground color in an unfocused group. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
export const TAB_BORDER = registerColor('tab.border', {
dark: '#252526',
light: '#F3F3F3',
hc: contrastBorder
}, nls.localize('tabBorder', "Border to separate tabs from each other. Tabs are the containers for editors in the editor area. Multiple tabs can be opened in one editor group. There can be multiple editor groups."));
// < --- Editors --- >
@@ -178,7 +216,7 @@ export const EDITOR_GROUP_HEADER_TABS_BACKGROUND = registerColor('editorGroupHea
export const EDITOR_GROUP_HEADER_TABS_BORDER = registerColor('editorGroupHeader.tabsBorder', {
dark: null,
light: null,
hc: contrastBorder
hc: null
}, nls.localize('tabsContainerBorder', "Border color of the editor group title header when tabs are enabled. Editor groups are the containers of editors."));
export const EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND = registerColor('editorGroupHeader.noTabsBackground', {
@@ -187,6 +225,12 @@ export const EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND = registerColor('editorGroup
hc: editorBackground
}, nls.localize('editorGroupHeaderBackground', "Background color of the editor group title header when tabs are disabled (`\"workbench.editor.showTabs\": false`). Editor groups are the containers of editors."));
export const EDITOR_GROUP_HEADER_BORDER = registerColor('editorGroupHeader.border', {
dark: null,
light: null,
hc: contrastBorder
}, nls.localize('editorTitleContainerBorder', "Border color of the editor group title header. Editor groups are the containers of editors."));
export const EDITOR_GROUP_BORDER = registerColor('editorGroup.border', {
dark: '#444444',
light: '#E7E7E7',

View File

@@ -43,8 +43,12 @@ export interface IViewContainerDescriptor {
readonly ctorDescriptor: SyncDescriptor<IViewPaneContainer>;
readonly storageId?: string;
readonly icon?: string | URI;
readonly alwaysUseContainerInfo?: boolean;
readonly order?: number;
readonly focusCommand?: { id: string, keybindings?: IKeybindings };
@@ -135,7 +139,7 @@ class ViewContainersRegistryImpl extends Disposable implements IViewContainersRe
return existing;
}
const viewContainer: ViewContainer = { ...viewContainerDescriptor };
const viewContainer: ViewContainer = viewContainerDescriptor;
const viewContainers = getOrSet(this.viewContainers, viewContainerLocation, []);
viewContainers.push(viewContainer);
this._onDidRegister.fire({ viewContainer, viewContainerLocation });
@@ -207,11 +211,43 @@ export interface IViewDescriptor {
readonly remoteAuthority?: string | string[];
}
export interface IViewDescriptorCollection extends IDisposable {
readonly onDidChangeViews: Event<{ added: IViewDescriptor[], removed: IViewDescriptor[] }>;
readonly onDidChangeActiveViews: Event<{ added: IViewDescriptor[], removed: IViewDescriptor[] }>;
readonly activeViewDescriptors: IViewDescriptor[];
readonly allViewDescriptors: IViewDescriptor[];
export interface IViewDescriptorRef {
viewDescriptor: IViewDescriptor;
index: number;
}
export interface IAddedViewDescriptorRef extends IViewDescriptorRef {
collapsed: boolean;
size?: number;
}
export interface IViewContainerModel {
readonly title: string;
readonly icon: string | URI | undefined;
readonly onDidChangeContainerInfo: Event<{ title?: boolean, icon?: boolean }>;
readonly allViewDescriptors: ReadonlyArray<IViewDescriptor>;
readonly onDidChangeAllViewDescriptors: Event<{ added: ReadonlyArray<IViewDescriptor>, removed: ReadonlyArray<IViewDescriptor> }>;
readonly activeViewDescriptors: ReadonlyArray<IViewDescriptor>;
readonly onDidChangeActiveViewDescriptors: Event<{ added: ReadonlyArray<IViewDescriptor>, removed: ReadonlyArray<IViewDescriptor> }>;
readonly visibleViewDescriptors: ReadonlyArray<IViewDescriptor>;
readonly onDidAddVisibleViewDescriptors: Event<IAddedViewDescriptorRef[]>;
readonly onDidRemoveVisibleViewDescriptors: Event<IViewDescriptorRef[]>
readonly onDidMoveVisibleViewDescriptors: Event<{ from: IViewDescriptorRef; to: IViewDescriptorRef; }>
isVisible(id: string): boolean;
setVisible(id: string, visible: boolean, size?: number): void;
isCollapsed(id: string): boolean;
setCollapsed(id: string, collapsed: boolean): void;
getSize(id: string): number | undefined;
setSize(id: string, size: number): void
move(from: string, to: string): void;
}
export enum ViewContentPriority {
@@ -447,21 +483,29 @@ export interface IViewDescriptorService {
readonly onDidChangeContainer: Event<{ views: IViewDescriptor[], from: ViewContainer, to: ViewContainer }>;
readonly onDidChangeLocation: Event<{ views: IViewDescriptor[], from: ViewContainerLocation, to: ViewContainerLocation }>;
moveViewContainerToLocation(viewContainer: ViewContainer, location: ViewContainerLocation): void;
moveViewToLocation(view: IViewDescriptor, location: ViewContainerLocation): void;
moveViewsToContainer(views: IViewDescriptor[], viewContainer: ViewContainer): void;
getViewDescriptors(container: ViewContainer): IViewDescriptorCollection;
getViewContainerModel(viewContainer: ViewContainer): IViewContainerModel;
getViewDescriptor(viewId: string): IViewDescriptor | null;
getViewDescriptorById(id: string): IViewDescriptor | null;
getViewContainer(viewId: string): ViewContainer | null;
getViewContainerByViewId(id: string): ViewContainer | null;
getViewContainerLocation(viewContainr: ViewContainer): ViewContainerLocation | null;
getViewContainerById(id: string): ViewContainer | null;
getDefaultContainer(viewId: string): ViewContainer | null;
getViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation | null;
getViewLocation(viewId: string): ViewContainerLocation | null;
getDefaultContainerById(id: string): ViewContainer | null;
getViewLocationById(id: string): ViewContainerLocation | null;
getViewContainersByLocation(location: ViewContainerLocation): ViewContainer[];
getViewContainers(): ViewContainer[];
}
// Custom views