Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 (#8911)

* Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2

* update distro

* fix layering

* update distro

* fix tests
This commit is contained in:
Anthony Dresser
2020-01-22 13:42:37 -08:00
committed by GitHub
parent 977111eb21
commit bd7aac8ee0
895 changed files with 24651 additions and 14520 deletions

View File

@@ -1123,6 +1123,8 @@ export class DirtyDiffModel extends Disposable {
this.originalModelDisposables.add(ref.object.textEditorModel.onDidChangeContent(() => this.triggerDiff()));
return originalUri;
}).catch(error => {
return null; // possibly invalid reference
});
});

View File

@@ -31,6 +31,7 @@ import { WorkbenchList } from 'vs/platform/list/browser/listService';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IViewDescriptor } from 'vs/workbench/common/views';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
export interface ISpliceEvent<T> {
index: number;
@@ -182,12 +183,12 @@ export class MainPane extends ViewPane {
@IKeybindingService protected keybindingService: IKeybindingService,
@IContextMenuService protected contextMenuService: IContextMenuService,
@ISCMService protected scmService: ISCMService,
@IInstantiationService private readonly instantiationService: IInstantiationService,
@IInstantiationService instantiationService: IInstantiationService,
@IContextKeyService private readonly contextKeyService: IContextKeyService,
@IMenuService private readonly menuService: IMenuService,
@IConfigurationService configurationService: IConfigurationService
) {
super(options, keybindingService, contextMenuService, configurationService, contextKeyService);
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
}
protected renderBody(container: HTMLElement): void {
@@ -320,7 +321,7 @@ export class MainPaneDescriptor implements IViewDescriptor {
readonly id = MainPane.ID;
readonly name = MainPane.TITLE;
readonly ctorDescriptor: { ctor: any, arguments?: any[] };
readonly ctorDescriptor: SyncDescriptor<MainPane>;
readonly canToggleVisibility = true;
readonly hideByDefault = false;
readonly order = -1000;
@@ -328,6 +329,6 @@ export class MainPaneDescriptor implements IViewDescriptor {
readonly when = ContextKeyExpr.or(ContextKeyExpr.equals('config.scm.alwaysShowProviders', true), ContextKeyExpr.and(ContextKeyExpr.notEquals('scm.providerCount', 0), ContextKeyExpr.notEquals('scm.providerCount', 1)));
constructor(viewModel: IViewModel) {
this.ctorDescriptor = { ctor: MainPane, arguments: [viewModel] };
this.ctorDescriptor = new SyncDescriptor(MainPane, [viewModel]);
}
}

View File

@@ -114,7 +114,7 @@
overflow: hidden;
}
.scm-viewlet .monaco-list-row .resource > .name.strike-through > .monaco-icon-label > .monaco-icon-label-description-container > .label-name {
.scm-viewlet .monaco-list-row .resource > .name.strike-through > .monaco-icon-label > .monaco-icon-label-container > .monaco-icon-name-container > .label-name {
text-decoration: line-through;
}

View File

@@ -54,6 +54,7 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
import { toResource, SideBySideEditor } from 'vs/workbench/common/editor';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { Hasher } from 'vs/base/common/hash';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
type TreeElement = ISCMResourceGroup | IResourceNode<ISCMResource, ISCMResourceGroup> | ISCMResource;
@@ -617,7 +618,7 @@ export class RepositoryPane extends ViewPane {
@IMenuService protected menuService: IMenuService,
@IStorageService private storageService: IStorageService
) {
super(options, keybindingService, contextMenuService, configurationService, contextKeyService);
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, instantiationService);
this.menus = instantiationService.createInstance(SCMMenus, this.repository.provider);
this._register(this.menus);
@@ -957,7 +958,7 @@ export class RepositoryViewDescriptor implements IViewDescriptor {
readonly id: string;
readonly name: string;
readonly ctorDescriptor: { ctor: any, arguments?: any[] };
readonly ctorDescriptor: SyncDescriptor<RepositoryPane>;
readonly canToggleVisibility = true;
readonly order = -500;
readonly workspace = true;
@@ -970,6 +971,6 @@ export class RepositoryViewDescriptor implements IViewDescriptor {
this.id = `scm:repository:${hasher.value}`;
this.name = repository.provider.rootUri ? basename(repository.provider.rootUri) : repository.provider.label;
this.ctorDescriptor = { ctor: RepositoryPane, arguments: [repository] };
this.ctorDescriptor = new SyncDescriptor(RepositoryPane, [repository]);
}
}

View File

@@ -25,6 +25,7 @@ import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { SCMService } from 'vs/workbench/contrib/scm/common/scmService';
import { IViewContainersRegistry, ViewContainerLocation, Extensions as ViewContainerExtensions } from 'vs/workbench/common/views';
import { SCMViewPaneContainer } from 'vs/workbench/contrib/scm/browser/scmViewlet';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
class OpenSCMViewletAction extends ShowViewletAction {
@@ -42,7 +43,7 @@ Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench)
Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
id: VIEWLET_ID,
name: localize('source control', "Source Control"),
ctorDescriptor: { ctor: SCMViewPaneContainer },
ctorDescriptor: new SyncDescriptor(SCMViewPaneContainer),
icon: 'codicon-source-control',
order: 12 // {{SQL CARBON EDIT}}
}, ViewContainerLocation.Sidebar);