Merge from vscode cbeff45f80213db0ddda2183170281ed97ed3b12 (#8670)

* Merge from vscode cbeff45f80213db0ddda2183170281ed97ed3b12

* fix null strict checks
This commit is contained in:
Anthony Dresser
2019-12-13 00:50:37 -08:00
committed by GitHub
parent 67abc2f690
commit 642920504a
136 changed files with 2918 additions and 1729 deletions

View File

@@ -542,7 +542,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
}
// Empty workbench
else if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY && this.configurationService.inspect('workbench.startupEditor').value === 'newUntitledFile') {
else if (this.contextService.getWorkbenchState() === WorkbenchState.EMPTY && this.configurationService.getValue('workbench.startupEditor') === 'newUntitledFile') {
if (this.editorGroupService.willRestoreEditors) {
return []; // do not open any empty untitled file if we restored editors from previous session
}

View File

@@ -47,7 +47,7 @@ import { IEditorGroupView } from 'vs/workbench/browser/parts/editor/editor';
import { onDidChangeZoomLevel } from 'vs/base/browser/browser';
import { withNullAsUndefined, withUndefinedAsNull } from 'vs/base/common/types';
import { ILabelService } from 'vs/platform/label/common/label';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
class Item extends BreadcrumbsItem {
@@ -169,7 +169,7 @@ export class BreadcrumbsControl {
@IThemeService private readonly _themeService: IThemeService,
@IQuickOpenService private readonly _quickOpenService: IQuickOpenService,
@IConfigurationService private readonly _configurationService: IConfigurationService,
@ITextResourceConfigurationService private readonly _textResourceConfigurationService: ITextResourceConfigurationService,
@IResourceConfigurationService private readonly _textResourceConfigurationService: IResourceConfigurationService,
@IFileService private readonly _fileService: IFileService,
@ITelemetryService private readonly _telemetryService: ITelemetryService,
@ILabelService private readonly _labelService: ILabelService,

View File

@@ -24,7 +24,7 @@ import { FileKind } from 'vs/platform/files/common/files';
import { withNullAsUndefined } from 'vs/base/common/types';
import { OutlineFilter } from 'vs/editor/contrib/documentSymbols/outlineTree';
import { ITextModel } from 'vs/editor/common/model';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
export class FileElement {
constructor(
@@ -55,7 +55,7 @@ export class EditorBreadcrumbsModel {
private readonly _uri: URI,
private readonly _editor: ICodeEditor | undefined,
@IConfigurationService private readonly _configurationService: IConfigurationService,
@ITextResourceConfigurationService private readonly _textResourceConfigurationService: ITextResourceConfigurationService,
@IResourceConfigurationService private readonly _textResourceConfigurationService: IResourceConfigurationService,
@IWorkspaceContextService workspaceService: IWorkspaceContextService,
) {
this._cfgFilePath = BreadcrumbsConfig.FilePath.bindTo(_configurationService);

View File

@@ -36,7 +36,7 @@ import { IExtensionGalleryService } from 'vs/platform/extensionManagement/common
import { ITextFileService, SUPPORTED_ENCODINGS } from 'vs/workbench/services/textfile/common/textfiles';
import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents';
import { ConfigurationChangedEvent, IEditorOptions, EditorOption } from 'vs/editor/common/config/editorOptions';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { ConfigurationTarget, IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { deepClone } from 'vs/base/common/objects';
import { ICodeEditor, getCodeEditor } from 'vs/editor/browser/editorBrowser';
@@ -1249,7 +1249,7 @@ export class ChangeEncodingAction extends Action {
actionLabel: string,
@IEditorService private readonly editorService: IEditorService,
@IQuickInputService private readonly quickInputService: IQuickInputService,
@ITextResourceConfigurationService private readonly textResourceConfigurationService: ITextResourceConfigurationService,
@IResourceConfigurationService private readonly textResourceConfigurationService: IResourceConfigurationService,
@IFileService private readonly fileService: IFileService,
@ITextFileService private readonly textFileService: ITextFileService
) {

View File

@@ -16,7 +16,7 @@ import { DiffEditorWidget } from 'vs/editor/browser/widget/diffEditorWidget';
import { TextDiffEditorModel } from 'vs/workbench/common/editor/textDiffEditorModel';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { TextFileOperationError, TextFileOperationResult } from 'vs/workbench/services/textfile/common/textfiles';
@@ -48,7 +48,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
@ITelemetryService telemetryService: ITelemetryService,
@IInstantiationService instantiationService: IInstantiationService,
@IStorageService storageService: IStorageService,
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
@IResourceConfigurationService configurationService: IResourceConfigurationService,
@IEditorService editorService: IEditorService,
@IThemeService themeService: IThemeService,
@IEditorGroupsService editorGroupService: IEditorGroupsService,

View File

@@ -16,7 +16,7 @@ import { IStorageService } from 'vs/platform/storage/common/storage';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
import { isCodeEditor, getCodeEditor } from 'vs/editor/browser/editorBrowser';
import { IEditorGroupsService, IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
@@ -46,7 +46,7 @@ export abstract class BaseTextEditor extends BaseEditor implements ITextEditor {
@ITelemetryService telemetryService: ITelemetryService,
@IInstantiationService private readonly _instantiationService: IInstantiationService,
@IStorageService storageService: IStorageService,
@ITextResourceConfigurationService private readonly _configurationService: ITextResourceConfigurationService,
@IResourceConfigurationService private readonly _configurationService: IResourceConfigurationService,
@IThemeService protected themeService: IThemeService,
@IEditorService protected editorService: IEditorService,
@IEditorGroupsService protected editorGroupService: IEditorGroupsService
@@ -66,7 +66,7 @@ export abstract class BaseTextEditor extends BaseEditor implements ITextEditor {
return this._instantiationService;
}
protected get configurationService(): ITextResourceConfigurationService {
protected get configurationService(): IResourceConfigurationService {
return this._configurationService;
}

View File

@@ -13,7 +13,7 @@ import { UntitledTextEditorInput } from 'vs/workbench/common/editor/untitledText
import { BaseTextEditor } from 'vs/workbench/browser/parts/editor/textEditor';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { ITextResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IResourceConfigurationService } from 'vs/editor/common/services/resourceConfiguration';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { Event } from 'vs/base/common/event';
@@ -33,7 +33,7 @@ export class AbstractTextResourceEditor extends BaseTextEditor {
@ITelemetryService telemetryService: ITelemetryService,
@IInstantiationService instantiationService: IInstantiationService,
@IStorageService storageService: IStorageService,
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
@IResourceConfigurationService configurationService: IResourceConfigurationService,
@IThemeService themeService: IThemeService,
@IEditorGroupsService editorGroupService: IEditorGroupsService,
@IEditorService editorService: IEditorService
@@ -184,7 +184,7 @@ export class TextResourceEditor extends AbstractTextResourceEditor {
@ITelemetryService telemetryService: ITelemetryService,
@IInstantiationService instantiationService: IInstantiationService,
@IStorageService storageService: IStorageService,
@ITextResourceConfigurationService configurationService: ITextResourceConfigurationService,
@IResourceConfigurationService configurationService: IResourceConfigurationService,
@IThemeService themeService: IThemeService,
@IEditorService editorService: IEditorService,
@IEditorGroupsService editorGroupService: IEditorGroupsService

View File

@@ -1 +0,0 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.279 5.5L11 10.221l-.779.779L5.5 6.279.779 11 0 10.221 4.721 5.5 0 .779.779 0 5.5 4.721 10.221 0 11 .779 6.279 5.5z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 242 B

View File

@@ -1 +0,0 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.279 5.5L11 10.221l-.779.779L5.5 6.279.779 11 0 10.221 4.721 5.5 0 .779.779 0 5.5 4.721 10.221 0 11 .779 6.279 5.5z" fill="#000"/></svg>

Before

Width:  |  Height:  |  Size: 242 B

View File

@@ -1 +0,0 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 0v11H0V0h11zM9.899 1.101H1.1V9.9H9.9V1.1z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 170 B

View File

@@ -1 +0,0 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 0v11H0V0h11zM9.899 1.101H1.1V9.9H9.9V1.1z" fill="#000"/></svg>

Before

Width:  |  Height:  |  Size: 170 B

View File

@@ -1 +0,0 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 4.399V5.5H0V4.399h11z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 150 B

View File

@@ -1 +0,0 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 4.399V5.5H0V4.399h11z" fill="#000"/></svg>

Before

Width:  |  Height:  |  Size: 150 B

View File

@@ -1 +0,0 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 8.798H8.798V11H0V2.202h2.202V0H11v8.798zm-3.298-5.5h-6.6v6.6h6.6v-6.6zM9.9 1.1H3.298v1.101h5.5v5.5h1.1v-6.6z" fill="#fff"/></svg>

Before

Width:  |  Height:  |  Size: 237 B

View File

@@ -1 +0,0 @@
<svg width="11" height="11" viewBox="0 0 11 11" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11 8.798H8.798V11H0V2.202h2.202V0H11v8.798zm-3.298-5.5h-6.6v6.6h6.6v-6.6zM9.9 1.1H3.298v1.101h5.5v5.5h1.1v-6.6z" fill="#000"/></svg>

Before

Width:  |  Height:  |  Size: 237 B

View File

@@ -329,12 +329,9 @@ export class CustomMenubarControl extends MenubarControl {
const menubarActiveWindowFgColor = theme.getColor(TITLE_BAR_ACTIVE_FOREGROUND);
if (menubarActiveWindowFgColor) {
collector.addRule(`
.monaco-workbench .menubar > .menubar-menu-button {
color: ${menubarActiveWindowFgColor};
}
.monaco-workbench .menubar > .menubar-menu-button,
.monaco-workbench .menubar .toolbar-toggle-more {
background-color: ${menubarActiveWindowFgColor}
color: ${menubarActiveWindowFgColor};
}
`);
}
@@ -342,12 +339,9 @@ export class CustomMenubarControl extends MenubarControl {
const activityBarInactiveFgColor = theme.getColor(ACTIVITY_BAR_INACTIVE_FOREGROUND);
if (activityBarInactiveFgColor) {
collector.addRule(`
.monaco-workbench .menubar.compact > .menubar-menu-button {
color: ${activityBarInactiveFgColor};
}
.monaco-workbench .menubar.compact > .menubar-menu-button,
.monaco-workbench .menubar.compact .toolbar-toggle-more {
background-color: ${activityBarInactiveFgColor}
color: ${activityBarInactiveFgColor};
}
`);
@@ -358,14 +352,11 @@ export class CustomMenubarControl extends MenubarControl {
collector.addRule(`
.monaco-workbench .menubar.compact > .menubar-menu-button.open,
.monaco-workbench .menubar.compact > .menubar-menu-button:focus,
.monaco-workbench .menubar.compact:not(:focus-within) > .menubar-menu-button:hover {
color: ${activityBarFgColor};
}
.monaco-workbench .menubar.compact:not(:focus-within) > .menubar-menu-button:hover,
.monaco-workbench .menubar.compact > .menubar-menu-button.open .toolbar-toggle-more,
.monaco-workbench .menubar.compact > .menubar-menu-button:focus .toolbar-toggle-more,
.monaco-workbench .menubar.compact:not(:focus-within) > .menubar-menu-button:hover .toolbar-toggle-more {
background-color: ${activityBarFgColor}
color: ${activityBarFgColor};
}
`);
}
@@ -373,13 +364,10 @@ export class CustomMenubarControl extends MenubarControl {
const menubarInactiveWindowFgColor = theme.getColor(TITLE_BAR_INACTIVE_FOREGROUND);
if (menubarInactiveWindowFgColor) {
collector.addRule(`
.monaco-workbench .menubar.inactive:not(.compact) > .menubar-menu-button {
.monaco-workbench .menubar.inactive:not(.compact) > .menubar-menu-button,
.monaco-workbench .menubar.inactive:not(.compact) > .menubar-menu-button .toolbar-toggle-more {
color: ${menubarInactiveWindowFgColor};
}
.monaco-workbench .menubar.inactive:not(.compact) > .menubar-menu-button .toolbar-toggle-more {
background-color: ${menubarInactiveWindowFgColor}
}
`);
}
@@ -389,14 +377,11 @@ export class CustomMenubarControl extends MenubarControl {
collector.addRule(`
.monaco-workbench .menubar:not(.compact) > .menubar-menu-button.open,
.monaco-workbench .menubar:not(.compact) > .menubar-menu-button:focus,
.monaco-workbench .menubar:not(:focus-within):not(.compact) > .menubar-menu-button:hover {
color: ${menubarSelectedFgColor};
}
.monaco-workbench .menubar:not(:focus-within):not(.compact) > .menubar-menu-button:hover,
.monaco-workbench .menubar:not(.compact) > .menubar-menu-button.open .toolbar-toggle-more,
.monaco-workbench .menubar:not(.compact) > .menubar-menu-button:focus .toolbar-toggle-more,
.monaco-workbench .menubar:not(:focus-within):not(.compact) > .menubar-menu-button:hover .toolbar-toggle-more {
background-color: ${menubarSelectedFgColor}
color: ${menubarSelectedFgColor};
}
`);
}