Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3

This commit is contained in:
ADS Merger
2020-03-11 04:19:23 +00:00
parent 16fab722d5
commit 4c3e48773d
880 changed files with 20441 additions and 11232 deletions

View File

@@ -159,8 +159,7 @@ export class SCMStatusController implements IWorkbenchContribution {
disposables.add(this.statusbarService.addEntry({
text: c.title,
tooltip: `${label} - ${c.tooltip}`,
command: c.id,
arguments: c.arguments
command: c
}, 'status.scm', localize('status.scm', "Source Control"), MainThreadStatusBarAlignment.LEFT, 10000));
}

View File

@@ -19,7 +19,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import { URI } from 'vs/base/common/uri';
import { ISCMService, ISCMRepository, ISCMProvider } from 'vs/workbench/contrib/scm/common/scm';
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
import { registerThemingParticipant, ITheme, ICssStyleCollector, themeColorFromId, IThemeService } from 'vs/platform/theme/common/themeService';
import { registerThemingParticipant, IColorTheme, ICssStyleCollector, themeColorFromId, IThemeService } from 'vs/platform/theme/common/themeService';
import { registerColor, transparent } from 'vs/platform/theme/common/colorRegistry';
import { Color, RGBA } from 'vs/base/common/color';
import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser';
@@ -140,7 +140,7 @@ function getChangeType(change: IChange): ChangeType {
}
}
function getChangeTypeColor(theme: ITheme, changeType: ChangeType): Color | undefined {
function getChangeTypeColor(theme: IColorTheme, changeType: ChangeType): Color | undefined {
switch (changeType) {
case ChangeType.Modify: return theme.getColor(editorGutterModifiedBackground);
case ChangeType.Add: return theme.getColor(editorGutterAddedBackground);
@@ -183,8 +183,8 @@ class DirtyDiffWidget extends PeekViewWidget {
) {
super(editor, { isResizeable: true, frameWidth: 1, keepEditorSelection: true });
this._disposables.add(themeService.onThemeChange(this._applyTheme, this));
this._applyTheme(themeService.getTheme());
this._disposables.add(themeService.onDidColorThemeChange(this._applyTheme, this));
this._applyTheme(themeService.getColorTheme());
this.contextKeyService = contextKeyService.createScoped();
this.contextKeyService.createKey('originalResourceScheme', this.model.original!.uri.scheme);
@@ -230,7 +230,7 @@ class DirtyDiffWidget extends PeekViewWidget {
this.renderTitle();
const changeType = getChangeType(change);
const changeTypeColor = getChangeTypeColor(this.themeService.getTheme(), changeType);
const changeTypeColor = getChangeTypeColor(this.themeService.getColorTheme(), changeType);
this.style({ frameColor: changeTypeColor, arrowColor: changeTypeColor });
this._actionbarWidget!.context = [this.model.modified!.uri, this.model.changes, index];
@@ -343,7 +343,7 @@ class DirtyDiffWidget extends PeekViewWidget {
this.diffEditor.revealLinesInCenter(start, end, ScrollType.Immediate);
}
private _applyTheme(theme: ITheme) {
private _applyTheme(theme: IColorTheme) {
const borderColor = theme.getColor(peekViewBorder) || Color.transparent;
this.style({
arrowColor: borderColor,
@@ -1317,7 +1317,7 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor
// or not. Needs context from the editor, to know whether it is a diff editor, in place editor
// etc.
private onEditorsChanged(): void {
const models = this.editorService.visibleTextEditorWidgets
const models = this.editorService.visibleTextEditorControls
// only interested in code editor widgets
.filter(c => c instanceof CodeEditorWidget)
@@ -1372,7 +1372,7 @@ export class DirtyDiffWorkbenchController extends Disposable implements ext.IWor
registerEditorContribution(DirtyDiffController.ID, DirtyDiffController);
registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => {
const editorGutterModifiedBackgroundColor = theme.getColor(editorGutterModifiedBackground);
if (editorGutterModifiedBackgroundColor) {
collector.addRule(`

View File

@@ -212,8 +212,8 @@ export class MainPane extends ViewPane {
});
this._register(renderer.onDidRenderElement(e => this.list.updateWidth(this.viewModel.repositories.indexOf(e)), null));
this._register(this.list.onSelectionChange(this.onListSelectionChange, this));
this._register(this.list.onFocusChange(this.onListFocusChange, this));
this._register(this.list.onDidChangeSelection(this.onListSelectionChange, this));
this._register(this.list.onDidChangeFocus(this.onListFocusChange, this));
this._register(this.list.onContextMenu(this.onListContextMenu, this));
this._register(this.viewModel.onDidChangeVisibleRepositories(this.updateListSelection, this));

View File

@@ -24,7 +24,7 @@ import { IAction, IActionViewItem, ActionRunner, Action } from 'vs/base/common/a
import { ContextAwareMenuEntryActionViewItem } from 'vs/platform/actions/browser/menuEntryActionViewItem';
import { SCMMenus } from './menus';
import { ActionBar, IActionViewItemProvider } from 'vs/base/browser/ui/actionbar/actionbar';
import { IThemeService, LIGHT, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { IThemeService, LIGHT, registerThemingParticipant, IFileIconTheme } from 'vs/platform/theme/common/themeService';
import { isSCMResource, isSCMResourceGroup, connectPrimaryMenuToInlineActionBar } from './util';
import { attachBadgeStyler } from 'vs/platform/theme/common/styler';
import { WorkbenchCompressibleObjectTree } from 'vs/platform/list/browser/listService';
@@ -45,7 +45,6 @@ import { IViewDescriptor, IViewDescriptorService } from 'vs/workbench/common/vie
import { localize } from 'vs/nls';
import { flatten, find } from 'vs/base/common/arrays';
import { memoize } from 'vs/base/common/decorators';
import { IWorkbenchThemeService, IFileIconTheme } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
import { toResource, SideBySideEditor } from 'vs/workbench/common/editor';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
@@ -67,6 +66,9 @@ import { SuggestController } from 'vs/editor/contrib/suggest/suggestController';
import { SnippetController2 } from 'vs/editor/contrib/snippet/snippetController2';
import { Schemas } from 'vs/base/common/network';
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
import { ModesHoverController } from 'vs/editor/contrib/hover/hover';
import { ColorDetector } from 'vs/editor/contrib/colorPicker/colorDetector';
import { LinkDetector } from 'vs/editor/contrib/links/links';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
@@ -206,7 +208,7 @@ class ResourceRenderer implements ICompressibleTreeRenderer<ISCMResource | IReso
const elementDisposables = new DisposableStore();
const resourceOrFolder = node.element;
const theme = this.themeService.getTheme();
const theme = this.themeService.getColorTheme();
const iconResource = ResourceTree.isResourceNode(resourceOrFolder) ? resourceOrFolder.element : resourceOrFolder;
const icon = iconResource && (theme.type === LIGHT ? iconResource.decorations.icon : iconResource.decorations.iconDark);
@@ -625,7 +627,7 @@ export class RepositoryPane extends ViewPane {
readonly repository: ISCMRepository,
options: IViewPaneOptions,
@IKeybindingService protected keybindingService: IKeybindingService,
@IWorkbenchThemeService protected themeService: IWorkbenchThemeService,
@IThemeService protected themeService: IThemeService,
@IContextMenuService protected contextMenuService: IContextMenuService,
@IContextViewService protected contextViewService: IContextViewService,
@ICommandService protected commandService: ICommandService,
@@ -747,6 +749,9 @@ export class RepositoryPane extends ViewPane {
MenuPreventer.ID,
SelectionClipboardContributionID,
ContextMenuController.ID,
ColorDetector.ID,
ModesHoverController.ID,
LinkDetector.ID
])
};
@@ -999,10 +1004,10 @@ export class RepositoryPane extends ViewPane {
}
private pin(): void {
const activeControl = this.editorService.activeControl;
const activeEditorPane = this.editorService.activeEditorPane;
if (activeControl) {
activeControl.group.pinEditor(activeControl.input);
if (activeEditorPane) {
activeEditorPane.group.pinEditor(activeEditorPane.input);
}
}