Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
@@ -20,7 +20,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
|
||||
import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition } from 'vs/editor/browser/editorBrowser';
|
||||
import { attachInputBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { editorWidgetBackground, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { editorWidgetBackground, editorWidgetForeground, widgetShadow } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { ScrollType } from 'vs/editor/common/editorCommon';
|
||||
import { SearchWidget, SearchOptions } from 'vs/workbench/contrib/preferences/browser/preferencesWidgets';
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
@@ -227,12 +227,17 @@ export class DefineKeybindingWidget extends Widget {
|
||||
const message = nls.localize('defineKeybinding.initial', "Press desired key combination and then press ENTER.");
|
||||
dom.append(this._domNode.domNode, dom.$('.message', undefined, message));
|
||||
|
||||
this._register(attachStylerCallback(this.themeService, { editorWidgetBackground, widgetShadow }, colors => {
|
||||
this._register(attachStylerCallback(this.themeService, { editorWidgetBackground, editorWidgetForeground, widgetShadow }, colors => {
|
||||
if (colors.editorWidgetBackground) {
|
||||
this._domNode.domNode.style.backgroundColor = colors.editorWidgetBackground.toString();
|
||||
} else {
|
||||
this._domNode.domNode.style.backgroundColor = null;
|
||||
}
|
||||
if (colors.editorWidgetForeground) {
|
||||
this._domNode.domNode.style.color = colors.editorWidgetForeground.toString();
|
||||
} else {
|
||||
this._domNode.domNode.style.color = null;
|
||||
}
|
||||
|
||||
if (colors.widgetShadow) {
|
||||
this._domNode.domNode.style.boxShadow = `0 2px 8px ${colors.widgetShadow}`;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { localize } from 'vs/nls';
|
||||
import { Delayer } from 'vs/base/common/async';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { OS } from 'vs/base/common/platform';
|
||||
import { dispose, Disposable, toDisposable, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { dispose, Disposable, IDisposable, combinedDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { CheckboxActionViewItem } from 'vs/base/browser/ui/checkbox/checkbox';
|
||||
import { HighlightedLabel } from 'vs/base/browser/ui/highlightedlabel/highlightedLabel';
|
||||
import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel';
|
||||
@@ -248,7 +248,7 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
|
||||
});
|
||||
}
|
||||
|
||||
copyKeybinding(keybinding: IKeybindingItemEntry): void {
|
||||
async copyKeybinding(keybinding: IKeybindingItemEntry): Promise<void> {
|
||||
this.selectEntry(keybinding);
|
||||
this.reportKeybindingAction(KEYBINDINGS_EDITOR_COMMAND_COPY, keybinding.keybindingItem.command, keybinding.keybindingItem.keybinding);
|
||||
const userFriendlyKeybinding: IUserFriendlyKeybinding = {
|
||||
@@ -258,13 +258,13 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
|
||||
if (keybinding.keybindingItem.when) {
|
||||
userFriendlyKeybinding.when = keybinding.keybindingItem.when;
|
||||
}
|
||||
this.clipboardService.writeText(JSON.stringify(userFriendlyKeybinding, null, ' '));
|
||||
await this.clipboardService.writeText(JSON.stringify(userFriendlyKeybinding, null, ' '));
|
||||
}
|
||||
|
||||
copyKeybindingCommand(keybinding: IKeybindingItemEntry): void {
|
||||
async copyKeybindingCommand(keybinding: IKeybindingItemEntry): Promise<void> {
|
||||
this.selectEntry(keybinding);
|
||||
this.reportKeybindingAction(KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, keybinding.keybindingItem.command, keybinding.keybindingItem.keybinding);
|
||||
this.clipboardService.writeText(keybinding.keybindingItem.command);
|
||||
await this.clipboardService.writeText(keybinding.keybindingItem.command);
|
||||
}
|
||||
|
||||
focusSearch(): void {
|
||||
@@ -490,10 +490,10 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
|
||||
if (this.input) {
|
||||
const input: KeybindingsEditorInput = this.input as KeybindingsEditorInput;
|
||||
this.keybindingsEditorModel = await input.resolve();
|
||||
const editorActionsLabels: { [id: string]: string; } = EditorExtensionsRegistry.getEditorActions().reduce((editorActions, editorAction) => {
|
||||
editorActions[editorAction.id] = editorAction.label;
|
||||
const editorActionsLabels: Map<string, string> = EditorExtensionsRegistry.getEditorActions().reduce((editorActions, editorAction) => {
|
||||
editorActions.set(editorAction.id, editorAction.label);
|
||||
return editorActions;
|
||||
}, {});
|
||||
}, new Map<string, string>());
|
||||
await this.keybindingsEditorModel.resolve(editorActionsLabels);
|
||||
this.renderKeybindingsEntries(false, preserveFocus);
|
||||
if (input.searchOptions) {
|
||||
@@ -804,7 +804,7 @@ class KeybindingItemRenderer implements IListRenderer<IKeybindingItemEntry, Keyb
|
||||
const source = this.instantiationService.createInstance(SourceColumn, parent, this.keybindingsEditor);
|
||||
|
||||
const columns: Column[] = [actions, command, keybinding, when, source];
|
||||
const disposables: IDisposable[] = [...columns];
|
||||
const disposables = combinedDisposable(...columns);
|
||||
const elements = columns.map(({ element }) => element);
|
||||
|
||||
this.keybindingsEditor.layoutColumns(elements);
|
||||
@@ -814,7 +814,7 @@ class KeybindingItemRenderer implements IListRenderer<IKeybindingItemEntry, Keyb
|
||||
return {
|
||||
parent,
|
||||
columns,
|
||||
disposable: toDisposable(() => dispose(disposables))
|
||||
disposable: disposables
|
||||
};
|
||||
}
|
||||
|
||||
@@ -897,6 +897,7 @@ class ActionsColumn extends Column {
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
super.dispose();
|
||||
dispose(this.actionBar);
|
||||
}
|
||||
}
|
||||
@@ -1015,7 +1016,7 @@ class WhenColumn extends Column {
|
||||
readonly element: HTMLElement;
|
||||
private whenLabel: HTMLElement;
|
||||
private whenInput: InputBox;
|
||||
private disposables: IDisposable[] = [];
|
||||
private readonly renderDisposables = this._register(new DisposableStore());
|
||||
|
||||
private _onDidAccept: Emitter<void> = this._register(new Emitter<void>());
|
||||
private readonly onDidAccept: Event<void> = this._onDidAccept.event;
|
||||
@@ -1031,7 +1032,6 @@ class WhenColumn extends Column {
|
||||
) {
|
||||
super(keybindingsEditor);
|
||||
this.element = this.create(parent);
|
||||
this._register(toDisposable(() => this.disposables = dispose(this.disposables)));
|
||||
}
|
||||
|
||||
private create(parent: HTMLElement): HTMLElement {
|
||||
@@ -1094,14 +1094,14 @@ class WhenColumn extends Column {
|
||||
}
|
||||
|
||||
render(keybindingItemEntry: IKeybindingItemEntry): void {
|
||||
this.disposables = dispose(this.disposables);
|
||||
this.renderDisposables.clear();
|
||||
DOM.clearNode(this.whenLabel);
|
||||
|
||||
this.keybindingsEditor.onDefineWhenExpression(e => {
|
||||
if (keybindingItemEntry === e) {
|
||||
this.startEditing();
|
||||
}
|
||||
}, this, this.disposables);
|
||||
}, this, this.renderDisposables);
|
||||
this.whenInput.value = keybindingItemEntry.keybindingItem.when || '';
|
||||
this.whenLabel.setAttribute('aria-label', this.getAriaLabel(keybindingItemEntry));
|
||||
DOM.toggleClass(this.whenLabel, 'code', !!keybindingItemEntry.keybindingItem.when);
|
||||
@@ -1118,11 +1118,11 @@ class WhenColumn extends Column {
|
||||
this.onDidAccept(() => {
|
||||
this.keybindingsEditor.updateKeybinding(keybindingItemEntry, keybindingItemEntry.keybindingItem.keybinding ? keybindingItemEntry.keybindingItem.keybinding.getUserSettingsLabel() || '' : '', this.whenInput.value);
|
||||
this.keybindingsEditor.selectKeybinding(keybindingItemEntry);
|
||||
}, this, this.disposables);
|
||||
}, this, this.renderDisposables);
|
||||
this.onDidReject(() => {
|
||||
this.whenInput.value = keybindingItemEntry.keybindingItem.when || '';
|
||||
this.keybindingsEditor.selectKeybinding(keybindingItemEntry);
|
||||
}, this, this.disposables);
|
||||
}, this, this.renderDisposables);
|
||||
}
|
||||
|
||||
private getAriaLabel(keybindingItemEntry: IKeybindingItemEntry): string {
|
||||
|
||||
@@ -23,11 +23,13 @@ import { parseTree, Node } from 'vs/base/common/json';
|
||||
import { ScanCodeBinding } from 'vs/base/common/scanCode';
|
||||
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
|
||||
import { WindowsNativeResolvedKeybinding } from 'vs/workbench/services/keybinding/common/windowsKeyboardMapper';
|
||||
import { themeColorFromId, ThemeColor } from 'vs/platform/theme/common/themeService';
|
||||
import { themeColorFromId, ThemeColor, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||
import { overviewRulerInfo, overviewRulerError } from 'vs/editor/common/view/editorColorRegistry';
|
||||
import { IModelDeltaDecoration, ITextModel, TrackedRangeStickiness, OverviewRulerLane } from 'vs/editor/common/model';
|
||||
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { KeybindingParser } from 'vs/base/common/keybindingParser';
|
||||
import Severity from 'vs/base/common/severity';
|
||||
import { SeverityIcon } from 'vs/platform/severityIcon/common/severityIcon';
|
||||
|
||||
const NLS_LAUNCH_MESSAGE = nls.localize('defineKeybinding.start', "Define Keybinding");
|
||||
const NLS_KB_LAYOUT_ERROR_MESSAGE = nls.localize('defineKeybinding.kbLayoutErrorMessage', "You won't be able to produce this key combination under your current keyboard layout.");
|
||||
@@ -155,7 +157,7 @@ export class KeybindingWidgetRenderer extends Disposable {
|
||||
snippetText = smartInsertInfo.prepend + snippetText + smartInsertInfo.append;
|
||||
this._editor.setPosition(smartInsertInfo.position);
|
||||
|
||||
SnippetController2.get(this._editor).insert(snippetText, 0, 0);
|
||||
SnippetController2.get(this._editor).insert(snippetText, { overwriteBefore: 0, overwriteAfter: 0 });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,3 +402,8 @@ function isInterestingEditorModel(editor: ICodeEditor): boolean {
|
||||
|
||||
registerEditorContribution(DefineKeybindingController);
|
||||
registerEditorCommand(new DefineKeybindingCommand());
|
||||
|
||||
registerThemingParticipant((theme, collector) => {
|
||||
collector.addRule(`.monaco-editor .inlineKeybindingInfo:before { background: url("data:image/svg+xml,${SeverityIcon.getSVGData(Severity.Info, theme)}") -0.1em -0.2em no-repeat; }`);
|
||||
collector.addRule(`.monaco-editor .inlineKeybindingError:before { background: url("data:image/svg+xml,${SeverityIcon.getSVGData(Severity.Error, theme)}") -0.1em -0.2em no-repeat; }`);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as nls from 'vs/nls';
|
||||
import { StatusbarAlignment, IStatusbarService, IStatusbarEntryAccessor } from 'vs/platform/statusbar/common/statusbar';
|
||||
import { Disposable, MutableDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IKeymapService, areKeyboardLayoutsEqual, parseKeyboardLayoutDescription, getKeyboardLayoutId, IKeyboardLayoutInfo } from 'vs/workbench/services/keybinding/common/keymapInfo';
|
||||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { Extensions as WorkbenchExtensions, IWorkbenchContribution, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
|
||||
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
|
||||
import { KEYBOARD_LAYOUT_OPEN_PICKER } from 'vs/workbench/contrib/preferences/common/preferences';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { isWeb, isMacintosh, isWindows } from 'vs/base/common/platform';
|
||||
import { QuickPickInput, IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { SyncActionDescriptor } from 'vs/platform/actions/common/actions';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IFileService } from 'vs/platform/files/common/files';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { VSBuffer } from 'vs/base/common/buffer';
|
||||
import { IEditor } from 'vs/workbench/common/editor';
|
||||
|
||||
export class KeyboardLayoutPickerContribution extends Disposable implements IWorkbenchContribution {
|
||||
private readonly pickerElement = this._register(new MutableDisposable<IStatusbarEntryAccessor>());
|
||||
|
||||
constructor(
|
||||
@IKeymapService private readonly keymapService: IKeymapService,
|
||||
@IStatusbarService private readonly statusbarService: IStatusbarService,
|
||||
) {
|
||||
super();
|
||||
|
||||
let layout = this.keymapService.getCurrentKeyboardLayout();
|
||||
if (layout) {
|
||||
let layoutInfo = parseKeyboardLayoutDescription(layout);
|
||||
this.pickerElement.value = this.statusbarService.addEntry(
|
||||
{
|
||||
text: nls.localize('keyboardLayout', "Layout: {0}", layoutInfo.label),
|
||||
command: KEYBOARD_LAYOUT_OPEN_PICKER
|
||||
},
|
||||
'status.workbench.keyboardLayout',
|
||||
nls.localize('status.workbench.keyboardLayout', "Keyboard Layout"),
|
||||
StatusbarAlignment.RIGHT
|
||||
);
|
||||
}
|
||||
|
||||
this._register(keymapService.onDidChangeKeyboardMapper(() => {
|
||||
let layout = this.keymapService.getCurrentKeyboardLayout();
|
||||
let layoutInfo = parseKeyboardLayoutDescription(layout);
|
||||
|
||||
if (this.pickerElement.value) {
|
||||
this.pickerElement.value.update({
|
||||
text: nls.localize('keyboardLayout', "Layout: {0}", layoutInfo.label),
|
||||
command: KEYBOARD_LAYOUT_OPEN_PICKER
|
||||
});
|
||||
} else {
|
||||
this.pickerElement.value = this.statusbarService.addEntry(
|
||||
{
|
||||
text: nls.localize('keyboardLayout', "Layout: {0}", layoutInfo.label),
|
||||
command: KEYBOARD_LAYOUT_OPEN_PICKER
|
||||
},
|
||||
'status.workbench.keyboardLayout',
|
||||
nls.localize('status.workbench.keyboardLayout', "Keyboard Layout"),
|
||||
StatusbarAlignment.RIGHT
|
||||
);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
const workbenchContributionsRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench);
|
||||
workbenchContributionsRegistry.registerWorkbenchContribution(KeyboardLayoutPickerContribution, LifecyclePhase.Starting);
|
||||
|
||||
interface LayoutQuickPickItem extends IQuickPickItem {
|
||||
layout: IKeyboardLayoutInfo;
|
||||
}
|
||||
|
||||
export class KeyboardLayoutPickerAction extends Action {
|
||||
static readonly ID = KEYBOARD_LAYOUT_OPEN_PICKER;
|
||||
static readonly LABEL = nls.localize('keyboard.chooseLayout', "Change Keyboard Layout");
|
||||
|
||||
private static DEFAULT_CONTENT: string = [
|
||||
`// ${nls.localize('displayLanguage', 'Defines the keyboard layout used in VS Code in the browser environment.')}`,
|
||||
`// ${nls.localize('doc', 'Open VS Code and run "Developer: Inspect Key Mappings (JSON)" from Command Palette.')}`,
|
||||
``,
|
||||
`// Once you have the keyboard layout info, please paste it below.`,
|
||||
'\n'
|
||||
].join('\n');
|
||||
|
||||
constructor(
|
||||
actionId: string,
|
||||
actionLabel: string,
|
||||
@IFileService private readonly fileService: IFileService,
|
||||
@IQuickInputService private readonly quickInputService: IQuickInputService,
|
||||
@IKeymapService private readonly keymapService: IKeymapService,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@IEditorService private readonly editorService: IEditorService
|
||||
) {
|
||||
super(actionId, actionLabel);
|
||||
|
||||
this.enabled = isWeb;
|
||||
}
|
||||
|
||||
async run(): Promise<void> {
|
||||
let layouts = this.keymapService.getAllKeyboardLayouts();
|
||||
let currentLayout = this.keymapService.getCurrentKeyboardLayout();
|
||||
let layoutConfig = this.configurationService.getValue('keyboard.layout');
|
||||
let isAutoDetect = layoutConfig === 'autodetect';
|
||||
|
||||
const picks: QuickPickInput[] = layouts.map(layout => {
|
||||
const picked = !isAutoDetect && areKeyboardLayoutsEqual(currentLayout, layout);
|
||||
const layoutInfo = parseKeyboardLayoutDescription(layout);
|
||||
return {
|
||||
layout: layout,
|
||||
label: [layoutInfo.label, (layout && layout.isUserKeyboardLayout) ? '(User configured layout)' : ''].join(' '),
|
||||
id: (<any>layout).text || (<any>layout).lang || (<any>layout).layout,
|
||||
description: layoutInfo.description + (picked ? ' (Current layout)' : ''),
|
||||
picked: !isAutoDetect && areKeyboardLayoutsEqual(currentLayout, layout)
|
||||
};
|
||||
}).sort((a: IQuickPickItem, b: IQuickPickItem) => {
|
||||
return a.label < b.label ? -1 : (a.label > b.label ? 1 : 0);
|
||||
});
|
||||
|
||||
if (picks.length > 0) {
|
||||
const platform = isMacintosh ? 'Mac' : isWindows ? 'Win' : 'Linux';
|
||||
picks.unshift({ type: 'separator', label: nls.localize('layoutPicks', "Keyboard Layouts ({0})", platform) });
|
||||
}
|
||||
|
||||
let configureKeyboardLayout: IQuickPickItem = { label: nls.localize('configureKeyboardLayout', "Configure Keyboard Layout") };
|
||||
|
||||
picks.unshift(configureKeyboardLayout);
|
||||
|
||||
// Offer to "Auto Detect"
|
||||
const autoDetectMode: IQuickPickItem = {
|
||||
label: nls.localize('autoDetect', "Auto Detect"),
|
||||
description: isAutoDetect ? `Current: ${parseKeyboardLayoutDescription(currentLayout).label}` : undefined,
|
||||
picked: isAutoDetect ? true : undefined
|
||||
};
|
||||
|
||||
picks.unshift(autoDetectMode);
|
||||
|
||||
const pick = await this.quickInputService.pick(picks, { placeHolder: nls.localize('pickKeyboardLayout', "Select Keyboard Layout"), matchOnDescription: true });
|
||||
if (!pick) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pick === autoDetectMode) {
|
||||
// set keymap service to auto mode
|
||||
this.configurationService.updateValue('keyboard.layout', 'autodetect');
|
||||
return;
|
||||
}
|
||||
|
||||
if (pick === configureKeyboardLayout) {
|
||||
const file = this.environmentService.keyboardLayoutResource;
|
||||
|
||||
await this.fileService.resolve(file).then(undefined, (error) => {
|
||||
return this.fileService.createFile(file, VSBuffer.fromString(KeyboardLayoutPickerAction.DEFAULT_CONTENT));
|
||||
}).then((stat): Promise<IEditor | null> | null => {
|
||||
if (!stat) {
|
||||
return null;
|
||||
}
|
||||
return this.editorService.openEditor({
|
||||
resource: stat.resource,
|
||||
mode: 'jsonc'
|
||||
});
|
||||
}, (error) => {
|
||||
throw new Error(nls.localize('fail.createSettings', "Unable to create '{0}' ({1}).", file.toString(), error));
|
||||
});
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
this.configurationService.updateValue('keyboard.layout', getKeyboardLayoutId((<LayoutQuickPickItem>pick).layout));
|
||||
}
|
||||
}
|
||||
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(KeyboardLayoutPickerAction, KeyboardLayoutPickerAction.ID, KeyboardLayoutPickerAction.LABEL, {}), 'Preferences: Change Keyboard Layout', nls.localize('preferences', "Preferences"));
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="3 3 16 16" enable-background="new 3 3 16 16"><polygon fill="#e8e8e8" points="12.597,11.042 15.4,13.845 13.844,15.4 11.042,12.598 8.239,15.4 6.683,13.845 9.485,11.042 6.683,8.239 8.238,6.683 11.042,9.486 13.845,6.683 15.4,8.239"/></svg>
|
||||
|
Before Width: | Height: | Size: 307 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="3 3 16 16" enable-background="new 3 3 16 16"><polygon fill="#424242" points="12.597,11.042 15.4,13.845 13.844,15.4 11.042,12.598 8.239,15.4 6.683,13.845 9.485,11.042 6.683,8.239 8.238,6.683 11.042,9.486 13.845,6.683 15.4,8.239"/></svg>
|
||||
|
Before Width: | Height: | Size: 307 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 7V8H8V14H7V8H1V7H7V1H8V7H14Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 163 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 7V8H8V14H7V8H1V7H7V1H8V7H14Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 163 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 3.76345L5.80687 11.9351L5.08584 11.8927L1 7.29614L1.76345 6.61752L5.50997 10.8324L14.3214 3L15 3.76345Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 278 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M15 3.76345L5.80687 11.9351L5.08584 11.8927L1 7.29614L1.76345 6.61752L5.50997 10.8324L14.3214 3L15 3.76345Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 278 B |
@@ -0,0 +1,7 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 12.6L10.7 13.3L12.3 11.7L13.9 13.3L14.7 12.6L13 11L14.7 9.40005L13.9 8.60005L12.3 10.3L10.7 8.60005L10 9.40005L11.6 11L10 12.6Z" fill="#C5C5C5"/>
|
||||
<path d="M1 4L15 4L15 3L1 3L1 4Z" fill="#C5C5C5"/>
|
||||
<path d="M1 7L15 7L15 6L1 6L1 7Z" fill="#C5C5C5"/>
|
||||
<path d="M9 9.5L9 9L1 9L1 10L9 10L9 9.5Z" fill="#C5C5C5"/>
|
||||
<path d="M9 13L9 12.5L9 12L1 12L1 13L9 13Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 484 B |
@@ -1 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.065 13H15v2H2.056v-2h5.009zm3.661-12H7.385L8.44 2.061 7.505 3H15V1h-4.274zM3.237 9H2.056v2H15V9H3.237zm4.208-4l.995 1-.995 1H15V5H7.445z" fill="#C5C5C5"/><path d="M5.072 4.03L7.032 6 5.978 7.061l-1.96-1.97-1.961 1.97L1 6l1.96-1.97L1 2.061 2.056 1l1.96 1.97L5.977 1l1.057 1.061L5.072 4.03z" fill="#F48771"/></svg>
|
||||
|
Before Width: | Height: | Size: 419 B |
@@ -0,0 +1,7 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10 12.6L10.7 13.3L12.3 11.7L13.9 13.3L14.7 12.6L13 11L14.7 9.40005L13.9 8.60005L12.3 10.3L10.7 8.60005L10 9.40005L11.6 11L10 12.6Z" fill="#424242"/>
|
||||
<path d="M1 4L15 4L15 3L1 3L1 4Z" fill="#424242"/>
|
||||
<path d="M1 7L15 7L15 6L1 6L1 7Z" fill="#424242"/>
|
||||
<path d="M9 9.5L9 9L1 9L1 10L9 10L9 9.5Z" fill="#424242"/>
|
||||
<path d="M9 13L9 12.5L9 12L1 12L1 13L9 13Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 484 B |
@@ -1 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.065 13H15v2H2.056v-2h5.009zm3.661-12H7.385L8.44 2.061 7.505 3H15V1h-4.274zM3.237 9H2.056v2H15V9H3.237zm4.208-4l.995 1-.995 1H15V5H7.445z" fill="#424242"/><path d="M5.072 4.03L7.032 6 5.978 7.061l-1.96-1.97-1.961 1.97L1 6l1.96-1.97L1 2.061 2.056 1l1.96 1.97L5.977 1l1.057 1.061L5.072 4.03z" fill="#A1260D"/></svg>
|
||||
|
Before Width: | Height: | Size: 419 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-1 0 16 16" enable-background="new -1 0 16 16"><path fill="#424242" d="M14 1v9h-1v-8h-8v-1h9zm-11 2v1h8v8h1v-9h-9zm7 2v9h-9v-9h9zm-2 2h-5v5h5v-5z"/><rect x="4" y="9" fill="#00539C" width="3" height="1"/></svg>
|
||||
|
Before Width: | Height: | Size: 281 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-1 0 16 16" enable-background="new -1 0 16 16"><path fill="#C5C5C5" d="M14 1v9h-1v-8h-8v-1h9zm-11 2v1h8v8h1v-9h-9zm7 2v9h-9v-9h9zm-2 2h-5v5h5v-5z"/><rect x="4" y="9" fill="#75BEFF" width="3" height="1"/></svg>
|
||||
|
Before Width: | Height: | Size: 281 B |
|
After Width: | Height: | Size: 9.9 KiB |
|
After Width: | Height: | Size: 9.9 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.40706 15L1 13.5929L3.35721 9.46781L3.52339 9.25025L11.7736 1L13.2321 1L15 2.76791V4.22636L6.74975 12.4766L6.53219 12.6428L2.40706 15ZM2.40706 13.5929L6.02053 11.7474L14.2708 3.49714L12.5029 1.72923L4.25262 9.97947L2.40706 13.5929Z" fill="#C5C5C5"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.64645 12.3536L3.64645 10.3536L4.35355 9.64648L6.35355 11.6465L5.64645 12.3536Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 553 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 2.98361V2.97184V2H5.91083C5.59743 2 5.29407 2.06161 5.00128 2.18473C4.70818 2.30798 4.44942 2.48474 4.22578 2.71498C4.00311 2.94422 3.83792 3.19498 3.73282 3.46766L3.73233 3.46898C3.63382 3.7352 3.56814 4.01201 3.53533 4.29917L3.53519 4.30053C3.50678 4.5805 3.4987 4.86844 3.51084 5.16428C3.52272 5.45379 3.52866 5.74329 3.52866 6.03279C3.52866 6.23556 3.48974 6.42594 3.412 6.60507L3.4116 6.60601C3.33687 6.78296 3.23423 6.93866 3.10317 7.07359C2.97644 7.20405 2.82466 7.31055 2.64672 7.3925C2.4706 7.46954 2.28497 7.5082 2.08917 7.5082H2V7.6V8.4V8.4918H2.08917C2.28465 8.4918 2.47001 8.53238 2.64601 8.61334L2.64742 8.61396C2.82457 8.69157 2.97577 8.79762 3.10221 8.93161L3.10412 8.93352C3.23428 9.0637 3.33659 9.21871 3.41129 9.39942L3.41201 9.40108C3.48986 9.58047 3.52866 9.76883 3.52866 9.96721C3.52866 10.2567 3.52272 10.5462 3.51084 10.8357C3.4987 11.1316 3.50677 11.4215 3.53516 11.7055L3.53535 11.7072C3.56819 11.9903 3.63387 12.265 3.73232 12.531L3.73283 12.5323C3.83793 12.805 4.00311 13.0558 4.22578 13.285C4.44942 13.5153 4.70818 13.692 5.00128 13.8153C5.29407 13.9384 5.59743 14 5.91083 14H6V13.2V13.0164H5.91083C5.71095 13.0164 5.52346 12.9777 5.34763 12.9008C5.17396 12.8191 5.02194 12.7126 4.89086 12.5818C4.76386 12.4469 4.66104 12.2911 4.58223 12.1137C4.50838 11.9346 4.47134 11.744 4.47134 11.541C4.47134 11.3127 4.4753 11.0885 4.48321 10.8686C4.49125 10.6411 4.49127 10.4195 4.48324 10.2039C4.47914 9.98246 4.46084 9.76883 4.42823 9.56312C4.39513 9.35024 4.33921 9.14757 4.26039 8.95536C4.18091 8.76157 4.07258 8.57746 3.93616 8.40298C3.82345 8.25881 3.68538 8.12462 3.52283 8C3.68538 7.87538 3.82345 7.74119 3.93616 7.59702C4.07258 7.42254 4.18091 7.23843 4.26039 7.04464C4.33913 6.85263 4.39513 6.65175 4.42826 6.44285C4.46082 6.2333 4.47914 6.01973 4.48324 5.80219C4.49127 5.58262 4.49125 5.36105 4.48321 5.13749C4.4753 4.9134 4.47134 4.68725 4.47134 4.45902C4.47134 4.26019 4.50833 4.07152 4.58238 3.89205C4.66135 3.71034 4.76421 3.55475 4.89086 3.42437C5.02193 3.28942 5.17461 3.18275 5.34802 3.10513C5.5238 3.02427 5.71113 2.98361 5.91083 2.98361H6ZM10 13.0164V13.0282V14H10.0892C10.4026 14 10.7059 13.9384 10.9987 13.8153C11.2918 13.692 11.5506 13.5153 11.7742 13.285C11.9969 13.0558 12.1621 12.805 12.2672 12.5323L12.2677 12.531C12.3662 12.2648 12.4319 11.988 12.4647 11.7008L12.4648 11.6995C12.4932 11.4195 12.5013 11.1316 12.4892 10.8357C12.4773 10.5462 12.4713 10.2567 12.4713 9.96721C12.4713 9.76444 12.5103 9.57406 12.588 9.39493L12.5884 9.39399C12.6631 9.21704 12.7658 9.06134 12.8968 8.92642C13.0236 8.79595 13.1753 8.68945 13.3533 8.6075C13.5294 8.53046 13.715 8.4918 13.9108 8.4918H14V8.4V7.6V7.5082H13.9108C13.7153 7.5082 13.53 7.46762 13.354 7.38666L13.3526 7.38604C13.1754 7.30844 13.0242 7.20238 12.8978 7.06839L12.8959 7.06648C12.7657 6.9363 12.6634 6.78129 12.5887 6.60058L12.588 6.59892C12.5101 6.41953 12.4713 6.23117 12.4713 6.03279C12.4713 5.74329 12.4773 5.45379 12.4892 5.16428C12.5013 4.86842 12.4932 4.57848 12.4648 4.29454L12.4646 4.29285C12.4318 4.00971 12.3661 3.73502 12.2677 3.46897L12.2672 3.46766C12.1621 3.19499 11.9969 2.94422 11.7742 2.71498C11.5506 2.48474 11.2918 2.30798 10.9987 2.18473C10.7059 2.06161 10.4026 2 10.0892 2H10V2.8V2.98361H10.0892C10.2891 2.98361 10.4765 3.0223 10.6524 3.09917C10.826 3.18092 10.9781 3.28736 11.1091 3.41823C11.2361 3.55305 11.339 3.70889 11.4178 3.88628C11.4916 4.0654 11.5287 4.25596 11.5287 4.45902C11.5287 4.68727 11.5247 4.91145 11.5168 5.13142C11.5088 5.35894 11.5087 5.58049 11.5168 5.79605C11.5209 6.01754 11.5392 6.23117 11.5718 6.43688C11.6049 6.64976 11.6608 6.85243 11.7396 7.04464C11.8191 7.23843 11.9274 7.42254 12.0638 7.59702C12.1765 7.74119 12.3146 7.87538 12.4772 8C12.3146 8.12462 12.1765 8.25881 12.0638 8.40298C11.9274 8.57746 11.8191 8.76157 11.7396 8.95536C11.6609 9.14737 11.6049 9.34825 11.5717 9.55715C11.5392 9.7667 11.5209 9.98027 11.5168 10.1978C11.5087 10.4174 11.5087 10.6389 11.5168 10.8625C11.5247 11.0866 11.5287 11.3128 11.5287 11.541C11.5287 11.7398 11.4917 11.9285 11.4176 12.1079C11.3386 12.2897 11.2358 12.4452 11.1091 12.5756C10.9781 12.7106 10.8254 12.8173 10.652 12.8949C10.4762 12.9757 10.2889 13.0164 10.0892 13.0164H10Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6 2.98361V2.97184V2H5.91083C5.59743 2 5.29407 2.06161 5.00128 2.18473C4.70818 2.30798 4.44942 2.48474 4.22578 2.71498C4.00311 2.94422 3.83792 3.19498 3.73282 3.46766L3.73233 3.46898C3.63382 3.7352 3.56814 4.01201 3.53533 4.29917L3.53519 4.30053C3.50678 4.5805 3.4987 4.86844 3.51084 5.16428C3.52272 5.45379 3.52866 5.74329 3.52866 6.03279C3.52866 6.23556 3.48974 6.42594 3.412 6.60507L3.4116 6.60601C3.33687 6.78296 3.23423 6.93866 3.10317 7.07359C2.97644 7.20405 2.82466 7.31055 2.64672 7.3925C2.4706 7.46954 2.28497 7.5082 2.08917 7.5082H2V7.6V8.4V8.4918H2.08917C2.28465 8.4918 2.47001 8.53238 2.64601 8.61334L2.64742 8.61396C2.82457 8.69157 2.97577 8.79762 3.10221 8.93161L3.10412 8.93352C3.23428 9.0637 3.33659 9.21871 3.41129 9.39942L3.41201 9.40108C3.48986 9.58047 3.52866 9.76883 3.52866 9.96721C3.52866 10.2567 3.52272 10.5462 3.51084 10.8357C3.4987 11.1316 3.50677 11.4215 3.53516 11.7055L3.53535 11.7072C3.56819 11.9903 3.63387 12.265 3.73232 12.531L3.73283 12.5323C3.83793 12.805 4.00311 13.0558 4.22578 13.285C4.44942 13.5153 4.70818 13.692 5.00128 13.8153C5.29407 13.9384 5.59743 14 5.91083 14H6V13.2V13.0164H5.91083C5.71095 13.0164 5.52346 12.9777 5.34763 12.9008C5.17396 12.8191 5.02194 12.7126 4.89086 12.5818C4.76386 12.4469 4.66104 12.2911 4.58223 12.1137C4.50838 11.9346 4.47134 11.744 4.47134 11.541C4.47134 11.3127 4.4753 11.0885 4.48321 10.8686C4.49125 10.6411 4.49127 10.4195 4.48324 10.2039C4.47914 9.98246 4.46084 9.76883 4.42823 9.56312C4.39513 9.35024 4.33921 9.14757 4.26039 8.95536C4.18091 8.76157 4.07258 8.57746 3.93616 8.40298C3.82345 8.25881 3.68538 8.12462 3.52283 8C3.68538 7.87538 3.82345 7.74119 3.93616 7.59702C4.07258 7.42254 4.18091 7.23843 4.26039 7.04464C4.33913 6.85263 4.39513 6.65175 4.42826 6.44285C4.46082 6.2333 4.47914 6.01973 4.48324 5.80219C4.49127 5.58262 4.49125 5.36105 4.48321 5.13749C4.4753 4.9134 4.47134 4.68725 4.47134 4.45902C4.47134 4.26019 4.50833 4.07152 4.58238 3.89205C4.66135 3.71034 4.76421 3.55475 4.89086 3.42437C5.02193 3.28942 5.17461 3.18275 5.34802 3.10513C5.5238 3.02427 5.71113 2.98361 5.91083 2.98361H6ZM10 13.0164V13.0282V14H10.0892C10.4026 14 10.7059 13.9384 10.9987 13.8153C11.2918 13.692 11.5506 13.5153 11.7742 13.285C11.9969 13.0558 12.1621 12.805 12.2672 12.5323L12.2677 12.531C12.3662 12.2648 12.4319 11.988 12.4647 11.7008L12.4648 11.6995C12.4932 11.4195 12.5013 11.1316 12.4892 10.8357C12.4773 10.5462 12.4713 10.2567 12.4713 9.96721C12.4713 9.76444 12.5103 9.57406 12.588 9.39493L12.5884 9.39399C12.6631 9.21704 12.7658 9.06134 12.8968 8.92642C13.0236 8.79595 13.1753 8.68945 13.3533 8.6075C13.5294 8.53046 13.715 8.4918 13.9108 8.4918H14V8.4V7.6V7.5082H13.9108C13.7153 7.5082 13.53 7.46762 13.354 7.38666L13.3526 7.38604C13.1754 7.30844 13.0242 7.20238 12.8978 7.06839L12.8959 7.06648C12.7657 6.9363 12.6634 6.78129 12.5887 6.60058L12.588 6.59892C12.5101 6.41953 12.4713 6.23117 12.4713 6.03279C12.4713 5.74329 12.4773 5.45379 12.4892 5.16428C12.5013 4.86842 12.4932 4.57848 12.4648 4.29454L12.4646 4.29285C12.4318 4.00971 12.3661 3.73502 12.2677 3.46897L12.2672 3.46766C12.1621 3.19499 11.9969 2.94422 11.7742 2.71498C11.5506 2.48474 11.2918 2.30798 10.9987 2.18473C10.7059 2.06161 10.4026 2 10.0892 2H10V2.8V2.98361H10.0892C10.2891 2.98361 10.4765 3.0223 10.6524 3.09917C10.826 3.18092 10.9781 3.28736 11.1091 3.41823C11.2361 3.55305 11.339 3.70889 11.4178 3.88628C11.4916 4.0654 11.5287 4.25596 11.5287 4.45902C11.5287 4.68727 11.5247 4.91145 11.5168 5.13142C11.5088 5.35894 11.5087 5.58049 11.5168 5.79605C11.5209 6.01754 11.5392 6.23117 11.5718 6.43688C11.6049 6.64976 11.6608 6.85243 11.7396 7.04464C11.8191 7.23843 11.9274 7.42254 12.0638 7.59702C12.1765 7.74119 12.3146 7.87538 12.4772 8C12.3146 8.12462 12.1765 8.25881 12.0638 8.40298C11.9274 8.57746 11.8191 8.76157 11.7396 8.95536C11.6609 9.14737 11.6049 9.34825 11.5717 9.55715C11.5392 9.7667 11.5209 9.98027 11.5168 10.1978C11.5087 10.4174 11.5087 10.6389 11.5168 10.8625C11.5247 11.0866 11.5287 11.3128 11.5287 11.541C11.5287 11.7398 11.4917 11.9285 11.4176 12.1079C11.3386 12.2897 11.2358 12.4452 11.1091 12.5756C10.9781 12.7106 10.8254 12.8173 10.652 12.8949C10.4762 12.9757 10.2889 13.0164 10.0892 13.0164H10Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,4 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.40706 15L1 13.5929L3.35721 9.46781L3.52339 9.25025L11.7736 1L13.2321 1L15 2.76791V4.22636L6.74975 12.4766L6.53219 12.6428L2.40706 15ZM2.40706 13.5929L6.02053 11.7474L14.2708 3.49714L12.5029 1.72923L4.25262 9.97947L2.40706 13.5929Z" fill="#424242"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.64645 12.3536L3.64645 10.3536L4.35355 9.64648L6.35355 11.6465L5.64645 12.3536Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 553 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M8 1c-3.865 0-7 3.135-7 7s3.135 7 7 7 7-3.135 7-7-3.135-7-7-7zm1 12h-2v-7h2v7zm0-8h-2v-2h2v2z" fill="#1BA1E2"/><path d="M7 6h2v7h-2v-7zm0-1h2v-2h-2v2z" fill="#fff"/></svg>
|
||||
|
Before Width: | Height: | Size: 243 B |
@@ -47,7 +47,6 @@
|
||||
display:inline-block;
|
||||
height:0.8em;
|
||||
width:1em;
|
||||
background: url(info.svg) 0px -0.1em no-repeat;
|
||||
background-size: 0.9em;
|
||||
}
|
||||
|
||||
@@ -57,7 +56,6 @@
|
||||
display:inline-block;
|
||||
height:0.8em;
|
||||
width:1em;
|
||||
background: url(status-error.svg) 0px -0.1em no-repeat;
|
||||
background-size: 1em;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,30 +46,30 @@
|
||||
}
|
||||
|
||||
.keybindings-editor .monaco-action-bar .action-item > .sort-by-precedence {
|
||||
background: url('sort_precedence.svg') center center no-repeat;
|
||||
background: url('sort-precedence-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .keybindings-editor .monaco-action-bar .action-item > .sort-by-precedence,
|
||||
.vs-dark .keybindings-editor .monaco-action-bar .action-item > .sort-by-precedence {
|
||||
background: url('sort_precedence_inverse.svg') center center no-repeat;
|
||||
background: url('sort-precedence-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.keybindings-editor .monaco-action-bar .action-item > .record-keys {
|
||||
background: url('record-keys.svg') center center no-repeat;
|
||||
background: url('record-keys-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .keybindings-editor .monaco-action-bar .action-item > .record-keys,
|
||||
.vs-dark .keybindings-editor .monaco-action-bar .action-item > .record-keys {
|
||||
background: url('record-keys-inverse.svg') center center no-repeat;
|
||||
background: url('record-keys-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.keybindings-editor .monaco-action-bar .action-item > .clear-input {
|
||||
background: url('clear.svg') center center no-repeat;
|
||||
background: url('clear-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .keybindings-editor .monaco-action-bar .action-item > .clear-input,
|
||||
.vs-dark .keybindings-editor .monaco-action-bar .action-item > .clear-input {
|
||||
background: url('clear-inverse.svg') center center no-repeat;
|
||||
background: url('clear-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.keybindings-editor > .keybindings-header .open-keybindings-container {
|
||||
@@ -208,20 +208,20 @@
|
||||
}
|
||||
|
||||
.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar .action-item > .icon.edit {
|
||||
background: url('edit.svg') center center no-repeat;
|
||||
background: url('edit-light.svg') center center no-repeat;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.hc-black .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar .action-item > .icon.edit,
|
||||
.vs-dark .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar .action-item > .icon.edit {
|
||||
background: url('edit_inverse.svg') center center no-repeat;
|
||||
background: url('edit-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar .action-item > .icon.add {
|
||||
background: url('add.svg') center center no-repeat;
|
||||
background: url('add-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.hc-black .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar .action-item > .icon.add,
|
||||
.vs-dark .keybindings-editor > .keybindings-body > .keybindings-list-container .monaco-list-row > .column .monaco-action-bar .action-item > .icon.add {
|
||||
background: url('add_inverse.svg') center center no-repeat;
|
||||
background: url('add-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.06065 3.85356L5.91421 6L5.2071 5.29289L6.49999 4H3.5C3.10218 4 2.72064 4.15804 2.43934 4.43934C2.15804 4.72065 2 5.10218 2 5.5C2 5.89783 2.15804 6.27936 2.43934 6.56066C2.72064 6.84197 3.10218 7 3.5 7H4V8H3.5C2.83696 8 2.20107 7.73661 1.73223 7.26777C1.26339 6.79893 1 6.16305 1 5.5C1 4.83696 1.26339 4.20108 1.73223 3.73224C2.20107 3.2634 2.83696 3 3.5 3H6.49999L6.49999 3H6.49996L6 2.50004V2.50001L5.2071 1.70711L5.91421 1L8.06065 3.14645L8.06065 3.85356ZM5 6.50003L5.91421 7.41424L6 7.32845V14H14V7H10V3H9.06065V2.73227L8.32838 2H11.2L11.5 2.1L14.9 5.6L15 6V14.5L14.5 15H5.5L5 14.5V9.00003V6.50003ZM11 3V6H13.9032L11 3Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 796 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.06065 3.85356L5.91421 6L5.2071 5.29289L6.49999 4H3.5C3.10218 4 2.72064 4.15804 2.43934 4.43934C2.15804 4.72065 2 5.10218 2 5.5C2 5.89783 2.15804 6.27936 2.43934 6.56066C2.72064 6.84197 3.10218 7 3.5 7H4V8H3.5C2.83696 8 2.20107 7.73661 1.73223 7.26777C1.26339 6.79893 1 6.16305 1 5.5C1 4.83696 1.26339 4.20108 1.73223 3.73224C2.20107 3.2634 2.83696 3 3.5 3H6.49999L6.49999 3H6.49996L6 2.50004V2.50001L5.2071 1.70711L5.91421 1L8.06065 3.14645L8.06065 3.85356ZM5 6.50003L5.91421 7.41424L6 7.32845V14H14V7H10V3H9.06065V2.73227L8.32838 2H11.2L11.5 2.1L14.9 5.6L15 6V14.5L14.5 15H5.5L5 14.5V9.00003V6.50003ZM11 3V6H13.9032L11 3Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 796 B |
@@ -199,27 +199,28 @@
|
||||
}
|
||||
|
||||
.monaco-editor .settings-group-title-widget .title-container .expand-collapse-icon {
|
||||
background: url(expanded.svg) 50% 50% no-repeat;
|
||||
background: url("tree-expanded-light.svg") 50% 50% no-repeat;
|
||||
margin-right: 2px;
|
||||
width: 16px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.monaco-editor.vs-dark .settings-group-title-widget .title-container .expand-collapse-icon,
|
||||
.monaco-editor.hc-black .settings-group-title-widget .title-container .expand-collapse-icon {
|
||||
background: url(expanded-dark.svg) 50% 50% no-repeat;
|
||||
background: url("tree-expanded-dark.svg") 50% 50% no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .settings-group-title-widget .title-container.collapsed .expand-collapse-icon {
|
||||
background: url(collapsed.svg) 50% 50% no-repeat;
|
||||
background: url("tree-collapsed-light.svg") 50% 50% no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor.vs-dark .settings-group-title-widget .title-container.collapsed .expand-collapse-icon,
|
||||
.monaco-editor.hc-black .settings-group-title-widget .title-container.collapsed .expand-collapse-icon {
|
||||
background: url(collapsed-dark.svg) 50% 50% no-repeat;
|
||||
background: url("tree-collapsed-dark.svg") 50% 50% no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .edit-preferences-widget {
|
||||
background: url('edit.svg') center center no-repeat;
|
||||
background: url('edit-light.svg') center center no-repeat;
|
||||
transform: rotate(-90deg);
|
||||
width:16px;
|
||||
height: 16px;
|
||||
@@ -233,16 +234,7 @@
|
||||
|
||||
.monaco-editor.hc-black .edit-preferences-widget,
|
||||
.monaco-editor.vs-dark .edit-preferences-widget {
|
||||
background: url('edit_inverse.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .unsupportedWorkbenhSettingInfo:before {
|
||||
content:" ";
|
||||
display:inline-block;
|
||||
height:1em;
|
||||
width:1em;
|
||||
background: url(info.svg) 50% 50% no-repeat;
|
||||
background-size: 0.9em;
|
||||
background: url('edit-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.monaco-editor .dim-configuration {
|
||||
@@ -253,14 +245,4 @@
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.title-actions .action-item .icon.collapseAll,
|
||||
.editor-actions .action-item .icon.collapseAll {
|
||||
background: url('collapseAll.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .title-actions .action-item .icon.collapseAll,
|
||||
.vs-dark .editor-actions .action-item .icon.collapseAll {
|
||||
background: url('collapseAll_inverse.svg') center center no-repeat;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 4H3L3 11H14V4ZM3 3C2.44772 3 2 3.44772 2 4V11C2 11.5523 2.44772 12 3 12H14C14.5523 12 15 11.5523 15 11V4C15 3.44772 14.5523 3 14 3H3ZM4 5H5V6H4V5ZM7 5H6V6H7V5ZM8 5H9V6H8V5ZM11 5H10V6H11V5ZM12 5H13V6H12V5ZM6 8V7H4V8H6ZM7 7H8V8H7V7ZM10 7H9V8H10V7ZM13 7V8H11V7H13ZM5 9H4V10H5V9ZM6 9H11V10H6V9ZM13 9H12V10H13V9Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 482 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 5H9V4H10V5V5ZM3 6H2V7H3V6V6ZM8 4H7V5H8V4V4ZM4 4H2V5H4V4V4ZM12 11H14V10H12V11V11ZM8 7H9V6H8V7V7ZM4 10H2V11H4V10V10ZM12 4H11V5H12V4V4ZM14 4H13V5H14V4V4ZM12 9H14V6H12V9V9ZM16 3V12C16 12.55 15.55 13 15 13H1C0.45 13 0 12.55 0 12V3C0 2.45 0.45 2 1 2H15C15.55 2 16 2.45 16 3V3ZM15 3H1V12H15V3V3ZM6 7H7V6H6V7V7ZM6 4H5V5H6V4V4ZM4 7H5V6H4V7V7ZM5 11H11V10H5V11V11ZM10 7H11V6H10V7V7ZM3 8H2V9H3V8V8ZM8 8V9H9V8H8V8ZM6 8V9H7V8H6V8ZM5 8H4V9H5V8V8ZM10 9H11V8H10V9V9Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 624 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M14 4H3L3 11H14V4ZM3 3C2.44772 3 2 3.44772 2 4V11C2 11.5523 2.44772 12 3 12H14C14.5523 12 15 11.5523 15 11V4C15 3.44772 14.5523 3 14 3H3ZM4 5H5V6H4V5ZM7 5H6V6H7V5ZM8 5H9V6H8V5ZM11 5H10V6H11V5ZM12 5H13V6H12V5ZM6 8V7H4V8H6ZM7 7H8V8H7V7ZM10 7H9V8H10V7ZM13 7V8H11V7H13ZM5 9H4V10H5V9ZM6 9H11V10H6V9ZM13 9H12V10H13V9Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 482 B |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10 5H9V4H10V5V5ZM3 6H2V7H3V6V6ZM8 4H7V5H8V4V4ZM4 4H2V5H4V4V4ZM12 11H14V10H12V11V11ZM8 7H9V6H8V7V7ZM4 10H2V11H4V10V10ZM12 4H11V5H12V4V4ZM14 4H13V5H14V4V4ZM12 9H14V6H12V9V9ZM16 3V12C16 12.55 15.55 13 15 13H1C0.45 13 0 12.55 0 12V3C0 2.45 0.45 2 1 2H15C15.55 2 16 2.45 16 3V3ZM15 3H1V12H15V3V3ZM6 7H7V6H6V7V7ZM6 4H5V5H6V4V4ZM4 7H5V6H4V7V7ZM5 11H11V10H5V11V11ZM10 7H11V6H10V7V7ZM3 8H2V9H3V8V8ZM8 8V9H9V8H8V8ZM6 8V9H7V8H6V8ZM5 8H4V9H5V8V8ZM10 9H11V8H10V9V9Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 624 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 8.70714L11.6464 12.3536L12.3536 11.6465L8.70711 8.00004L12.3536 4.35359L11.6464 3.64648L8 7.29293L4.35355 3.64648L3.64645 4.35359L7.29289 8.00004L3.64645 11.6465L4.35355 12.3536L8 8.70714Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 362 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8 8.70714L11.6464 12.3536L12.3536 11.6465L8.70711 8.00004L12.3536 4.35359L11.6464 3.64648L8 7.29293L4.35355 3.64648L3.64645 4.35359L7.29289 8.00004L3.64645 11.6465L4.35355 12.3536L8 8.70714Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 362 B |
@@ -172,11 +172,11 @@
|
||||
}
|
||||
|
||||
.vs .settings-editor > .settings-body .settings-tree-container .monaco-toolbar .toolbar-toggle-more {
|
||||
background-image: url('configure.svg');
|
||||
background-image: url('configure-light.svg');
|
||||
}
|
||||
|
||||
.vs-dark .settings-editor > .settings-body .settings-tree-container .monaco-toolbar .toolbar-toggle-more {
|
||||
background-image: url('configure-inverse.svg');
|
||||
background-image: url('configure-dark.svg');
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body .settings-toc-container {
|
||||
@@ -237,8 +237,6 @@
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body .settings-tree-container {
|
||||
margin-right: 1px;
|
||||
/* So the item doesn't blend into the edge of the view container */
|
||||
margin-top: 14px;
|
||||
border-spacing: 0;
|
||||
border-collapse: separate;
|
||||
@@ -434,12 +432,12 @@
|
||||
}
|
||||
|
||||
.vs .settings-editor > .settings-body > .settings-tree-container .setting-item-bool .setting-value-checkbox.checked {
|
||||
background: url('check.svg') center center no-repeat;
|
||||
background: url('check-light.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .settings-editor > .settings-body > .settings-tree-container .setting-item-bool .setting-value-checkbox.checked,
|
||||
.hc-black .settings-editor > .settings-body > .settings-tree-container .setting-item-bool .setting-value-checkbox.checked {
|
||||
background: url('check-inverse.svg') center center no-repeat;
|
||||
background: url('check-dark.svg') center center no-repeat;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item-contents .setting-item-value {
|
||||
@@ -3,105 +3,105 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-item-value > .setting-item-control {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-item-value > .setting-item-control {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-pattern {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-value {
|
||||
margin-right: 3px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-pattern,
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-sibling {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-value,
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-sibling {
|
||||
display: inline-block;
|
||||
line-height: 22px;
|
||||
font-family: var(--monaco-monospace-font);
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-sibling {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-sibling {
|
||||
opacity: 0.7;
|
||||
margin-left: 0.5em;
|
||||
font-size: 0.9em;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row .monaco-action-bar {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row .monaco-action-bar {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
margin-top: 1px;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row:focus {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row:hover .monaco-action-bar,
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row.selected .monaco-action-bar {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover .monaco-action-bar,
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected .monaco-action-bar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row .monaco-action-bar .action-label {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row .monaco-action-bar .action-label {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
padding: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row .monaco-action-bar .setting-excludeAction-edit {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row .monaco-action-bar .setting-listAction-edit {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.vs .settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row .monaco-action-bar .setting-excludeAction-edit {
|
||||
background: url(edit.svg) center center no-repeat;
|
||||
.vs .settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row .monaco-action-bar .setting-listAction-edit {
|
||||
background: url("edit-light.svg") center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row .monaco-action-bar .setting-excludeAction-edit {
|
||||
background: url(edit_inverse.svg) center center no-repeat;
|
||||
.vs-dark .settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row .monaco-action-bar .setting-listAction-edit {
|
||||
background: url("edit-dark.svg") center center no-repeat;
|
||||
}
|
||||
|
||||
.vs .settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row .monaco-action-bar .setting-excludeAction-remove {
|
||||
background: url(action-remove.svg) center center no-repeat;
|
||||
.vs .settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row .monaco-action-bar .setting-listAction-remove {
|
||||
background: url("remove-light.svg") center center no-repeat;
|
||||
}
|
||||
|
||||
.vs-dark .settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row .monaco-action-bar .setting-excludeAction-remove {
|
||||
background: url(action-remove-dark.svg) center center no-repeat;
|
||||
.vs-dark .settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row .monaco-action-bar .setting-listAction-remove {
|
||||
background: url("remove-dark.svg") center center no-repeat;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .monaco-text-button {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .monaco-text-button {
|
||||
width: initial;
|
||||
padding: 2px 14px;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-item-control.setting-exclude-new-mode .setting-exclude-new-row {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-item-control.setting-list-new-mode .setting-list-new-row {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .monaco-text-button.setting-exclude-addButton {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .monaco-text-button.setting-list-addButton {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-edit-row {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-edit-row {
|
||||
display: flex
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-patternInput,
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-siblingInput {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-valueInput,
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-siblingInput {
|
||||
height: 22px;
|
||||
max-width: 320px;
|
||||
flex: 1;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-okButton {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-okButton {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-widget {
|
||||
.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-widget {
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 2L6 3V6H7V3H14V5.45306L14.2071 5.29286L15 6.08576V3L14 2H7ZM8 4H10V6H8V4ZM5 9H3V11H5V9ZM2 7L1 8V13L2 14H9L10 13V8L9 7H2ZM2 13V8H9V13H2ZM8 10H6V12H8V10ZM13 4H12V7.86388L10.818 6.68192L10.1109 7.38903L12.1465 9.42454L12.8536 9.42454L14.889 7.38908L14.1819 6.68197L13 7.86388V4Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 449 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 2L6 3V6H7V3H14V5.45306L14.2071 5.29286L15 6.08576V3L14 2H7ZM8 4H10V6H8V4ZM5 9H3V11H5V9ZM2 7L1 8V13L2 14H9L10 13V8L9 7H2ZM2 13V8H9V13H2ZM8 10H6V12H8V10ZM13 4H12V7.86388L10.818 6.68192L10.1109 7.38903L12.1465 9.42454L12.8536 9.42454L14.889 7.38908L14.1819 6.68197L13 7.86388V4Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 449 B |
@@ -1 +0,0 @@
|
||||
<svg fill="none" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 1v5h-5v9h11v-2.586l1 1 4-4v-8.414zm5 3v2l-2-1.414v-.586zm-2 8h-5v-3h5z" fill="#f6f6f6"/><g fill="#424242"><path d="m3 9h2v2h-2zm3 1h2v2h-2zm8-7v3h.586l.414-.414v-3.586h-9v4h1v-3z"/><path d="m9 10.414v2.586h-7v-5h6v-1h-7v7h9v-2.586zm.414-4.414h.586v-2h-2v.586z"/><path d="m13 5h-2v4l-2-2v2l3 3 3-3v-2l-2 2z"/></g><path d="m8 9.414v-1.414h-6v5h7v-2.586zm-3 1.586h-2v-2h2zm3 1h-2v-2h2zm0-7.414v-.586h6v-1h-7v3h1z" fill="#f0eff1"/></svg>
|
||||
|
Before Width: | Height: | Size: 540 B |
@@ -1 +0,0 @@
|
||||
<svg fill="none" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m5 1v5h-5v9h11v-2.586l1 1 4-4v-8.414zm5 3v2l-2-1.414v-.586zm-2 8h-5v-3h5z" fill="#2d2d30"/><g fill="#c5c5c5"><path d="m3 9h2v2h-2zm3 1h2v2h-2zm8-7v3h.586l.414-.414v-3.586h-9v4h1v-3z"/><path d="m9 10.414v2.586h-7v-5h6v-1h-7v7h9v-2.586zm.414-4.414h.586v-2h-2v.586z"/><path d="m13 5h-2v4l-2-2v2l3 3 3-3v-2l-2 2z"/></g><path d="m8 9.414v-1.414h-6v5h7v-2.586zm-3 1.586h-2v-2h2zm3 1h-2v-2h2zm0-7.414v-.586h6v-1h-7v3h1z" fill="#2b282e"/></svg>
|
||||
|
Before Width: | Height: | Size: 540 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16" height="16" width="16"><circle cx="8" cy="8" r="6" fill="#F6F6F6"/><path d="M8 3C5.238 3 3 5.238 3 8s2.238 5 5 5 5-2.238 5-5-2.238-5-5-5zm3 7l-1 1-2-2-2 2-1-1 2-2.027L5 6l1-1 2 2 2-2 1 1-2 1.973L11 10z" fill="#E51400"/><path fill="#fff" d="M11 6l-1-1-2 2-2-2-1 1 2 1.973L5 10l1 1 2-2 2 2 1-1-2-2.027z"/></svg>
|
||||
|
Before Width: | Height: | Size: 403 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0719 8.00005L5.71461 12.3574L6.33333 12.9761L11 8.30941V7.69069L6.33333 3.02402L5.71461 3.64274L10.0719 8.00005Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 287 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.0719 8.00005L5.71461 12.3574L6.33333 12.9761L11 8.30941V7.69069L6.33333 3.02402L5.71461 3.64274L10.0719 8.00005Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 287 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97603 10.0719L12.3333 5.7146L12.9521 6.33332L8.28539 11L7.66667 11L3 6.33332L3.61872 5.7146L7.97603 10.0719Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 282 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.97603 10.0719L12.3333 5.7146L12.9521 6.33332L8.28539 11L7.66667 11L3 6.33332L3.61872 5.7146L7.97603 10.0719Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 282 B |
@@ -13,10 +13,9 @@ import * as nls from 'vs/nls';
|
||||
import { MenuId, MenuRegistry, SyncActionDescriptor } from 'vs/platform/actions/common/actions';
|
||||
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { WorkbenchStateContext, RemoteAuthorityContext } from 'vs/workbench/browser/contextkeys';
|
||||
import { WorkbenchStateContext, RemoteAuthorityContext, IsMacNativeContext } from 'vs/workbench/browser/contextkeys';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
@@ -30,10 +29,9 @@ import { ResourceContextKey } from 'vs/workbench/common/resources';
|
||||
import { KeybindingsEditor } from 'vs/workbench/contrib/preferences/browser/keybindingsEditor';
|
||||
import { ConfigureLanguageBasedSettingsAction, OpenDefaultKeybindingsFileAction, OpenFolderSettingsAction, OpenGlobalKeybindingsAction, OpenGlobalKeybindingsFileAction, OpenGlobalSettingsAction, OpenRawDefaultSettingsAction, OpenSettings2Action, OpenSettingsJsonAction, OpenWorkspaceSettingsAction, OPEN_FOLDER_SETTINGS_COMMAND, OPEN_FOLDER_SETTINGS_LABEL, OpenRemoteSettingsAction } from 'vs/workbench/contrib/preferences/browser/preferencesActions';
|
||||
import { PreferencesEditor } from 'vs/workbench/contrib/preferences/browser/preferencesEditor';
|
||||
import { CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, CONTEXT_KEYBINDING_FOCUS, CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_JSON_EDITOR, CONTEXT_SETTINGS_SEARCH_FOCUS, CONTEXT_TOC_ROW_FOCUS, IKeybindingsEditor, IPreferencesSearchService, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS, KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_SEARCH, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE, KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS, KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS, MODIFIED_SETTING_TAG, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING, SETTINGS_EDITOR_COMMAND_FILTER_MODIFIED, SETTINGS_EDITOR_COMMAND_FILTER_ONLINE, SETTINGS_EDITOR_COMMAND_FOCUS_FILE, SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_SETTINGS_FROM_SEARCH, SETTINGS_EDITOR_COMMAND_FOCUS_SETTINGS_LIST, SETTINGS_EDITOR_COMMAND_SEARCH, SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU, SETTINGS_EDITOR_COMMAND_SWITCH_TO_JSON, SETTINGS_COMMAND_OPEN_SETTINGS, KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN } from 'vs/workbench/contrib/preferences/common/preferences';
|
||||
import { CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, CONTEXT_KEYBINDING_FOCUS, CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_JSON_EDITOR, CONTEXT_SETTINGS_SEARCH_FOCUS, CONTEXT_TOC_ROW_FOCUS, IKeybindingsEditor, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS, KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_SEARCH, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE, KEYBINDINGS_EDITOR_SHOW_DEFAULT_KEYBINDINGS, KEYBINDINGS_EDITOR_SHOW_USER_KEYBINDINGS, MODIFIED_SETTING_TAG, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING, SETTINGS_EDITOR_COMMAND_FILTER_MODIFIED, SETTINGS_EDITOR_COMMAND_FILTER_ONLINE, SETTINGS_EDITOR_COMMAND_FOCUS_FILE, SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_SETTINGS_FROM_SEARCH, SETTINGS_EDITOR_COMMAND_FOCUS_SETTINGS_LIST, SETTINGS_EDITOR_COMMAND_SEARCH, SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU, SETTINGS_EDITOR_COMMAND_SWITCH_TO_JSON, SETTINGS_COMMAND_OPEN_SETTINGS, KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN } from 'vs/workbench/contrib/preferences/common/preferences';
|
||||
import { PreferencesContribution } from 'vs/workbench/contrib/preferences/common/preferencesContribution';
|
||||
import { PreferencesSearchService } from 'vs/workbench/contrib/preferences/electron-browser/preferencesSearch';
|
||||
import { SettingsEditor2 } from 'vs/workbench/contrib/preferences/electron-browser/settingsEditor2';
|
||||
import { SettingsEditor2 } from 'vs/workbench/contrib/preferences/browser/settingsEditor2';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
|
||||
import { DefaultPreferencesEditorInput, KeybindingsEditorInput, PreferencesEditorInput, SettingsEditor2Input } from 'vs/workbench/services/preferences/common/preferencesEditorInput';
|
||||
@@ -42,8 +40,6 @@ import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { REMOTE_HOST_SCHEME } from 'vs/platform/remote/common/remoteHosts';
|
||||
|
||||
registerSingleton(IPreferencesSearchService, PreferencesSearchService, true);
|
||||
|
||||
Registry.as<IEditorRegistry>(EditorExtensions.Editors).registerEditor(
|
||||
new EditorDescriptor(
|
||||
PreferencesEditor,
|
||||
@@ -202,14 +198,14 @@ Registry.as<IEditorInputFactoryRegistry>(EditorInputExtensions.EditorInputFactor
|
||||
// Contribute Global Actions
|
||||
const category = nls.localize('preferences', "Preferences");
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenRawDefaultSettingsAction, OpenRawDefaultSettingsAction.ID, OpenRawDefaultSettingsAction.LABEL), 'Preferences: Open Raw Default Settings', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenRawDefaultSettingsAction, OpenRawDefaultSettingsAction.ID, OpenRawDefaultSettingsAction.LABEL), 'Preferences: Open Default Settings (JSON)', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenSettingsJsonAction, OpenSettingsJsonAction.ID, OpenSettingsJsonAction.LABEL), 'Preferences: Open Settings (JSON)', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenSettings2Action, OpenSettings2Action.ID, OpenSettings2Action.LABEL), 'Preferences: Open Settings (UI)', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalSettingsAction, OpenGlobalSettingsAction.ID, OpenGlobalSettingsAction.LABEL), 'Preferences: Open User Settings', category);
|
||||
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalKeybindingsAction, OpenGlobalKeybindingsAction.ID, OpenGlobalKeybindingsAction.LABEL, { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_S) }), 'Preferences: Open Keyboard Shortcuts', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenDefaultKeybindingsFileAction, OpenDefaultKeybindingsFileAction.ID, OpenDefaultKeybindingsFileAction.LABEL), 'Preferences: Open Default Keyboard Shortcuts File', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalKeybindingsFileAction, OpenGlobalKeybindingsFileAction.ID, OpenGlobalKeybindingsFileAction.LABEL, { primary: 0 }), 'Preferences: Open Keyboard Shortcuts File', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenDefaultKeybindingsFileAction, OpenDefaultKeybindingsFileAction.ID, OpenDefaultKeybindingsFileAction.LABEL), 'Preferences: Open Default Keyboard Shortcuts (JSON)', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(OpenGlobalKeybindingsFileAction, OpenGlobalKeybindingsFileAction.ID, OpenGlobalKeybindingsFileAction.LABEL, { primary: 0 }), 'Preferences: Open Keyboard Shortcuts (JSON)', category);
|
||||
registry.registerWorkbenchAction(new SyncActionDescriptor(ConfigureLanguageBasedSettingsAction, ConfigureLanguageBasedSettingsAction.ID, ConfigureLanguageBasedSettingsAction.LABEL), 'Preferences: Configure Language Specific Settings...', category);
|
||||
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
@@ -336,10 +332,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDING_FOCUS),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_C,
|
||||
handler: (accessor, args: any) => {
|
||||
handler: async (accessor, args: any) => {
|
||||
const control = accessor.get(IEditorService).activeControl as IKeybindingsEditor;
|
||||
if (control) {
|
||||
control.copyKeybinding(control.activeKeybindingEntry!);
|
||||
await control.copyKeybinding(control.activeKeybindingEntry!);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -349,10 +345,10 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDING_FOCUS),
|
||||
primary: 0,
|
||||
handler: (accessor, args: any) => {
|
||||
handler: async (accessor, args: any) => {
|
||||
const control = accessor.get(IEditorService).activeControl as IKeybindingsEditor;
|
||||
if (control) {
|
||||
control.copyKeybindingCommand(control.activeKeybindingEntry!);
|
||||
await control.copyKeybindingCommand(control.activeKeybindingEntry!);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -385,11 +381,11 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
id: OpenGlobalKeybindingsAction.ID,
|
||||
title: OpenGlobalKeybindingsAction.LABEL,
|
||||
iconLocation: {
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/preferences-editor.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/preferences-editor-inverse.svg`))
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-light.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-dark.svg`))
|
||||
}
|
||||
},
|
||||
when: ResourceContextKey.Resource.isEqualTo(URI.file(environmentService.appKeybindingsPath).toString()),
|
||||
when: ResourceContextKey.Resource.isEqualTo(environmentService.keybindingsResource.toString()),
|
||||
group: 'navigation',
|
||||
order: 1
|
||||
});
|
||||
@@ -401,11 +397,11 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
id: commandId,
|
||||
title: OpenSettings2Action.LABEL,
|
||||
iconLocation: {
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/preferences-editor.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/preferences-editor-inverse.svg`))
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-light.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-dark.svg`))
|
||||
}
|
||||
},
|
||||
when: ResourceContextKey.Resource.isEqualTo(URI.file(environmentService.appSettingsPath).toString()),
|
||||
when: ResourceContextKey.Resource.isEqualTo(environmentService.settingsResource.toString()),
|
||||
group: 'navigation',
|
||||
order: 1
|
||||
});
|
||||
@@ -425,8 +421,8 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||
command: {
|
||||
id: OpenRemoteSettingsAction.ID,
|
||||
title: { value: label, original: `Preferences: Open Remote Settings (${hostLabel})` },
|
||||
category: nls.localize('preferencesCategory', "Preferences")
|
||||
title: { value: label, original: `Open Remote Settings (${hostLabel})` },
|
||||
category: { value: nls.localize('preferencesCategory', "Preferences"), original: 'Preferences' }
|
||||
},
|
||||
when: RemoteAuthorityContext.notEqualsTo('')
|
||||
});
|
||||
@@ -442,8 +438,8 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
id: commandId,
|
||||
title: OpenSettings2Action.LABEL,
|
||||
iconLocation: {
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/preferences-editor.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/preferences-editor-inverse.svg`))
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-light.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-dark.svg`))
|
||||
}
|
||||
},
|
||||
when: ContextKeyExpr.and(ResourceContextKey.Resource.isEqualTo(this.preferencesService.workspaceSettingsResource!.toString()), WorkbenchStateContext.isEqualTo('workspace')),
|
||||
@@ -470,8 +466,8 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
||||
id: commandId,
|
||||
title: OpenSettings2Action.LABEL,
|
||||
iconLocation: {
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/preferences-editor.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/preferences-editor-inverse.svg`))
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-light.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/preferences-editor-dark.svg`))
|
||||
}
|
||||
},
|
||||
when: ContextKeyExpr.and(ResourceContextKey.Resource.isEqualTo(this.preferencesService.getFolderSettingsResource(folder.uri)!.toString())),
|
||||
@@ -498,8 +494,8 @@ CommandsRegistry.registerCommand(OpenFolderSettingsAction.ID, serviceAccessor =>
|
||||
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||
command: {
|
||||
id: OpenFolderSettingsAction.ID,
|
||||
title: { value: OpenFolderSettingsAction.LABEL, original: 'Preferences: Open Folder Settings' },
|
||||
category: nls.localize('preferencesCategory', "Preferences")
|
||||
title: { value: OpenFolderSettingsAction.LABEL, original: 'Open Folder Settings' },
|
||||
category: { value: nls.localize('preferencesCategory', "Preferences"), original: 'Preferences' }
|
||||
},
|
||||
when: WorkbenchStateContext.isEqualTo('workspace')
|
||||
});
|
||||
@@ -510,8 +506,8 @@ CommandsRegistry.registerCommand(OpenWorkspaceSettingsAction.ID, serviceAccessor
|
||||
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||
command: {
|
||||
id: OpenWorkspaceSettingsAction.ID,
|
||||
title: { value: OpenWorkspaceSettingsAction.LABEL, original: 'Preferences: Open Workspace Settings' },
|
||||
category: nls.localize('preferencesCategory', "Preferences")
|
||||
title: { value: OpenWorkspaceSettingsAction.LABEL, original: 'Open Workspace Settings' },
|
||||
category: { value: nls.localize('preferencesCategory', "Preferences"), original: 'Preferences' }
|
||||
},
|
||||
when: WorkbenchStateContext.notEqualsTo('empty')
|
||||
});
|
||||
@@ -537,8 +533,8 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
||||
id: OpenGlobalKeybindingsFileAction.ID,
|
||||
title: OpenGlobalKeybindingsFileAction.LABEL,
|
||||
iconLocation: {
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/edit-json.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/electron-browser/media/edit-json-inverse.svg`))
|
||||
light: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/edit-json-light.svg`)),
|
||||
dark: URI.parse(require.toUrl(`vs/workbench/contrib/preferences/browser/media/edit-json-dark.svg`))
|
||||
}
|
||||
},
|
||||
when: ContextKeyExpr.and(CONTEXT_KEYBINDINGS_EDITOR),
|
||||
@@ -745,11 +741,21 @@ CommandsRegistry.registerCommand(SETTINGS_EDITOR_COMMAND_FILTER_ONLINE, serviceA
|
||||
const control = serviceAccessor.get(IEditorService).activeControl as SettingsEditor2;
|
||||
if (control instanceof SettingsEditor2) {
|
||||
control.focusSearch(`@tag:usesOnlineServices`);
|
||||
} else {
|
||||
serviceAccessor.get(IPreferencesService).openSettings(false, '@tag:usesOnlineServices');
|
||||
}
|
||||
});
|
||||
|
||||
// Preferences menu
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
|
||||
title: nls.localize({ key: 'miPreferences', comment: ['&& denotes a mnemonic'] }, "&&Preferences"),
|
||||
submenu: MenuId.MenubarPreferencesMenu,
|
||||
group: '5_autosave',
|
||||
order: 2,
|
||||
when: IsMacNativeContext.toNegated() // on macOS native the preferences menu is separate under the application menu
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
group: '1_settings',
|
||||
command: {
|
||||
@@ -759,6 +765,33 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
order: 1
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||
group: '2_configuration',
|
||||
command: {
|
||||
id: SETTINGS_COMMAND_OPEN_SETTINGS,
|
||||
title: nls.localize('settings', "Settings")
|
||||
},
|
||||
order: 1
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
group: '1_settings',
|
||||
command: {
|
||||
id: SETTINGS_EDITOR_COMMAND_FILTER_ONLINE,
|
||||
title: nls.localize({ key: 'miOpenOnlineSettings', comment: ['&& denotes a mnemonic'] }, "&&Online Services Settings")
|
||||
},
|
||||
order: 2
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||
group: '2_configuration',
|
||||
command: {
|
||||
id: SETTINGS_EDITOR_COMMAND_FILTER_ONLINE,
|
||||
title: nls.localize('onlineServices', "Online Services Settings")
|
||||
},
|
||||
order: 2
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
group: '2_keybindings',
|
||||
command: {
|
||||
@@ -768,6 +801,15 @@ MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
order: 1
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||
group: '2_keybindings',
|
||||
command: {
|
||||
id: OpenGlobalKeybindingsAction.ID,
|
||||
title: nls.localize('keyboardShortcuts', "Keyboard Shortcuts")
|
||||
},
|
||||
order: 1
|
||||
});
|
||||
|
||||
// Editor tool items
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
||||
@@ -775,8 +817,8 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
|
||||
id: SETTINGS_EDITOR_COMMAND_SWITCH_TO_JSON,
|
||||
title: nls.localize('openSettingsJson', "Open Settings (JSON)"),
|
||||
iconLocation: {
|
||||
dark: URI.parse(require.toUrl('vs/workbench/contrib/preferences/electron-browser/media/edit-json-inverse.svg')),
|
||||
light: URI.parse(require.toUrl('vs/workbench/contrib/preferences/electron-browser/media/edit-json.svg'))
|
||||
dark: URI.parse(require.toUrl('vs/workbench/contrib/preferences/browser/media/edit-json-dark.svg')),
|
||||
light: URI.parse(require.toUrl('vs/workbench/contrib/preferences/browser/media/edit-json-light.svg'))
|
||||
}
|
||||
},
|
||||
group: 'navigation',
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { dispose, IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { getIconClasses } from 'vs/editor/common/services/getIconClasses';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
@@ -164,7 +164,7 @@ export class OpenWorkspaceSettingsAction extends Action {
|
||||
static readonly ID = 'workbench.action.openWorkspaceSettings';
|
||||
static readonly LABEL = nls.localize('openWorkspaceSettings', "Open Workspace Settings");
|
||||
|
||||
private disposables: IDisposable[] = [];
|
||||
private readonly disposables = new DisposableStore();
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
@@ -174,7 +174,7 @@ export class OpenWorkspaceSettingsAction extends Action {
|
||||
) {
|
||||
super(id, label);
|
||||
this.update();
|
||||
this.workspaceContextService.onDidChangeWorkbenchState(() => this.update(), this, this.disposables);
|
||||
this.disposables.add(this.workspaceContextService.onDidChangeWorkbenchState(() => this.update(), this));
|
||||
}
|
||||
|
||||
private update(): void {
|
||||
@@ -186,7 +186,7 @@ export class OpenWorkspaceSettingsAction extends Action {
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this.disposables = dispose(this.disposables);
|
||||
this.disposables.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import { ConfigurationTarget } from 'vs/platform/configuration/common/configurat
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IEditorProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
@@ -84,7 +84,7 @@ export class PreferencesEditor extends BaseEditor {
|
||||
|
||||
readonly minimumHeight = 260;
|
||||
|
||||
private _onDidCreateWidget = new Emitter<{ width: number; height: number; } | undefined>();
|
||||
private _onDidCreateWidget = this._register(new Emitter<{ width: number; height: number; } | undefined>());
|
||||
readonly onDidSizeConstraintsChange: Event<{ width: number; height: number; } | undefined> = this._onDidCreateWidget.event;
|
||||
|
||||
constructor(
|
||||
@@ -94,7 +94,7 @@ export class PreferencesEditor extends BaseEditor {
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IProgressService private readonly progressService: IProgressService,
|
||||
@IEditorProgressService private readonly editorProgressService: IEditorProgressService,
|
||||
@IStorageService storageService: IStorageService
|
||||
) {
|
||||
super(PreferencesEditor.ID, telemetryService, themeService, storageService);
|
||||
@@ -237,7 +237,7 @@ export class PreferencesEditor extends BaseEditor {
|
||||
if (query) {
|
||||
return Promise.all([
|
||||
this.localSearchDelayer.trigger(() => this.preferencesRenderers.localFilterPreferences(query).then(() => { })),
|
||||
this.remoteSearchThrottle.trigger(() => Promise.resolve(this.progressService.showWhile(this.preferencesRenderers.remoteSearchPreferences(query), 500)))
|
||||
this.remoteSearchThrottle.trigger(() => Promise.resolve(this.editorProgressService.showWhile(this.preferencesRenderers.remoteSearchPreferences(query), 500)))
|
||||
]).then(() => { });
|
||||
} else {
|
||||
// When clearing the input, update immediately to clear it
|
||||
@@ -284,7 +284,7 @@ export class PreferencesEditor extends BaseEditor {
|
||||
}
|
||||
|
||||
private _countById(settingsGroups: ISettingsGroup[]): IStringDictionary<number> {
|
||||
const result = {};
|
||||
const result: IStringDictionary<number> = {};
|
||||
|
||||
for (const group of settingsGroups) {
|
||||
let i = 0;
|
||||
@@ -330,11 +330,6 @@ export class PreferencesEditor extends BaseEditor {
|
||||
this._lastReportedFilter = filter;
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this._onDidCreateWidget.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
class SettingsNavigator extends ArrayNavigator<ISetting> {
|
||||
@@ -685,7 +680,7 @@ class PreferencesRenderersController extends Disposable {
|
||||
}
|
||||
|
||||
private _updatePreference(key: string, value: any, source: ISetting, fromEditableSettings?: boolean): void {
|
||||
const data = {
|
||||
const data: { [key: string]: any } = {
|
||||
userConfigurationKeys: [key]
|
||||
};
|
||||
|
||||
@@ -774,10 +769,10 @@ class SideBySidePreferencesWidget extends Widget {
|
||||
|
||||
private settingsTargetsWidget: SettingsTargetsWidget;
|
||||
|
||||
private readonly _onFocus = new Emitter<void>();
|
||||
private readonly _onFocus = this._register(new Emitter<void>());
|
||||
readonly onFocus: Event<void> = this._onFocus.event;
|
||||
|
||||
private readonly _onDidSettingsTargetChange = new Emitter<SettingsTarget>();
|
||||
private readonly _onDidSettingsTargetChange = this._register(new Emitter<SettingsTarget>());
|
||||
readonly onDidSettingsTargetChange: Event<SettingsTarget> = this._onDidSettingsTargetChange.event;
|
||||
|
||||
private splitview: SplitView;
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { ContextSubMenu } from 'vs/base/browser/contextmenu';
|
||||
import { getDomNodePagePosition } from 'vs/base/browser/dom';
|
||||
import { EventHelper, getDomNodePagePosition } from 'vs/base/browser/dom';
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
import { Delayer } from 'vs/base/common/async';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { ICodeEditor, IEditorMouseEvent, MouseTargetType } from 'vs/editor/browser/editorBrowser';
|
||||
import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents';
|
||||
import { Position } from 'vs/editor/common/core/position';
|
||||
@@ -56,13 +56,13 @@ export class UserSettingsRenderer extends Disposable implements IPreferencesRend
|
||||
private modelChangeDelayer: Delayer<void> = new Delayer<void>(200);
|
||||
private associatedPreferencesModel: IPreferencesEditorModel<ISetting>;
|
||||
|
||||
private readonly _onFocusPreference = new Emitter<ISetting>();
|
||||
private readonly _onFocusPreference = this._register(new Emitter<ISetting>());
|
||||
readonly onFocusPreference: Event<ISetting> = this._onFocusPreference.event;
|
||||
|
||||
private readonly _onClearFocusPreference = new Emitter<ISetting>();
|
||||
private readonly _onClearFocusPreference = this._register(new Emitter<ISetting>());
|
||||
readonly onClearFocusPreference: Event<ISetting> = this._onClearFocusPreference.event;
|
||||
|
||||
private readonly _onUpdatePreference: Emitter<{ key: string, value: any, source: IIndexedSetting }> = new Emitter<{ key: string, value: any, source: IIndexedSetting }>();
|
||||
private readonly _onUpdatePreference = this._register(new Emitter<{ key: string, value: any, source: IIndexedSetting }>());
|
||||
readonly onUpdatePreference: Event<{ key: string, value: any, source: IIndexedSetting }> = this._onUpdatePreference.event;
|
||||
|
||||
private filterResult: IFilterResult | undefined;
|
||||
@@ -233,13 +233,13 @@ export class DefaultSettingsRenderer extends Disposable implements IPreferencesR
|
||||
private bracesHidingRenderer: BracesHidingRenderer;
|
||||
private filterResult: IFilterResult | undefined;
|
||||
|
||||
private readonly _onUpdatePreference: Emitter<{ key: string, value: any, source: IIndexedSetting }> = new Emitter<{ key: string, value: any, source: IIndexedSetting }>();
|
||||
private readonly _onUpdatePreference = this._register(new Emitter<{ key: string, value: any, source: IIndexedSetting }>());
|
||||
readonly onUpdatePreference: Event<{ key: string, value: any, source: IIndexedSetting }> = this._onUpdatePreference.event;
|
||||
|
||||
private readonly _onFocusPreference = new Emitter<ISetting>();
|
||||
private readonly _onFocusPreference = this._register(new Emitter<ISetting>());
|
||||
readonly onFocusPreference: Event<ISetting> = this._onFocusPreference.event;
|
||||
|
||||
private readonly _onClearFocusPreference = new Emitter<ISetting>();
|
||||
private readonly _onClearFocusPreference = this._register(new Emitter<ISetting>());
|
||||
readonly onClearFocusPreference: Event<ISetting> = this._onClearFocusPreference.event;
|
||||
|
||||
constructor(protected editor: ICodeEditor, readonly preferencesModel: DefaultSettingsEditorModel,
|
||||
@@ -436,13 +436,13 @@ class DefaultSettingsHeaderRenderer extends Disposable {
|
||||
|
||||
export class SettingsGroupTitleRenderer extends Disposable implements HiddenAreasProvider {
|
||||
|
||||
private readonly _onHiddenAreasChanged = new Emitter<void>();
|
||||
get onHiddenAreasChanged(): Event<void> { return this._onHiddenAreasChanged.event; }
|
||||
private readonly _onHiddenAreasChanged = this._register(new Emitter<void>());
|
||||
readonly onHiddenAreasChanged: Event<void> = this._onHiddenAreasChanged.event;
|
||||
|
||||
private settingsGroups: ISettingsGroup[];
|
||||
private hiddenGroups: ISettingsGroup[] = [];
|
||||
private settingsGroupTitleWidgets: SettingsGroupTitleWidget[];
|
||||
private disposables: IDisposable[] = [];
|
||||
private readonly renderDisposables = this._register(new DisposableStore());
|
||||
|
||||
constructor(private editor: ICodeEditor,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService
|
||||
@@ -474,8 +474,8 @@ export class SettingsGroupTitleRenderer extends Disposable implements HiddenArea
|
||||
const settingsGroupTitleWidget = this.instantiationService.createInstance(SettingsGroupTitleWidget, this.editor, group);
|
||||
settingsGroupTitleWidget.render();
|
||||
this.settingsGroupTitleWidgets.push(settingsGroupTitleWidget);
|
||||
this.disposables.push(settingsGroupTitleWidget);
|
||||
this.disposables.push(settingsGroupTitleWidget.onToggled(collapsed => this.onToggled(collapsed, settingsGroupTitleWidget.settingsGroup)));
|
||||
this.renderDisposables.add(settingsGroupTitleWidget);
|
||||
this.renderDisposables.add(settingsGroupTitleWidget.onToggled(collapsed => this.onToggled(collapsed, settingsGroupTitleWidget.settingsGroup)));
|
||||
}
|
||||
this.settingsGroupTitleWidgets.reverse();
|
||||
}
|
||||
@@ -515,7 +515,7 @@ export class SettingsGroupTitleRenderer extends Disposable implements HiddenArea
|
||||
|
||||
private disposeWidgets() {
|
||||
this.hiddenGroups = [];
|
||||
this.disposables = dispose(this.disposables);
|
||||
this.renderDisposables.clear();
|
||||
}
|
||||
|
||||
dispose() {
|
||||
@@ -820,6 +820,8 @@ class EditSettingRenderer extends Disposable {
|
||||
}
|
||||
|
||||
private onEditSettingClicked(editPreferenceWidget: EditPreferenceWidget<IIndexedSetting>, e: IEditorMouseEvent): void {
|
||||
EventHelper.stop(e.event, true);
|
||||
|
||||
const anchor = { x: e.event.posx, y: e.event.posy + 10 };
|
||||
const actions = this.getSettings(editPreferenceWidget.getLine()).length === 1 ? this.getActions(editPreferenceWidget.preferences[0], this.getConfigurationsMap()[editPreferenceWidget.preferences[0].key])
|
||||
: editPreferenceWidget.preferences.map(setting => new ContextSubMenu(setting.key, this.getActions(setting, this.getConfigurationsMap()[setting.key])));
|
||||
@@ -916,8 +918,8 @@ class SettingHighlighter extends Disposable {
|
||||
super();
|
||||
this.fixedHighlighter = this._register(instantiationService.createInstance(RangeHighlightDecorations));
|
||||
this.volatileHighlighter = this._register(instantiationService.createInstance(RangeHighlightDecorations));
|
||||
this.fixedHighlighter.onHighlghtRemoved(() => this.clearFocusEventEmitter.fire(this.highlightedSetting));
|
||||
this.volatileHighlighter.onHighlghtRemoved(() => this.clearFocusEventEmitter.fire(this.highlightedSetting));
|
||||
this.fixedHighlighter.onHighlightRemoved(() => this.clearFocusEventEmitter.fire(this.highlightedSetting));
|
||||
this.volatileHighlighter.onHighlightRemoved(() => this.clearFocusEventEmitter.fire(this.highlightedSetting));
|
||||
}
|
||||
|
||||
highlight(setting: ISetting, fix: boolean = false) {
|
||||
|
||||
@@ -11,19 +11,19 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry';
|
||||
import { IMatch, or, matchesContiguousSubString, matchesPrefix, matchesCamelCase, matchesWords } from 'vs/base/common/filters';
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IRequestService } from 'vs/platform/request/node/request';
|
||||
import { asJson } from 'vs/base/node/request';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IPreferencesSearchService, ISearchProvider, IWorkbenchSettingsConfiguration } from 'vs/workbench/contrib/preferences/common/preferences';
|
||||
import { IRequestService, asJson } from 'vs/platform/request/common/request';
|
||||
import { IExtensionManagementService, ILocalExtension, IExtensionEnablementService } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { IPreferencesSearchService, ISearchProvider, IWorkbenchSettingsConfiguration } from 'vs/workbench/contrib/preferences/common/preferences';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
import { canceled } from 'vs/base/common/errors';
|
||||
import { ExtensionType } from 'vs/platform/extensions/common/extensions';
|
||||
import { nullRange } from 'vs/workbench/services/preferences/common/preferencesModels';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IStringDictionary } from 'vs/base/common/collections';
|
||||
import { IProductService } from 'vs/platform/product/common/product';
|
||||
|
||||
export interface IEndpointDetails {
|
||||
urlBase?: string;
|
||||
@@ -36,9 +36,9 @@ export class PreferencesSearchService extends Disposable implements IPreferences
|
||||
private _installedExtensions: Promise<ILocalExtension[]>;
|
||||
|
||||
constructor(
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||
@IProductService private readonly productService: IProductService,
|
||||
@IExtensionManagementService private readonly extensionManagementService: IExtensionManagementService,
|
||||
@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService
|
||||
) {
|
||||
@@ -72,7 +72,7 @@ export class PreferencesSearchService extends Disposable implements IPreferences
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
urlBase: this.environmentService.settingsSearchUrl
|
||||
urlBase: this.productService.settingsSearchUrl
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -168,7 +168,7 @@ class RemoteSearchProvider implements ISearchProvider {
|
||||
private _remoteSearchP: Promise<IFilterMetadata | null>;
|
||||
|
||||
constructor(private options: IRemoteSearchProviderOptions, private installedExtensions: Promise<ILocalExtension[]>,
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
@IProductService private readonly productService: IProductService,
|
||||
@IRequestService private readonly requestService: IRequestService,
|
||||
@ILogService private readonly logService: ILogService
|
||||
) {
|
||||
@@ -261,7 +261,7 @@ class RemoteSearchProvider implements ISearchProvider {
|
||||
}
|
||||
|
||||
const requestType = details.body ? 'post' : 'get';
|
||||
const headers = {
|
||||
const headers: IStringDictionary<string> = {
|
||||
'User-Agent': 'request',
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
};
|
||||
@@ -363,7 +363,7 @@ class RemoteSearchProvider implements ISearchProvider {
|
||||
const extensions = await this.installedExtensions;
|
||||
const filters = this.options.newExtensionsOnly ?
|
||||
[`diminish eq 'latest'`] :
|
||||
this.getVersionFilters(extensions, this.environmentService.settingsSearchBuildId);
|
||||
this.getVersionFilters(extensions, this.productService.settingsSearchBuildId);
|
||||
|
||||
const filterStr = filters
|
||||
.slice(filterPage * RemoteSearchProvider.MAX_REQUEST_FILTERS, (filterPage + 1) * RemoteSearchProvider.MAX_REQUEST_FILTERS)
|
||||
@@ -439,7 +439,7 @@ function remoteSettingToISetting(remoteSetting: IRemoteSetting): IExtensionSetti
|
||||
};
|
||||
}
|
||||
|
||||
class SettingMatches {
|
||||
export class SettingMatches {
|
||||
|
||||
private readonly descriptionMatchingWords: Map<string, IRange[]> = new Map<string, IRange[]>();
|
||||
private readonly keyMatchingWords: Map<string, IRange[]> = new Map<string, IRange[]>();
|
||||
@@ -460,8 +460,8 @@ class SettingMatches {
|
||||
const descriptionRanges: IRange[] = this.getRangesForWords(words, this.descriptionMatchingWords, [subSettingMatches.descriptionMatchingWords, subSettingMatches.keyMatchingWords, subSettingMatches.valueMatchingWords]);
|
||||
const keyRanges: IRange[] = this.getRangesForWords(words, this.keyMatchingWords, [subSettingMatches.descriptionMatchingWords, subSettingMatches.keyMatchingWords, subSettingMatches.valueMatchingWords]);
|
||||
const subSettingKeyRanges: IRange[] = this.getRangesForWords(words, subSettingMatches.keyMatchingWords, [this.descriptionMatchingWords, this.keyMatchingWords, subSettingMatches.valueMatchingWords]);
|
||||
const subSettinValueRanges: IRange[] = this.getRangesForWords(words, subSettingMatches.valueMatchingWords, [this.descriptionMatchingWords, this.keyMatchingWords, subSettingMatches.keyMatchingWords]);
|
||||
result.push(...descriptionRanges, ...keyRanges, ...subSettingKeyRanges, ...subSettinValueRanges);
|
||||
const subSettingValueRanges: IRange[] = this.getRangesForWords(words, subSettingMatches.valueMatchingWords, [this.descriptionMatchingWords, this.keyMatchingWords, subSettingMatches.keyMatchingWords]);
|
||||
result.push(...descriptionRanges, ...keyRanges, ...subSettingKeyRanges, ...subSettingValueRanges);
|
||||
result.push(...subSettingMatches.matches);
|
||||
}
|
||||
}
|
||||
@@ -562,4 +562,4 @@ class SettingMatches {
|
||||
endColumn: setting.valueRange.startColumn + match.end + 1
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ import { Action, IAction } from 'vs/base/common/actions';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { MarkdownString } from 'vs/base/common/htmlContent';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IMarginData } from 'vs/editor/browser/controller/mouseTarget';
|
||||
import { ICodeEditor, IEditorMouseEvent, IViewZone, MouseTargetType } from 'vs/editor/browser/editorBrowser';
|
||||
@@ -302,8 +302,6 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
||||
private detailsElement: HTMLElement;
|
||||
private dropDownElement: HTMLElement;
|
||||
|
||||
private disposables: IDisposable[] = [];
|
||||
|
||||
constructor(
|
||||
action: IAction,
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||
@@ -312,7 +310,7 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
||||
super(null, action);
|
||||
const workspace = this.contextService.getWorkspace();
|
||||
this._folder = workspace.folders.length === 1 ? workspace.folders[0] : null;
|
||||
this.disposables.push(this.contextService.onDidChangeWorkspaceFolders(() => this.onWorkspaceFoldersChanged()));
|
||||
this._register(this.contextService.onDidChangeWorkspaceFolders(() => this.onWorkspaceFoldersChanged()));
|
||||
}
|
||||
|
||||
get folder(): IWorkspaceFolder | null {
|
||||
@@ -347,8 +345,8 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
||||
'tabindex': '0'
|
||||
}, this.labelElement, this.detailsElement, this.dropDownElement);
|
||||
this._register(DOM.addDisposableListener(this.anchorElement, DOM.EventType.MOUSE_DOWN, e => DOM.EventHelper.stop(e)));
|
||||
this.disposables.push(DOM.addDisposableListener(this.anchorElement, DOM.EventType.CLICK, e => this.onClick(e)));
|
||||
this.disposables.push(DOM.addDisposableListener(this.anchorElement, DOM.EventType.KEY_UP, e => this.onKeyUp(e)));
|
||||
this._register(DOM.addDisposableListener(this.anchorElement, DOM.EventType.CLICK, e => this.onClick(e)));
|
||||
this._register(DOM.addDisposableListener(this.anchorElement, DOM.EventType.KEY_UP, e => this.onKeyUp(e)));
|
||||
|
||||
DOM.append(this.container, this.anchorElement);
|
||||
|
||||
@@ -460,11 +458,6 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
dispose(this.disposables);
|
||||
super.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
export type SettingsTarget = ConfigurationTarget.USER_LOCAL | ConfigurationTarget.USER_REMOTE | ConfigurationTarget.WORKSPACE | URI;
|
||||
@@ -484,7 +477,7 @@ export class SettingsTargetsWidget extends Widget {
|
||||
|
||||
private _settingsTarget: SettingsTarget;
|
||||
|
||||
private readonly _onDidTargetChange = new Emitter<SettingsTarget>();
|
||||
private readonly _onDidTargetChange = this._register(new Emitter<SettingsTarget>());
|
||||
readonly onDidTargetChange: Event<SettingsTarget> = this._onDidTargetChange.event;
|
||||
|
||||
constructor(
|
||||
@@ -517,7 +510,7 @@ export class SettingsTargetsWidget extends Widget {
|
||||
const remoteAuthority = this.environmentService.configuration.remoteAuthority;
|
||||
const hostLabel = remoteAuthority && this.labelService.getHostLabel(REMOTE_HOST_SCHEME, remoteAuthority);
|
||||
const remoteSettingsLabel = localize('userSettingsRemote', "Remote") +
|
||||
(hostLabel ? ` (${hostLabel})` : '');
|
||||
(hostLabel ? ` [${hostLabel}]` : '');
|
||||
this.userRemoteSettings = new Action('userSettingsRemote', remoteSettingsLabel, '.settings-tab', true, () => this.updateTarget(ConfigurationTarget.USER_REMOTE));
|
||||
this.userRemoteSettings.tooltip = this.userRemoteSettings.label;
|
||||
|
||||
@@ -751,8 +744,8 @@ export class EditPreferenceWidget<T> extends Disposable {
|
||||
|
||||
private _editPreferenceDecoration: string[];
|
||||
|
||||
private readonly _onClick = new Emitter<IEditorMouseEvent>();
|
||||
get onClick(): Event<IEditorMouseEvent> { return this._onClick.event; }
|
||||
private readonly _onClick = this._register(new Emitter<IEditorMouseEvent>());
|
||||
readonly onClick: Event<IEditorMouseEvent> = this._onClick.event;
|
||||
|
||||
constructor(private editor: ICodeEditor
|
||||
) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { ITreeElement } from 'vs/base/browser/ui/tree/tree';
|
||||
import * as arrays from 'vs/base/common/arrays';
|
||||
import { Delayer, ThrottledDelayer } from 'vs/base/common/async';
|
||||
import { Delayer, ThrottledDelayer, timeout } from 'vs/base/common/async';
|
||||
import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
import * as collections from 'vs/base/common/collections';
|
||||
import { getErrorMessage, isPromiseCanceledError } from 'vs/base/common/errors';
|
||||
@@ -82,6 +82,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
return false;
|
||||
}
|
||||
return type === SettingValueType.Enum ||
|
||||
type === SettingValueType.ArrayOfString ||
|
||||
type === SettingValueType.Complex ||
|
||||
type === SettingValueType.Boolean ||
|
||||
type === SettingValueType.Exclude;
|
||||
@@ -211,7 +212,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
setInput(input: SettingsEditor2Input, options: SettingsEditorOptions | null, token: CancellationToken): Promise<void> {
|
||||
this.inSettingsEditorContextKey.set(true);
|
||||
return super.setInput(input, options, token)
|
||||
.then(() => new Promise(process.nextTick)) // Force setInput to be async
|
||||
.then(() => timeout(0)) // Force setInput to be async
|
||||
.then(() => {
|
||||
return this.render(token);
|
||||
})
|
||||
@@ -251,10 +252,12 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
}
|
||||
}
|
||||
|
||||
setOptions(options: SettingsEditorOptions): void {
|
||||
setOptions(options: SettingsEditorOptions | null): void {
|
||||
super.setOptions(options);
|
||||
|
||||
this._setOptions(options);
|
||||
if (options) {
|
||||
this._setOptions(options);
|
||||
}
|
||||
}
|
||||
|
||||
private _setOptions(options: SettingsEditorOptions): void {
|
||||
@@ -565,7 +568,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
}
|
||||
|
||||
private createTOC(parent: HTMLElement): void {
|
||||
this.tocTreeModel = new TOCTreeModel(this.viewState);
|
||||
this.tocTreeModel = this.instantiationService.createInstance(TOCTreeModel, this.viewState);
|
||||
this.tocTreeContainer = DOM.append(parent, $('.settings-toc-container'));
|
||||
|
||||
this.tocTree = this._register(this.instantiationService.createInstance(TOCTree,
|
||||
@@ -974,7 +977,7 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
if (key) {
|
||||
const focusedKey = focusedSetting.getAttribute(AbstractSettingRenderer.SETTING_KEY_ATTR);
|
||||
if (focusedKey === key &&
|
||||
!DOM.hasClass(focusedSetting, 'setting-item-exclude')) { // update `exclude`s live, as they have a separate "submit edit" step built in before this
|
||||
!DOM.hasClass(focusedSetting, 'setting-item-list')) { // update `list`s live, as they have a separate "submit edit" step built in before this
|
||||
|
||||
this.updateModifiedLabelForKey(key);
|
||||
this.scheduleRefresh(focusedSetting, key);
|
||||
@@ -1123,11 +1126,12 @@ export class SettingsEditor2 extends BaseEditor {
|
||||
const nlpResult = results[SearchResultIdx.Remote];
|
||||
const nlpMetadata = nlpResult && nlpResult.metadata;
|
||||
|
||||
const durations = {};
|
||||
durations['nlpResult'] = nlpMetadata && nlpMetadata.duration;
|
||||
const durations = {
|
||||
nlpResult: nlpMetadata && nlpMetadata.duration
|
||||
};
|
||||
|
||||
// Count unique results
|
||||
const counts = {};
|
||||
const counts: { nlpResult?: number, filterResult?: number } = {};
|
||||
const filterResult = results[SearchResultIdx.Local];
|
||||
if (filterResult) {
|
||||
counts['filterResult'] = filterResult.filterMatches.length;
|
||||
@@ -25,7 +25,7 @@ import { Color, RGBA } from 'vs/base/common/color';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { dispose, IDisposable, Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { ISpliceable } from 'vs/base/common/sequence';
|
||||
import { escapeRegExpCharacters, startsWith } from 'vs/base/common/strings';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
@@ -42,13 +42,15 @@ import { attachButtonStyler, attachInputBoxStyler, attachSelectBoxStyler, attach
|
||||
import { ICssStyleCollector, ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
|
||||
import { ITOCEntry } from 'vs/workbench/contrib/preferences/browser/settingsLayout';
|
||||
import { ISettingsEditorViewState, settingKeyToDisplayFormat, SettingsTreeElement, SettingsTreeGroupChild, SettingsTreeGroupElement, SettingsTreeNewExtensionsElement, SettingsTreeSettingElement } from 'vs/workbench/contrib/preferences/browser/settingsTreeModels';
|
||||
import { ExcludeSettingWidget, IExcludeChangeEvent, IExcludeDataItem, settingsHeaderForeground, settingsNumberInputBackground, settingsNumberInputBorder, settingsNumberInputForeground, settingsSelectBackground, settingsSelectBorder, settingsSelectForeground, settingsSelectListBorder, settingsTextInputBackground, settingsTextInputBorder, settingsTextInputForeground } from 'vs/workbench/contrib/preferences/browser/settingsWidgets';
|
||||
import { ListSettingWidget, IListChangeEvent, IListDataItem, settingsHeaderForeground, settingsNumberInputBackground, settingsNumberInputBorder, settingsNumberInputForeground, settingsSelectBackground, settingsSelectBorder, settingsSelectForeground, settingsSelectListBorder, settingsTextInputBackground, settingsTextInputBorder, settingsTextInputForeground, ExcludeSettingWidget } from 'vs/workbench/contrib/preferences/browser/settingsWidgets';
|
||||
import { SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU } from 'vs/workbench/contrib/preferences/common/preferences';
|
||||
import { ISetting, ISettingsGroup, SettingValueType } from 'vs/workbench/services/preferences/common/preferences';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
import { isArray } from 'vs/base/common/types';
|
||||
|
||||
const $ = DOM.$;
|
||||
|
||||
function getExcludeDisplayValue(element: SettingsTreeSettingElement): IExcludeDataItem[] {
|
||||
function getExcludeDisplayValue(element: SettingsTreeSettingElement): IListDataItem[] {
|
||||
const data = element.isConfigured ?
|
||||
{ ...element.defaultValue, ...element.scopeValue } :
|
||||
element.defaultValue;
|
||||
@@ -61,12 +63,20 @@ function getExcludeDisplayValue(element: SettingsTreeSettingElement): IExcludeDa
|
||||
|
||||
return {
|
||||
id: key,
|
||||
pattern: key,
|
||||
value: key,
|
||||
sibling
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
function getListDisplayValue(element: SettingsTreeSettingElement): IListDataItem[] {
|
||||
return element.value.map((key: string) => {
|
||||
return {
|
||||
value: key
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
export function resolveSettingsTree(tocData: ITOCEntry, coreSettingsGroups: ISettingsGroup[]): { tree: ITOCEntry, leftoverSettings: Set<ISetting> } {
|
||||
const allSettings = getFlatSettings(coreSettingsGroups);
|
||||
return {
|
||||
@@ -210,8 +220,12 @@ interface ISettingComplexItemTemplate extends ISettingItemTemplate<void> {
|
||||
button: Button;
|
||||
}
|
||||
|
||||
interface ISettingListItemTemplate extends ISettingItemTemplate<void> {
|
||||
listWidget: ListSettingWidget;
|
||||
}
|
||||
|
||||
interface ISettingExcludeItemTemplate extends ISettingItemTemplate<void> {
|
||||
excludeWidget: ExcludeSettingWidget;
|
||||
excludeWidget: ListSettingWidget;
|
||||
}
|
||||
|
||||
interface ISettingNewExtensionsTemplate extends IDisposableTemplate {
|
||||
@@ -228,6 +242,7 @@ const SETTINGS_TEXT_TEMPLATE_ID = 'settings.text.template';
|
||||
const SETTINGS_NUMBER_TEMPLATE_ID = 'settings.number.template';
|
||||
const SETTINGS_ENUM_TEMPLATE_ID = 'settings.enum.template';
|
||||
const SETTINGS_BOOL_TEMPLATE_ID = 'settings.bool.template';
|
||||
const SETTINGS_ARRAY_TEMPLATE_ID = 'settings.array.template';
|
||||
const SETTINGS_EXCLUDE_TEMPLATE_ID = 'settings.exclude.template';
|
||||
const SETTINGS_COMPLEX_TEMPLATE_ID = 'settings.complex.template';
|
||||
const SETTINGS_NEW_EXTENSIONS_TEMPLATE_ID = 'settings.newExtensions.template';
|
||||
@@ -249,7 +264,7 @@ export interface ISettingOverrideClickEvent {
|
||||
targetKey: string;
|
||||
}
|
||||
|
||||
export abstract class AbstractSettingRenderer implements ITreeRenderer<SettingsTreeElement, never, any> {
|
||||
export abstract class AbstractSettingRenderer extends Disposable implements ITreeRenderer<SettingsTreeElement, never, any> {
|
||||
/** To override */
|
||||
abstract get templateId(): string;
|
||||
|
||||
@@ -261,19 +276,19 @@ export abstract class AbstractSettingRenderer implements ITreeRenderer<SettingsT
|
||||
static readonly SETTING_KEY_ATTR = 'data-key';
|
||||
static readonly SETTING_ID_ATTR = 'data-id';
|
||||
|
||||
private readonly _onDidClickOverrideElement = new Emitter<ISettingOverrideClickEvent>();
|
||||
private readonly _onDidClickOverrideElement = this._register(new Emitter<ISettingOverrideClickEvent>());
|
||||
readonly onDidClickOverrideElement: Event<ISettingOverrideClickEvent> = this._onDidClickOverrideElement.event;
|
||||
|
||||
protected readonly _onDidChangeSetting = new Emitter<ISettingChangeEvent>();
|
||||
protected readonly _onDidChangeSetting = this._register(new Emitter<ISettingChangeEvent>());
|
||||
readonly onDidChangeSetting: Event<ISettingChangeEvent> = this._onDidChangeSetting.event;
|
||||
|
||||
protected readonly _onDidOpenSettings = new Emitter<string>();
|
||||
protected readonly _onDidOpenSettings = this._register(new Emitter<string>());
|
||||
readonly onDidOpenSettings: Event<string> = this._onDidOpenSettings.event;
|
||||
|
||||
private readonly _onDidClickSettingLink = new Emitter<ISettingLinkClickEvent>();
|
||||
private readonly _onDidClickSettingLink = this._register(new Emitter<ISettingLinkClickEvent>());
|
||||
readonly onDidClickSettingLink: Event<ISettingLinkClickEvent> = this._onDidClickSettingLink.event;
|
||||
|
||||
private readonly _onDidFocusSetting = new Emitter<SettingsTreeSettingElement>();
|
||||
private readonly _onDidFocusSetting = this._register(new Emitter<SettingsTreeSettingElement>());
|
||||
readonly onDidFocusSetting: Event<SettingsTreeSettingElement> = this._onDidFocusSetting.event;
|
||||
|
||||
// Put common injections back here
|
||||
@@ -287,6 +302,7 @@ export abstract class AbstractSettingRenderer implements ITreeRenderer<SettingsT
|
||||
@IContextMenuService protected readonly _contextMenuService: IContextMenuService,
|
||||
@IKeybindingService protected readonly _keybindingService: IKeybindingService,
|
||||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
renderTemplate(container: HTMLElement): any {
|
||||
@@ -401,7 +417,9 @@ export abstract class AbstractSettingRenderer implements ITreeRenderer<SettingsT
|
||||
|
||||
template.descriptionElement.innerHTML = '';
|
||||
if (element.setting.descriptionIsMarkdown) {
|
||||
const renderedDescription = this.renderDescriptionMarkdown(element, element.description, template.toDispose);
|
||||
const disposables = new DisposableStore();
|
||||
template.toDispose.push(disposables);
|
||||
const renderedDescription = this.renderDescriptionMarkdown(element, element.description, disposables);
|
||||
template.descriptionElement.appendChild(renderedDescription);
|
||||
} else {
|
||||
template.descriptionElement.innerText = element.description;
|
||||
@@ -445,7 +463,7 @@ export abstract class AbstractSettingRenderer implements ITreeRenderer<SettingsT
|
||||
|
||||
}
|
||||
|
||||
private renderDescriptionMarkdown(element: SettingsTreeSettingElement, text: string, disposeables: IDisposable[]): HTMLElement {
|
||||
private renderDescriptionMarkdown(element: SettingsTreeSettingElement, text: string, disposeables: DisposableStore): HTMLElement {
|
||||
// Rewrite `#editor.fontSize#` to link format
|
||||
text = fixSettingLinks(text);
|
||||
|
||||
@@ -652,11 +670,81 @@ export class SettingComplexRenderer extends AbstractSettingRenderer implements I
|
||||
}
|
||||
}
|
||||
|
||||
export class SettingArrayRenderer extends AbstractSettingRenderer implements ITreeRenderer<SettingsTreeSettingElement, never, ISettingListItemTemplate> {
|
||||
templateId = SETTINGS_ARRAY_TEMPLATE_ID;
|
||||
|
||||
renderTemplate(container: HTMLElement): ISettingListItemTemplate {
|
||||
const common = this.renderCommonTemplate(null, container, 'list');
|
||||
|
||||
const listWidget = this._instantiationService.createInstance(ListSettingWidget, common.controlElement);
|
||||
listWidget.domNode.classList.add(AbstractSettingRenderer.CONTROL_CLASS);
|
||||
common.toDispose.push(listWidget);
|
||||
|
||||
const template: ISettingListItemTemplate = {
|
||||
...common,
|
||||
listWidget
|
||||
};
|
||||
|
||||
this.addSettingElementFocusHandler(template);
|
||||
|
||||
common.toDispose.push(listWidget.onDidChangeList(e => this.onDidChangeList(template, e)));
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
private onDidChangeList(template: ISettingListItemTemplate, e: IListChangeEvent): void {
|
||||
if (template.context) {
|
||||
const newValue: any[] | undefined = isArray(template.context.scopeValue)
|
||||
? [...template.context.scopeValue]
|
||||
: [...template.context.value];
|
||||
|
||||
// Delete value
|
||||
if (e.removeIndex) {
|
||||
if (!e.value && e.originalValue && e.removeIndex > -1) {
|
||||
newValue.splice(e.removeIndex, 1);
|
||||
}
|
||||
}
|
||||
// Add value
|
||||
else if (e.value && !e.originalValue) {
|
||||
newValue.push(e.value);
|
||||
}
|
||||
// Update value
|
||||
else if (e.value && e.originalValue) {
|
||||
const valueIndex = newValue.indexOf(e.originalValue);
|
||||
if (valueIndex > -1) {
|
||||
newValue[valueIndex] = e.value;
|
||||
}
|
||||
// For some reason, we are updating and cannot find original value
|
||||
// Just append the value in this case
|
||||
else {
|
||||
newValue.push(e.value);
|
||||
}
|
||||
}
|
||||
|
||||
this._onDidChangeSetting.fire({
|
||||
key: template.context.setting.key,
|
||||
value: newValue,
|
||||
type: template.context.valueType
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
renderElement(element: ITreeNode<SettingsTreeSettingElement, never>, index: number, templateData: ISettingListItemTemplate): void {
|
||||
super.renderSettingElement(element, index, templateData);
|
||||
}
|
||||
|
||||
protected renderValue(dataElement: SettingsTreeSettingElement, template: ISettingListItemTemplate, onChange: (value: string) => void): void {
|
||||
const value = getListDisplayValue(dataElement);
|
||||
template.listWidget.setValue(value);
|
||||
template.context = dataElement;
|
||||
}
|
||||
}
|
||||
|
||||
export class SettingExcludeRenderer extends AbstractSettingRenderer implements ITreeRenderer<SettingsTreeSettingElement, never, ISettingExcludeItemTemplate> {
|
||||
templateId = SETTINGS_EXCLUDE_TEMPLATE_ID;
|
||||
|
||||
renderTemplate(container: HTMLElement): ISettingExcludeItemTemplate {
|
||||
const common = this.renderCommonTemplate(null, container, 'exclude');
|
||||
const common = this.renderCommonTemplate(null, container, 'list');
|
||||
|
||||
const excludeWidget = this._instantiationService.createInstance(ExcludeSettingWidget, common.controlElement);
|
||||
excludeWidget.domNode.classList.add(AbstractSettingRenderer.CONTROL_CLASS);
|
||||
@@ -669,46 +757,45 @@ export class SettingExcludeRenderer extends AbstractSettingRenderer implements I
|
||||
|
||||
this.addSettingElementFocusHandler(template);
|
||||
|
||||
common.toDispose.push(excludeWidget.onDidChangeExclude(e => this.onDidChangeExclude(template, e)));
|
||||
common.toDispose.push(excludeWidget.onDidChangeList(e => this.onDidChangeExclude(template, e)));
|
||||
|
||||
return template;
|
||||
}
|
||||
|
||||
private onDidChangeExclude(template: ISettingExcludeItemTemplate, e: IExcludeChangeEvent): void {
|
||||
private onDidChangeExclude(template: ISettingExcludeItemTemplate, e: IListChangeEvent): void {
|
||||
if (template.context) {
|
||||
const newValue = { ...template.context.scopeValue };
|
||||
|
||||
// first delete the existing entry, if present
|
||||
if (e.originalPattern) {
|
||||
if (e.originalPattern in template.context.defaultValue) {
|
||||
if (e.originalValue) {
|
||||
if (e.originalValue in template.context.defaultValue) {
|
||||
// delete a default by overriding it
|
||||
newValue[e.originalPattern] = false;
|
||||
newValue[e.originalValue] = false;
|
||||
} else {
|
||||
delete newValue[e.originalPattern];
|
||||
delete newValue[e.originalValue];
|
||||
}
|
||||
}
|
||||
|
||||
// then add the new or updated entry, if present
|
||||
if (e.pattern) {
|
||||
if (e.pattern in template.context.defaultValue && !e.sibling) {
|
||||
if (e.value) {
|
||||
if (e.value in template.context.defaultValue && !e.sibling) {
|
||||
// add a default by deleting its override
|
||||
delete newValue[e.pattern];
|
||||
delete newValue[e.value];
|
||||
} else {
|
||||
newValue[e.pattern] = e.sibling ? { when: e.sibling } : true;
|
||||
newValue[e.value] = e.sibling ? { when: e.sibling } : true;
|
||||
}
|
||||
}
|
||||
|
||||
const sortKeys = (obj: Object) => {
|
||||
const keyArray = Object.keys(obj)
|
||||
.map(key => ({ key, val: obj[key] }))
|
||||
.sort((a, b) => a.key.localeCompare(b.key));
|
||||
function sortKeys<T extends object>(obj: T) {
|
||||
const sortedKeys = Object.keys(obj)
|
||||
.sort((a, b) => a.localeCompare(b)) as Array<keyof T>;
|
||||
|
||||
const retVal = {};
|
||||
keyArray.forEach(pair => {
|
||||
retVal[pair.key] = pair.val;
|
||||
});
|
||||
const retVal: Partial<T> = {};
|
||||
for (const key of sortedKeys) {
|
||||
retVal[key] = obj[key];
|
||||
}
|
||||
return retVal;
|
||||
};
|
||||
}
|
||||
|
||||
this._onDidChangeSetting.fire({
|
||||
key: template.context.setting.key,
|
||||
@@ -939,11 +1026,11 @@ export class SettingBoolRenderer extends AbstractSettingRenderer implements ITre
|
||||
|
||||
const deprecationWarningElement = DOM.append(container, $('.setting-item-deprecation-message'));
|
||||
|
||||
const toDispose: IDisposable[] = [];
|
||||
const toDispose = new DisposableStore();
|
||||
const checkbox = new Checkbox({ actionClassName: 'setting-value-checkbox', isChecked: true, title: '', inputActiveOptionBorder: undefined });
|
||||
controlElement.appendChild(checkbox.domNode);
|
||||
toDispose.push(checkbox);
|
||||
toDispose.push(checkbox.onChange(() => {
|
||||
toDispose.add(checkbox);
|
||||
toDispose.add(checkbox.onChange(() => {
|
||||
if (template.onChange) {
|
||||
template.onChange(checkbox.checked);
|
||||
}
|
||||
@@ -951,7 +1038,7 @@ export class SettingBoolRenderer extends AbstractSettingRenderer implements ITre
|
||||
|
||||
// Need to listen for mouse clicks on description and toggle checkbox - use target ID for safety
|
||||
// Also have to ignore embedded links - too buried to stop propagation
|
||||
toDispose.push(DOM.addDisposableListener(descriptionElement, DOM.EventType.MOUSE_DOWN, (e) => {
|
||||
toDispose.add(DOM.addDisposableListener(descriptionElement, DOM.EventType.MOUSE_DOWN, (e) => {
|
||||
const targetElement = <HTMLElement>e.target;
|
||||
const targetId = descriptionElement.getAttribute('checkbox_label_target_id');
|
||||
|
||||
@@ -968,10 +1055,10 @@ export class SettingBoolRenderer extends AbstractSettingRenderer implements ITre
|
||||
checkbox.domNode.classList.add(AbstractSettingRenderer.CONTROL_CLASS);
|
||||
const toolbarContainer = DOM.append(container, $('.setting-toolbar-container'));
|
||||
const toolbar = this.renderSettingToolbar(toolbarContainer);
|
||||
toDispose.push(toolbar);
|
||||
toDispose.add(toolbar);
|
||||
|
||||
const template: ISettingBoolItemTemplate = {
|
||||
toDispose,
|
||||
toDispose: [toDispose],
|
||||
|
||||
containerElement: container,
|
||||
categoryElement,
|
||||
@@ -987,16 +1074,16 @@ export class SettingBoolRenderer extends AbstractSettingRenderer implements ITre
|
||||
this.addSettingElementFocusHandler(template);
|
||||
|
||||
// Prevent clicks from being handled by list
|
||||
toDispose.push(DOM.addDisposableListener(controlElement, 'mousedown', (e: IMouseEvent) => e.stopPropagation()));
|
||||
toDispose.add(DOM.addDisposableListener(controlElement, 'mousedown', (e: IMouseEvent) => e.stopPropagation()));
|
||||
|
||||
toDispose.push(DOM.addStandardDisposableListener(controlElement, 'keydown', (e: StandardKeyboardEvent) => {
|
||||
toDispose.add(DOM.addStandardDisposableListener(controlElement, 'keydown', (e: StandardKeyboardEvent) => {
|
||||
if (e.keyCode === KeyCode.Escape) {
|
||||
e.browserEvent.stopPropagation();
|
||||
}
|
||||
}));
|
||||
|
||||
toDispose.push(DOM.addDisposableListener(titleElement, DOM.EventType.MOUSE_ENTER, e => container.classList.add('mouseover')));
|
||||
toDispose.push(DOM.addDisposableListener(titleElement, DOM.EventType.MOUSE_LEAVE, e => container.classList.remove('mouseover')));
|
||||
toDispose.add(DOM.addDisposableListener(titleElement, DOM.EventType.MOUSE_ENTER, e => container.classList.add('mouseover')));
|
||||
toDispose.add(DOM.addDisposableListener(titleElement, DOM.EventType.MOUSE_LEAVE, e => container.classList.remove('mouseover')));
|
||||
|
||||
return template;
|
||||
}
|
||||
@@ -1053,6 +1140,7 @@ export class SettingTreeRenderers {
|
||||
this._instantiationService.createInstance(SettingBoolRenderer, this.settingActions),
|
||||
this._instantiationService.createInstance(SettingNumberRenderer, this.settingActions),
|
||||
this._instantiationService.createInstance(SettingBoolRenderer, this.settingActions),
|
||||
this._instantiationService.createInstance(SettingArrayRenderer, this.settingActions),
|
||||
this._instantiationService.createInstance(SettingComplexRenderer, this.settingActions),
|
||||
this._instantiationService.createInstance(SettingTextRenderer, this.settingActions),
|
||||
this._instantiationService.createInstance(SettingExcludeRenderer, this.settingActions),
|
||||
@@ -1163,6 +1251,7 @@ function escapeInvisibleChars(enumValue: string): string {
|
||||
export class SettingsTreeFilter implements ITreeFilter<SettingsTreeElement> {
|
||||
constructor(
|
||||
private viewState: ISettingsEditorViewState,
|
||||
@IWorkbenchEnvironmentService private environmentService: IWorkbenchEnvironmentService,
|
||||
) { }
|
||||
|
||||
filter(element: SettingsTreeElement, parentVisibility: TreeVisibility): TreeFilterResult<void> {
|
||||
@@ -1175,7 +1264,8 @@ export class SettingsTreeFilter implements ITreeFilter<SettingsTreeElement> {
|
||||
|
||||
// Non-user scope selected
|
||||
if (element instanceof SettingsTreeSettingElement && this.viewState.settingsTarget !== ConfigurationTarget.USER_LOCAL) {
|
||||
if (!element.matchesScope(this.viewState.settingsTarget)) {
|
||||
const isRemote = !!this.environmentService.configuration.remoteAuthority;
|
||||
if (!element.matchesScope(this.viewState.settingsTarget, isRemote)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1249,23 +1339,27 @@ class SettingsTreeDelegate implements IListVirtualDelegate<SettingsTreeGroupChil
|
||||
}
|
||||
|
||||
if (element instanceof SettingsTreeSettingElement) {
|
||||
if (element.valueType === 'boolean') {
|
||||
if (element.valueType === SettingValueType.Boolean) {
|
||||
return SETTINGS_BOOL_TEMPLATE_ID;
|
||||
}
|
||||
|
||||
if (element.valueType === 'integer' || element.valueType === 'number' || element.valueType === 'nullable-integer' || element.valueType === 'nullable-number') {
|
||||
if (element.valueType === SettingValueType.Integer || element.valueType === SettingValueType.Number || element.valueType === SettingValueType.NullableInteger || element.valueType === SettingValueType.NullableNumber) {
|
||||
return SETTINGS_NUMBER_TEMPLATE_ID;
|
||||
}
|
||||
|
||||
if (element.valueType === 'string') {
|
||||
if (element.valueType === SettingValueType.String) {
|
||||
return SETTINGS_TEXT_TEMPLATE_ID;
|
||||
}
|
||||
|
||||
if (element.valueType === 'enum') {
|
||||
if (element.valueType === SettingValueType.Enum) {
|
||||
return SETTINGS_ENUM_TEMPLATE_ID;
|
||||
}
|
||||
|
||||
if (element.valueType === 'exclude') {
|
||||
if (element.valueType === SettingValueType.ArrayOfString) {
|
||||
return SETTINGS_ARRAY_TEMPLATE_ID;
|
||||
}
|
||||
|
||||
if (element.valueType === SettingValueType.Exclude) {
|
||||
return SETTINGS_EXCLUDE_TEMPLATE_ID;
|
||||
}
|
||||
|
||||
@@ -1303,7 +1397,8 @@ export class SettingsTree extends ObjectTree<SettingsTreeElement> {
|
||||
container: HTMLElement,
|
||||
viewState: ISettingsEditorViewState,
|
||||
renderers: ITreeRenderer<any, void, any>[],
|
||||
@IThemeService themeService: IThemeService
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
) {
|
||||
const treeClass = 'settings-editor-tree';
|
||||
|
||||
@@ -1320,7 +1415,7 @@ export class SettingsTree extends ObjectTree<SettingsTreeElement> {
|
||||
}
|
||||
},
|
||||
styleController: new DefaultStyleController(DOM.createStyleSheet(container), treeClass),
|
||||
filter: new SettingsTreeFilter(viewState)
|
||||
filter: instantiationService.createInstance(SettingsTreeFilter, viewState)
|
||||
});
|
||||
|
||||
this.disposables = [];
|
||||
@@ -1409,9 +1504,9 @@ class CopySettingIdAction extends Action {
|
||||
super(CopySettingIdAction.ID, CopySettingIdAction.LABEL);
|
||||
}
|
||||
|
||||
run(context: SettingsTreeSettingElement): Promise<void> {
|
||||
async run(context: SettingsTreeSettingElement): Promise<void> {
|
||||
if (context) {
|
||||
this.clipboardService.writeText(context.setting.key);
|
||||
await this.clipboardService.writeText(context.setting.key);
|
||||
}
|
||||
|
||||
return Promise.resolve(undefined);
|
||||
@@ -1428,10 +1523,10 @@ class CopySettingAsJSONAction extends Action {
|
||||
super(CopySettingAsJSONAction.ID, CopySettingAsJSONAction.LABEL);
|
||||
}
|
||||
|
||||
run(context: SettingsTreeSettingElement): Promise<void> {
|
||||
async run(context: SettingsTreeSettingElement): Promise<void> {
|
||||
if (context) {
|
||||
const jsonResult = `"${context.setting.key}": ${JSON.stringify(context.value, undefined, ' ')}`;
|
||||
this.clipboardService.writeText(jsonResult);
|
||||
await this.clipboardService.writeText(jsonResult);
|
||||
}
|
||||
|
||||
return Promise.resolve(undefined);
|
||||
|
||||
@@ -14,6 +14,7 @@ import { SettingsTarget } from 'vs/workbench/contrib/preferences/browser/prefere
|
||||
import { ITOCEntry, knownAcronyms, knownTermMappings } from 'vs/workbench/contrib/preferences/browser/settingsLayout';
|
||||
import { MODIFIED_SETTING_TAG } from 'vs/workbench/contrib/preferences/common/preferences';
|
||||
import { IExtensionSetting, ISearchResult, ISetting, SettingValueType } from 'vs/workbench/services/preferences/common/preferences';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
|
||||
export const ONLINE_SERVICES_SETTING_TAG = 'usesOnlineServices';
|
||||
|
||||
@@ -192,6 +193,8 @@ export class SettingsTreeSettingElement extends SettingsTreeElement {
|
||||
this.valueType = SettingValueType.Number;
|
||||
} else if (this.setting.type === 'boolean') {
|
||||
this.valueType = SettingValueType.Boolean;
|
||||
} else if (this.setting.type === 'array' && this.setting.arrayItemType === 'string') {
|
||||
this.valueType = SettingValueType.ArrayOfString;
|
||||
} else if (isArray(this.setting.type) && this.setting.type.indexOf(SettingValueType.Null) > -1 && this.setting.type.length === 2) {
|
||||
if (this.setting.type.indexOf(SettingValueType.Integer) > -1) {
|
||||
this.valueType = SettingValueType.NullableInteger;
|
||||
@@ -221,7 +224,7 @@ export class SettingsTreeSettingElement extends SettingsTreeElement {
|
||||
}
|
||||
}
|
||||
|
||||
matchesScope(scope: SettingsTarget): boolean {
|
||||
matchesScope(scope: SettingsTarget, isRemote: boolean): boolean {
|
||||
const configTarget = URI.isUri(scope) ? ConfigurationTarget.WORKSPACE_FOLDER : scope;
|
||||
|
||||
if (configTarget === ConfigurationTarget.WORKSPACE_FOLDER) {
|
||||
@@ -236,6 +239,10 @@ export class SettingsTreeSettingElement extends SettingsTreeElement {
|
||||
return this.setting.scope === ConfigurationScope.MACHINE || this.setting.scope === ConfigurationScope.WINDOW || this.setting.scope === ConfigurationScope.RESOURCE;
|
||||
}
|
||||
|
||||
if (configTarget === ConfigurationTarget.USER_LOCAL && isRemote) {
|
||||
return this.setting.scope !== ConfigurationScope.MACHINE;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -479,7 +486,8 @@ export class SearchResultModel extends SettingsTreeModel {
|
||||
|
||||
constructor(
|
||||
viewState: ISettingsEditorViewState,
|
||||
@IConfigurationService configurationService: IConfigurationService
|
||||
@IConfigurationService configurationService: IConfigurationService,
|
||||
@IWorkbenchEnvironmentService private environmentService: IWorkbenchEnvironmentService,
|
||||
) {
|
||||
super(viewState, configurationService);
|
||||
this.update({ id: 'searchResultModel', label: '' });
|
||||
@@ -537,8 +545,9 @@ export class SearchResultModel extends SettingsTreeModel {
|
||||
});
|
||||
|
||||
// Save time, filter children in the search model instead of relying on the tree filter, which still requires heights to be calculated.
|
||||
const isRemote = !!this.environmentService.configuration.remoteAuthority;
|
||||
this.root.children = this.root.children
|
||||
.filter(child => child instanceof SettingsTreeSettingElement && child.matchesAllTags(this._viewState.tagFilters) && child.matchesScope(this._viewState.settingsTarget) && child.matchesAnyExtension(this._viewState.extensionFilters));
|
||||
.filter(child => child instanceof SettingsTreeSettingElement && child.matchesAllTags(this._viewState.tagFilters) && child.matchesScope(this._viewState.settingsTarget, isRemote) && child.matchesAnyExtension(this._viewState.extensionFilters));
|
||||
|
||||
if (this.newExtensionSearchResults && this.newExtensionSearchResults.filterMatches.length) {
|
||||
const newExtElement = new SettingsTreeNewExtensionsElement();
|
||||
|
||||
@@ -12,7 +12,7 @@ import { IAction } from 'vs/base/common/actions';
|
||||
import { Color, RGBA } from 'vs/base/common/color';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import 'vs/css!./media/settingsWidgets';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
@@ -87,35 +87,35 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
collector.addRule(`.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label { color: ${foregroundColor}; }`);
|
||||
}
|
||||
|
||||
// Exclude control
|
||||
// List control
|
||||
const listHoverBackgroundColor = theme.getColor(listHoverBackground);
|
||||
if (listHoverBackgroundColor) {
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row:hover { background-color: ${listHoverBackgroundColor}; }`);
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover { background-color: ${listHoverBackgroundColor}; }`);
|
||||
}
|
||||
|
||||
const listHoverForegroundColor = theme.getColor(listHoverForeground);
|
||||
if (listHoverForegroundColor) {
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row:hover { color: ${listHoverForegroundColor}; }`);
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover { color: ${listHoverForegroundColor}; }`);
|
||||
}
|
||||
|
||||
const listSelectBackgroundColor = theme.getColor(listActiveSelectionBackground);
|
||||
if (listSelectBackgroundColor) {
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row.selected:focus { background-color: ${listSelectBackgroundColor}; }`);
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:focus { background-color: ${listSelectBackgroundColor}; }`);
|
||||
}
|
||||
|
||||
const listInactiveSelectionBackgroundColor = theme.getColor(listInactiveSelectionBackground);
|
||||
if (listInactiveSelectionBackgroundColor) {
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row.selected:not(:focus) { background-color: ${listInactiveSelectionBackgroundColor}; }`);
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:not(:focus) { background-color: ${listInactiveSelectionBackgroundColor}; }`);
|
||||
}
|
||||
|
||||
const listInactiveSelectionForegroundColor = theme.getColor(listInactiveSelectionForeground);
|
||||
if (listInactiveSelectionForegroundColor) {
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row.selected:not(:focus) { color: ${listInactiveSelectionForegroundColor}; }`);
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:not(:focus) { color: ${listInactiveSelectionForegroundColor}; }`);
|
||||
}
|
||||
|
||||
const listSelectForegroundColor = theme.getColor(listActiveSelectionForeground);
|
||||
if (listSelectForegroundColor) {
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-exclude .setting-exclude-row.selected:focus { color: ${listSelectForegroundColor}; }`);
|
||||
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:focus { color: ${listSelectForegroundColor}; }`);
|
||||
}
|
||||
|
||||
const codeTextForegroundColor = theme.getColor(textPreformatForeground);
|
||||
@@ -131,15 +131,15 @@ registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
}
|
||||
});
|
||||
|
||||
export class ExcludeSettingListModel {
|
||||
private _dataItems: IExcludeDataItem[] = [];
|
||||
export class ListSettingListModel {
|
||||
private _dataItems: IListDataItem[] = [];
|
||||
private _editKey: string | null;
|
||||
private _selectedIdx: number | null;
|
||||
|
||||
get items(): IExcludeViewItem[] {
|
||||
get items(): IListViewItem[] {
|
||||
const items = this._dataItems.map((item, i) => {
|
||||
const editing = item.pattern === this._editKey;
|
||||
return <IExcludeViewItem>{
|
||||
const editing = item.value === this._editKey;
|
||||
return <IListViewItem>{
|
||||
...item,
|
||||
editing,
|
||||
selected: i === this._selectedIdx || editing
|
||||
@@ -150,7 +150,7 @@ export class ExcludeSettingListModel {
|
||||
items.push({
|
||||
editing: true,
|
||||
selected: true,
|
||||
pattern: '',
|
||||
value: '',
|
||||
sibling: ''
|
||||
});
|
||||
}
|
||||
@@ -162,8 +162,8 @@ export class ExcludeSettingListModel {
|
||||
this._editKey = key;
|
||||
}
|
||||
|
||||
setValue(excludeData: IExcludeDataItem[]): void {
|
||||
this._dataItems = excludeData;
|
||||
setValue(listData: IListDataItem[]): void {
|
||||
this._dataItems = listData;
|
||||
}
|
||||
|
||||
select(idx: number): void {
|
||||
@@ -191,20 +191,21 @@ export class ExcludeSettingListModel {
|
||||
}
|
||||
}
|
||||
|
||||
export interface IExcludeChangeEvent {
|
||||
originalPattern: string;
|
||||
pattern?: string;
|
||||
export interface IListChangeEvent {
|
||||
originalValue: string;
|
||||
value?: string;
|
||||
sibling?: string;
|
||||
removeIndex?: number;
|
||||
}
|
||||
|
||||
export class ExcludeSettingWidget extends Disposable {
|
||||
export class ListSettingWidget extends Disposable {
|
||||
private listElement: HTMLElement;
|
||||
private listDisposables: IDisposable[] = [];
|
||||
private readonly listDisposables = this._register(new DisposableStore());
|
||||
|
||||
private model = new ExcludeSettingListModel();
|
||||
private model = new ListSettingListModel();
|
||||
|
||||
private readonly _onDidChangeExclude = new Emitter<IExcludeChangeEvent>();
|
||||
readonly onDidChangeExclude: Event<IExcludeChangeEvent> = this._onDidChangeExclude.event;
|
||||
private readonly _onDidChangeList = this._register(new Emitter<IListChangeEvent>());
|
||||
readonly onDidChangeList: Event<IListChangeEvent> = this._onDidChangeList.event;
|
||||
|
||||
get domNode(): HTMLElement {
|
||||
return this.listElement;
|
||||
@@ -217,7 +218,7 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
) {
|
||||
super();
|
||||
|
||||
this.listElement = DOM.append(container, $('.setting-exclude-widget'));
|
||||
this.listElement = DOM.append(container, $('.setting-list-widget'));
|
||||
this.listElement.setAttribute('tabindex', '0');
|
||||
DOM.append(container, this.renderAddButton());
|
||||
this.renderList();
|
||||
@@ -240,8 +241,26 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
}));
|
||||
}
|
||||
|
||||
setValue(excludeData: IExcludeDataItem[]): void {
|
||||
this.model.setValue(excludeData);
|
||||
protected getLocalizedStrings() {
|
||||
return {
|
||||
deleteActionTooltip: localize('removeItem', "Remove Item"),
|
||||
editActionTooltip: localize('editItem', "Edit Item"),
|
||||
complexEditActionTooltip: localize('editItemInSettingsJson', "Edit Item in settings.json"),
|
||||
addButtonLabel: localize('addItem', "Add Item"),
|
||||
inputPlaceholder: localize('itemInputPlaceholder', "String Item..."),
|
||||
siblingInputPlaceholder: localize('listSiblingInputPlaceholder', "Sibling...")
|
||||
};
|
||||
}
|
||||
|
||||
protected getSettingListRowLocalizedStrings(value?: string, sibling?: string) {
|
||||
return {
|
||||
settingListRowValueHintLabel: localize('listValueHintLabel', "List item `{0}`", value),
|
||||
settingListRowSiblingHintLabel: localize('listSiblingHintLabel', "List item `{0}` with sibling `${1}`", value)
|
||||
};
|
||||
}
|
||||
|
||||
setValue(listData: IListDataItem[]): void {
|
||||
this.model.setValue(listData);
|
||||
this.renderList();
|
||||
}
|
||||
|
||||
@@ -269,7 +288,7 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
|
||||
const item = this.model.items[targetIdx];
|
||||
if (item) {
|
||||
this.editSetting(item.pattern);
|
||||
this.editSetting(item.value);
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
@@ -286,7 +305,7 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
return -1;
|
||||
}
|
||||
|
||||
const element = DOM.findParentWithClass((<any>e.target), 'setting-exclude-row');
|
||||
const element = DOM.findParentWithClass((<any>e.target), 'setting-list-row');
|
||||
if (!element) {
|
||||
return -1;
|
||||
}
|
||||
@@ -304,10 +323,10 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
const focused = DOM.isAncestor(document.activeElement, this.listElement);
|
||||
|
||||
DOM.clearNode(this.listElement);
|
||||
this.listDisposables = dispose(this.listDisposables);
|
||||
this.listDisposables.clear();
|
||||
|
||||
const newMode = this.model.items.some(item => !!(item.editing && !item.pattern));
|
||||
DOM.toggleClass(this.container, 'setting-exclude-new-mode', newMode);
|
||||
const newMode = this.model.items.some(item => !!(item.editing && !item.value));
|
||||
DOM.toggleClass(this.container, 'setting-list-new-mode', newMode);
|
||||
|
||||
this.model.items
|
||||
.map((item, i) => this.renderItem(item, i, focused))
|
||||
@@ -317,22 +336,22 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
this.listElement.style.height = listHeight + 'px';
|
||||
}
|
||||
|
||||
private createDeleteAction(key: string): IAction {
|
||||
private createDeleteAction(key: string, idx: number): IAction {
|
||||
return <IAction>{
|
||||
class: 'setting-excludeAction-remove',
|
||||
class: 'setting-listAction-remove',
|
||||
enabled: true,
|
||||
id: 'workbench.action.removeExcludeItem',
|
||||
tooltip: localize('removeExcludeItem', "Remove Exclude Item"),
|
||||
run: () => this._onDidChangeExclude.fire({ originalPattern: key, pattern: undefined })
|
||||
id: 'workbench.action.removeListItem',
|
||||
tooltip: this.getLocalizedStrings().deleteActionTooltip,
|
||||
run: () => this._onDidChangeList.fire({ originalValue: key, value: undefined, removeIndex: idx })
|
||||
};
|
||||
}
|
||||
|
||||
private createEditAction(key: string): IAction {
|
||||
return <IAction>{
|
||||
class: 'setting-excludeAction-edit',
|
||||
class: 'setting-listAction-edit',
|
||||
enabled: true,
|
||||
id: 'workbench.action.editExcludeItem',
|
||||
tooltip: localize('editExcludeItem', "Edit Exclude Item"),
|
||||
id: 'workbench.action.editListItem',
|
||||
tooltip: this.getLocalizedStrings().editActionTooltip,
|
||||
run: () => {
|
||||
this.editSetting(key);
|
||||
}
|
||||
@@ -344,34 +363,34 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
this.renderList();
|
||||
}
|
||||
|
||||
private renderItem(item: IExcludeViewItem, idx: number, listFocused: boolean): HTMLElement {
|
||||
private renderItem(item: IListViewItem, idx: number, listFocused: boolean): HTMLElement {
|
||||
return item.editing ?
|
||||
this.renderEditItem(item) :
|
||||
this.renderDataItem(item, idx, listFocused);
|
||||
}
|
||||
|
||||
private renderDataItem(item: IExcludeViewItem, idx: number, listFocused: boolean): HTMLElement {
|
||||
const rowElement = $('.setting-exclude-row');
|
||||
private renderDataItem(item: IListViewItem, idx: number, listFocused: boolean): HTMLElement {
|
||||
const rowElement = $('.setting-list-row');
|
||||
rowElement.setAttribute('data-index', idx + '');
|
||||
rowElement.setAttribute('tabindex', item.selected ? '0' : '-1');
|
||||
DOM.toggleClass(rowElement, 'selected', item.selected);
|
||||
|
||||
const actionBar = new ActionBar(rowElement);
|
||||
this.listDisposables.push(actionBar);
|
||||
this.listDisposables.add(actionBar);
|
||||
|
||||
const patternElement = DOM.append(rowElement, $('.setting-exclude-pattern'));
|
||||
const siblingElement = DOM.append(rowElement, $('.setting-exclude-sibling'));
|
||||
patternElement.textContent = item.pattern;
|
||||
const valueElement = DOM.append(rowElement, $('.setting-list-value'));
|
||||
const siblingElement = DOM.append(rowElement, $('.setting-list-sibling'));
|
||||
valueElement.textContent = item.value;
|
||||
siblingElement.textContent = item.sibling ? ('when: ' + item.sibling) : null;
|
||||
|
||||
actionBar.push([
|
||||
this.createEditAction(item.pattern),
|
||||
this.createDeleteAction(item.pattern)
|
||||
this.createEditAction(item.value),
|
||||
this.createDeleteAction(item.value, idx)
|
||||
], { icon: true, label: false });
|
||||
|
||||
rowElement.title = item.sibling ?
|
||||
localize('excludeSiblingHintLabel', "Exclude files matching `{0}`, only when a file matching `{1}` is present", item.pattern, item.sibling) :
|
||||
localize('excludePatternHintLabel', "Exclude files matching `{0}`", item.pattern);
|
||||
rowElement.title = item.sibling
|
||||
? this.getSettingListRowLocalizedStrings(item.value, item.sibling).settingListRowSiblingHintLabel
|
||||
: this.getSettingListRowLocalizedStrings(item.value, item.sibling).settingListRowValueHintLabel;
|
||||
|
||||
if (item.selected) {
|
||||
if (listFocused) {
|
||||
@@ -385,11 +404,11 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
}
|
||||
|
||||
private renderAddButton(): HTMLElement {
|
||||
const rowElement = $('.setting-exclude-new-row');
|
||||
const rowElement = $('.setting-list-new-row');
|
||||
|
||||
const startAddButton = this._register(new Button(rowElement));
|
||||
startAddButton.label = localize('addPattern', "Add Pattern");
|
||||
startAddButton.element.classList.add('setting-exclude-addButton');
|
||||
startAddButton.label = this.getLocalizedStrings().addButtonLabel;
|
||||
startAddButton.element.classList.add('setting-list-addButton');
|
||||
this._register(attachButtonStyler(startAddButton, this.themeService));
|
||||
|
||||
this._register(startAddButton.onDidClick(() => {
|
||||
@@ -400,16 +419,16 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
return rowElement;
|
||||
}
|
||||
|
||||
private renderEditItem(item: IExcludeViewItem): HTMLElement {
|
||||
const rowElement = $('.setting-exclude-edit-row');
|
||||
private renderEditItem(item: IListViewItem): HTMLElement {
|
||||
const rowElement = $('.setting-list-edit-row');
|
||||
|
||||
const onSubmit = (edited: boolean) => {
|
||||
this.model.setEditKey(null);
|
||||
const pattern = patternInput.value.trim();
|
||||
if (edited && pattern) {
|
||||
this._onDidChangeExclude.fire({
|
||||
originalPattern: item.pattern,
|
||||
pattern,
|
||||
const value = valueInput.value.trim();
|
||||
if (edited && value) {
|
||||
this._onDidChangeList.fire({
|
||||
originalValue: item.value,
|
||||
value: value,
|
||||
sibling: siblingInput && siblingInput.value.trim()
|
||||
});
|
||||
}
|
||||
@@ -425,68 +444,84 @@ export class ExcludeSettingWidget extends Disposable {
|
||||
}
|
||||
};
|
||||
|
||||
const patternInput = new InputBox(rowElement, this.contextViewService, {
|
||||
placeholder: localize('excludePatternInputPlaceholder', "Exclude Pattern...")
|
||||
const valueInput = new InputBox(rowElement, this.contextViewService, {
|
||||
placeholder: this.getLocalizedStrings().inputPlaceholder
|
||||
});
|
||||
patternInput.element.classList.add('setting-exclude-patternInput');
|
||||
this.listDisposables.push(attachInputBoxStyler(patternInput, this.themeService, {
|
||||
|
||||
valueInput.element.classList.add('setting-list-valueInput');
|
||||
this.listDisposables.add(attachInputBoxStyler(valueInput, this.themeService, {
|
||||
inputBackground: settingsTextInputBackground,
|
||||
inputForeground: settingsTextInputForeground,
|
||||
inputBorder: settingsTextInputBorder
|
||||
}));
|
||||
this.listDisposables.push(patternInput);
|
||||
patternInput.value = item.pattern;
|
||||
this.listDisposables.push(DOM.addStandardDisposableListener(patternInput.inputElement, DOM.EventType.KEY_DOWN, onKeydown));
|
||||
this.listDisposables.add(valueInput);
|
||||
valueInput.value = item.value;
|
||||
this.listDisposables.add(DOM.addStandardDisposableListener(valueInput.inputElement, DOM.EventType.KEY_DOWN, onKeydown));
|
||||
|
||||
let siblingInput: InputBox;
|
||||
if (item.sibling) {
|
||||
siblingInput = new InputBox(rowElement, this.contextViewService, {
|
||||
placeholder: localize('excludeSiblingInputPlaceholder', "When Pattern Is Present...")
|
||||
placeholder: this.getLocalizedStrings().siblingInputPlaceholder
|
||||
});
|
||||
siblingInput.element.classList.add('setting-exclude-siblingInput');
|
||||
this.listDisposables.push(siblingInput);
|
||||
this.listDisposables.push(attachInputBoxStyler(siblingInput, this.themeService, {
|
||||
siblingInput.element.classList.add('setting-list-siblingInput');
|
||||
this.listDisposables.add(siblingInput);
|
||||
this.listDisposables.add(attachInputBoxStyler(siblingInput, this.themeService, {
|
||||
inputBackground: settingsTextInputBackground,
|
||||
inputForeground: settingsTextInputForeground,
|
||||
inputBorder: settingsTextInputBorder
|
||||
}));
|
||||
siblingInput.value = item.sibling;
|
||||
this.listDisposables.push(DOM.addStandardDisposableListener(siblingInput.inputElement, DOM.EventType.KEY_DOWN, onKeydown));
|
||||
this.listDisposables.add(DOM.addStandardDisposableListener(siblingInput.inputElement, DOM.EventType.KEY_DOWN, onKeydown));
|
||||
}
|
||||
|
||||
const okButton = this._register(new Button(rowElement));
|
||||
okButton.label = localize('okButton', "OK");
|
||||
okButton.element.classList.add('setting-exclude-okButton');
|
||||
this.listDisposables.push(attachButtonStyler(okButton, this.themeService));
|
||||
this.listDisposables.push(okButton.onDidClick(() => onSubmit(true)));
|
||||
okButton.element.classList.add('setting-list-okButton');
|
||||
this.listDisposables.add(attachButtonStyler(okButton, this.themeService));
|
||||
this.listDisposables.add(okButton.onDidClick(() => onSubmit(true)));
|
||||
|
||||
const cancelButton = this._register(new Button(rowElement));
|
||||
cancelButton.label = localize('cancelButton', "Cancel");
|
||||
cancelButton.element.classList.add('setting-exclude-cancelButton');
|
||||
this.listDisposables.push(attachButtonStyler(cancelButton, this.themeService));
|
||||
this.listDisposables.push(cancelButton.onDidClick(() => onSubmit(false)));
|
||||
cancelButton.element.classList.add('setting-list-okButton');
|
||||
this.listDisposables.add(attachButtonStyler(cancelButton, this.themeService));
|
||||
this.listDisposables.add(cancelButton.onDidClick(() => onSubmit(false)));
|
||||
|
||||
this.listDisposables.push(
|
||||
this.listDisposables.add(
|
||||
disposableTimeout(() => {
|
||||
patternInput.focus();
|
||||
patternInput.select();
|
||||
valueInput.focus();
|
||||
valueInput.select();
|
||||
}));
|
||||
|
||||
return rowElement;
|
||||
}
|
||||
}
|
||||
|
||||
dispose() {
|
||||
super.dispose();
|
||||
this.listDisposables = dispose(this.listDisposables);
|
||||
export class ExcludeSettingWidget extends ListSettingWidget {
|
||||
protected getLocalizedStrings() {
|
||||
return {
|
||||
deleteActionTooltip: localize('removeExcludeItem', "Remove Exclude Item"),
|
||||
editActionTooltip: localize('editExcludeItem', "Edit Exclude Item"),
|
||||
complexEditActionTooltip: localize('editExcludeItemInSettingsJson', "Edit Exclude Item in settings.json"),
|
||||
addButtonLabel: localize('addPattern', "Add Pattern"),
|
||||
inputPlaceholder: localize('excludePatternInputPlaceholder', "Exclude Pattern..."),
|
||||
siblingInputPlaceholder: localize('excludeSiblingInputPlaceholder', "When Pattern Is Present...")
|
||||
};
|
||||
}
|
||||
|
||||
protected getSettingListRowLocalizedStrings(pattern?: string, sibling?: string) {
|
||||
return {
|
||||
settingListRowValueHintLabel: localize('excludePatternHintLabel', "Exclude files matching `{0}`", pattern),
|
||||
settingListRowSiblingHintLabel: localize('excludeSiblingHintLabel', "Exclude files matching `{0}`, only when a file matching `{1}` is present", pattern, sibling)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export interface IExcludeDataItem {
|
||||
pattern: string;
|
||||
export interface IListDataItem {
|
||||
value: string;
|
||||
sibling?: string;
|
||||
}
|
||||
|
||||
interface IExcludeViewItem extends IExcludeDataItem {
|
||||
interface IListViewItem extends IListDataItem {
|
||||
editing?: boolean;
|
||||
selected?: boolean;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import { SettingsTreeFilter } from 'vs/workbench/contrib/preferences/browser/set
|
||||
import { ISettingsEditorViewState, SearchResultModel, SettingsTreeElement, SettingsTreeGroupElement, SettingsTreeSettingElement } from 'vs/workbench/contrib/preferences/browser/settingsTreeModels';
|
||||
import { settingsHeaderForeground } from 'vs/workbench/contrib/preferences/browser/settingsWidgets';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
|
||||
|
||||
const $ = DOM.$;
|
||||
|
||||
@@ -25,7 +26,10 @@ export class TOCTreeModel {
|
||||
private _currentSearchModel: SearchResultModel | null;
|
||||
private _settingsTreeRoot: SettingsTreeGroupElement;
|
||||
|
||||
constructor(private _viewState: ISettingsEditorViewState) {
|
||||
constructor(
|
||||
private _viewState: ISettingsEditorViewState,
|
||||
@IWorkbenchEnvironmentService private environmentService: IWorkbenchEnvironmentService
|
||||
) {
|
||||
}
|
||||
|
||||
get settingsTreeRoot(): SettingsTreeGroupElement {
|
||||
@@ -81,7 +85,8 @@ export class TOCTreeModel {
|
||||
}
|
||||
|
||||
// Check everything that the SettingsFilter checks except whether it's filtered by a category
|
||||
return child.matchesScope(this._viewState.settingsTarget) && child.matchesAllTags(this._viewState.tagFilters) && child.matchesAnyExtension(this._viewState.extensionFilters);
|
||||
const isRemote = !!this.environmentService.configuration.remoteAuthority;
|
||||
return child.matchesScope(this._viewState.settingsTarget, isRemote) && child.matchesAllTags(this._viewState.tagFilters) && child.matchesAnyExtension(this._viewState.extensionFilters);
|
||||
}).length;
|
||||
}
|
||||
}
|
||||
@@ -136,16 +141,12 @@ export function createTOCIterator(model: TOCTreeModel | SettingsTreeGroupElement
|
||||
const groupChildren = <SettingsTreeGroupElement[]>model.children.filter(c => c instanceof SettingsTreeGroupElement);
|
||||
const groupsIt = Iterator.fromArray(groupChildren);
|
||||
|
||||
|
||||
return Iterator.map(groupsIt, g => {
|
||||
let nodeExists = true;
|
||||
try { tree.getNode(g); } catch (e) { nodeExists = false; }
|
||||
|
||||
const hasGroupChildren = g.children.some(c => c instanceof SettingsTreeGroupElement);
|
||||
|
||||
return {
|
||||
element: g,
|
||||
collapsed: nodeExists ? undefined : true,
|
||||
collapsed: undefined,
|
||||
collapsible: hasGroupChildren,
|
||||
children: g instanceof SettingsTreeGroupElement ?
|
||||
createTOCIterator(g, tree) :
|
||||
@@ -198,7 +199,8 @@ export class TOCTree extends ObjectTree<SettingsTreeGroupElement> {
|
||||
}
|
||||
},
|
||||
styleController: new DefaultStyleController(DOM.createStyleSheet(container), treeClass),
|
||||
accessibilityProvider: instantiationService.createInstance(SettingsAccessibilityProvider)
|
||||
accessibilityProvider: instantiationService.createInstance(SettingsAccessibilityProvider),
|
||||
collapseByDefault: true
|
||||
};
|
||||
|
||||
super(container,
|
||||
|
||||
@@ -62,8 +62,8 @@ export interface IKeybindingsEditor extends IEditor {
|
||||
updateKeybinding(keybindingEntry: IKeybindingItemEntry, key: string, when: string | undefined): Promise<any>;
|
||||
removeKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<any>;
|
||||
resetKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<any>;
|
||||
copyKeybinding(keybindingEntry: IKeybindingItemEntry): void;
|
||||
copyKeybindingCommand(keybindingEntry: IKeybindingItemEntry): void;
|
||||
copyKeybinding(keybindingEntry: IKeybindingItemEntry): Promise<void>;
|
||||
copyKeybindingCommand(keybindingEntry: IKeybindingItemEntry): Promise<void>;
|
||||
showSimilarKeybindings(keybindingEntry: IKeybindingItemEntry): void;
|
||||
}
|
||||
|
||||
@@ -111,3 +111,5 @@ export const MODIFIED_SETTING_TAG = 'modified';
|
||||
export const EXTENSION_SETTING_TAG = 'ext:';
|
||||
|
||||
export const SETTINGS_COMMAND_OPEN_SETTINGS = 'workbench.action.openSettings';
|
||||
|
||||
export const KEYBOARD_LAYOUT_OPEN_PICKER = 'workbench.action.openKeyboardLayoutPicker';
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { isLinux } from 'vs/base/common/platform';
|
||||
import { dispose, IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { isEqual } from 'vs/base/common/resources';
|
||||
import { endsWith } from 'vs/base/common/strings';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
@@ -79,7 +78,7 @@ export class PreferencesContribution implements IWorkbenchContribution {
|
||||
}
|
||||
|
||||
// Global User Settings File
|
||||
if (isEqual(resource, URI.file(this.environmentService.appSettingsPath), !isLinux)) {
|
||||
if (isEqual(resource, this.environmentService.settingsResource)) {
|
||||
return { override: this.preferencesService.openGlobalSettings(true, options, group) };
|
||||
}
|
||||
|
||||
@@ -129,14 +128,14 @@ export class PreferencesContribution implements IWorkbenchContribution {
|
||||
const modelContent = JSON.stringify(schema);
|
||||
const languageSelection = this.modeService.create('jsonc');
|
||||
const model = this.modelService.createModel(modelContent, languageSelection, uri);
|
||||
const disposables: IDisposable[] = [];
|
||||
disposables.push(schemaRegistry.onDidChangeSchema(schemaUri => {
|
||||
const disposables = new DisposableStore();
|
||||
disposables.add(schemaRegistry.onDidChangeSchema(schemaUri => {
|
||||
if (schemaUri === uri.toString()) {
|
||||
schema = schemaRegistry.getSchemaContributions().schemas[uri.toString()];
|
||||
model.setValue(JSON.stringify(schema));
|
||||
}
|
||||
}));
|
||||
disposables.push(model.onWillDispose(() => dispose(disposables)));
|
||||
disposables.add(model.onWillDispose(() => disposables.dispose()));
|
||||
|
||||
return model;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-2 -2 16 16" enable-background="new -2 -2 16 16"><polygon fill="#C5C5C5" points="9,0 4.5,9 3,6 0,6 3,12 6,12 12,0"/></svg>
|
||||
|
Before Width: | Height: | Size: 194 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="-2 -2 16 16" enable-background="new -2 -2 16 16"><polygon fill="#424242" points="9,0 4.5,9 3,6 0,6 3,12 6,12 12,0"/></svg>
|
||||
|
Before Width: | Height: | Size: 194 B |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#252526;}.icon-canvas-transparent{opacity:0;}.icon-vs-bg{fill:#c5c5c5;}</style></defs><title>configure</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M16,10.015l-2.238.372,1.318,1.847L12.233,15.08l-1.847-1.318L10.013,16H5.986l-.373-2.237L3.767,15.08.919,12.233l1.319-1.847L0,10.013V5.986l2.238-.373L.919,3.767,3.768.919,5.613,2.238,5.986,0h4.028l.372,2.238L12.233.919,15.08,3.768,13.762,5.613,16,5.986Z"/></g><g id="iconBg"><path class="icon-vs-bg" d="M12.876,9.521,15,9.167V6.834L12.879,6.48a5.12,5.12,0,0,0-.354-.854l1.25-1.75-1.65-1.65L10.373,3.477c-.137-.072-.262-.159-.408-.219s-.3-.087-.444-.133L9.167,1H6.834L6.48,3.121a5.118,5.118,0,0,0-.854.354l-1.75-1.25-1.65,1.65L3.477,5.627c-.072.137-.159.262-.219.408s-.087.3-.133.444L1,6.833V9.166l2.121.354a5.122,5.122,0,0,0,.354.854l-1.25,1.75,1.65,1.65,1.752-1.252c.137.072.262.159.408.22s.3.087.444.133L6.833,15H9.166l.354-2.121a5.121,5.121,0,0,0,.854-.354l1.75,1.25,1.65-1.65-1.252-1.752c.072-.137.159-.263.219-.409S12.83,9.669,12.876,9.521ZM8,10.212A2.212,2.212,0,1,1,10.212,8,2.212,2.212,0,0,1,8,10.212Z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><defs><style>.icon-canvas-transparent,.icon-vs-out{fill:#f6f6f6;}.icon-canvas-transparent{opacity:0;}.icon-vs-bg{fill:#424242;}</style></defs><title>configure</title><g id="canvas"><path class="icon-canvas-transparent" d="M16,0V16H0V0Z"/></g><g id="outline" style="display: none;"><path class="icon-vs-out" d="M16,10.015l-2.238.372,1.318,1.847L12.233,15.08l-1.847-1.318L10.013,16H5.986l-.373-2.237L3.767,15.08.919,12.233l1.319-1.847L0,10.013V5.986l2.238-.373L.919,3.767,3.768.919,5.613,2.238,5.986,0h4.028l.372,2.238L12.233.919,15.08,3.768,13.762,5.613,16,5.986Z"/></g><g id="iconBg"><path class="icon-vs-bg" d="M12.876,9.521,15,9.167V6.834L12.879,6.48a5.12,5.12,0,0,0-.354-.854l1.25-1.75-1.65-1.65L10.373,3.477c-.137-.072-.262-.159-.408-.219s-.3-.087-.444-.133L9.167,1H6.834L6.48,3.121a5.118,5.118,0,0,0-.854.354l-1.75-1.25-1.65,1.65L3.477,5.627c-.072.137-.159.262-.219.408s-.087.3-.133.444L1,6.833V9.166l2.121.354a5.122,5.122,0,0,0,.354.854l-1.25,1.75,1.65,1.65,1.752-1.252c.137.072.262.159.408.22s.3.087.444.133L6.833,15H9.166l.354-2.121a5.121,5.121,0,0,0,.854-.354l1.75,1.25,1.65-1.65-1.252-1.752c.072-.137.159-.263.219-.409S12.83,9.669,12.876,9.521ZM8,10.212A2.212,2.212,0,1,1,10.212,8,2.212,2.212,0,0,1,8,10.212Z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.22785 7.35986C2.69078 7.35986 3.01627 7.25136 3.20434 7.03436C3.33454 6.87523 3.39964 6.64376 3.39964 6.33996C3.39964 6.20976 3.38517 6.01808 3.35624 5.76492C3.32731 5.51176 3.31284 5.31646 3.31284 5.17902C3.31284 5.04159 3.30561 4.83544 3.29114 4.56058C3.26221 4.31465 3.24774 4.14105 3.24774 4.03978C3.24774 3.34539 3.45027 2.83183 3.85533 2.49909C4.2604 2.16636 4.83183 2 5.56962 2H6.11212V3.28029H5.83002C5.51175 3.28029 5.28391 3.37071 5.14647 3.55154C5.00904 3.73237 4.94033 4.00362 4.94033 4.36528C4.94033 4.45208 4.95479 4.58228 4.98372 4.75588C5.01266 4.97288 5.02712 5.13924 5.02712 5.25497C5.02712 5.34177 5.03436 5.4792 5.04882 5.66727C5.07776 5.92767 5.09222 6.1302 5.09222 6.27486C5.09222 6.82459 4.97649 7.23689 4.74503 7.51175C4.5425 7.75768 4.22423 7.93128 3.79024 8.03255C4.22423 8.14828 4.5425 8.32188 4.74503 8.55334C4.97649 8.84268 5.09222 9.25497 5.09222 9.79024C5.09222 9.94937 5.07776 10.1591 5.04882 10.4195C5.01989 10.6076 5.00904 10.745 5.01627 10.8318C5.02351 10.9186 5.01266 11.0705 4.98372 11.2875C4.95479 11.4467 4.94033 11.5624 4.94033 11.6347C4.94033 11.9964 5.00904 12.2676 5.14647 12.4485C5.28391 12.6293 5.51175 12.7197 5.83002 12.7197H6.11212V14H5.56962C4.0651 14 3.31284 13.3201 3.31284 11.9602C3.31284 11.4684 3.33816 11.0886 3.38879 10.821C3.43942 10.5533 3.46474 10.1664 3.46474 9.66004C3.46474 8.98011 3.08137 8.64014 2.31465 8.64014L2.22785 7.35986ZM13.7722 8.50995C13.0054 8.50995 12.6221 8.84991 12.6221 9.52984C12.6221 9.66004 12.6329 9.85172 12.6546 10.1049C12.6763 10.358 12.6872 10.5497 12.6872 10.6799C12.7306 10.9548 12.7523 11.3382 12.7523 11.83C12.7523 13.1899 11.9855 13.8698 10.4521 13.8698H9.90958V12.7197H10.17C10.4882 12.7197 10.7161 12.6293 10.8535 12.4485C10.991 12.2676 11.0597 11.9964 11.0597 11.6347C11.0597 11.2731 11.038 10.9982 10.9946 10.8101C10.9946 10.6944 10.9801 10.5244 10.9512 10.3002C10.9222 10.0759 10.9078 9.90597 10.9078 9.79024C10.9078 9.25497 11.0235 8.84268 11.255 8.55334C11.4575 8.32188 11.7758 8.14828 12.2098 8.03255C11.7758 7.93128 11.4575 7.75768 11.255 7.51175C11.0235 7.23689 10.9078 6.82459 10.9078 6.27486C10.9078 6.1302 10.9222 5.92767 10.9512 5.66727C10.9801 5.4792 10.9946 5.34177 10.9946 5.25497C11.038 5.02351 11.0597 4.73418 11.0597 4.38698C11.0597 4.03978 10.9873 3.77939 10.8427 3.60579C10.698 3.43219 10.4738 3.32369 10.17 3.28029H9.90958V2H10.4521C11.1754 2 11.7396 2.16636 12.1447 2.49909C12.5497 2.83183 12.7523 3.34539 12.7523 4.03978C12.7523 4.16998 12.7414 4.36166 12.7197 4.61483C12.698 4.86799 12.6872 5.05967 12.6872 5.18987C12.6438 5.46474 12.6148 5.8481 12.6004 6.33996C12.6148 6.64376 12.6799 6.87523 12.7957 7.03436C12.9837 7.25136 13.3092 7.35986 13.7722 7.35986V8.50995Z" fill="#C5C5C5"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -1,3 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.22785 7.35986C2.69078 7.35986 3.01627 7.25136 3.20434 7.03436C3.33454 6.87523 3.39964 6.64376 3.39964 6.33996C3.39964 6.20976 3.38517 6.01808 3.35624 5.76492C3.32731 5.51176 3.31284 5.31646 3.31284 5.17902C3.31284 5.04159 3.30561 4.83544 3.29114 4.56058C3.26221 4.31465 3.24774 4.14105 3.24774 4.03978C3.24774 3.34539 3.45027 2.83183 3.85533 2.49909C4.2604 2.16636 4.83183 2 5.56962 2H6.11212V3.28029H5.83002C5.51175 3.28029 5.28391 3.37071 5.14647 3.55154C5.00904 3.73237 4.94033 4.00362 4.94033 4.36528C4.94033 4.45208 4.95479 4.58228 4.98372 4.75588C5.01266 4.97288 5.02712 5.13924 5.02712 5.25497C5.02712 5.34177 5.03436 5.4792 5.04882 5.66727C5.07776 5.92767 5.09222 6.1302 5.09222 6.27486C5.09222 6.82459 4.97649 7.23689 4.74503 7.51175C4.5425 7.75768 4.22423 7.93128 3.79024 8.03255C4.22423 8.14828 4.5425 8.32188 4.74503 8.55334C4.97649 8.84268 5.09222 9.25497 5.09222 9.79024C5.09222 9.94937 5.07776 10.1591 5.04882 10.4195C5.01989 10.6076 5.00904 10.745 5.01627 10.8318C5.02351 10.9186 5.01266 11.0705 4.98372 11.2875C4.95479 11.4467 4.94033 11.5624 4.94033 11.6347C4.94033 11.9964 5.00904 12.2676 5.14647 12.4485C5.28391 12.6293 5.51175 12.7197 5.83002 12.7197H6.11212V14H5.56962C4.0651 14 3.31284 13.3201 3.31284 11.9602C3.31284 11.4684 3.33816 11.0886 3.38879 10.821C3.43942 10.5533 3.46474 10.1664 3.46474 9.66004C3.46474 8.98011 3.08137 8.64014 2.31465 8.64014L2.22785 7.35986ZM13.7722 8.50995C13.0054 8.50995 12.6221 8.84991 12.6221 9.52984C12.6221 9.66004 12.6329 9.85172 12.6546 10.1049C12.6763 10.358 12.6872 10.5497 12.6872 10.6799C12.7306 10.9548 12.7523 11.3382 12.7523 11.83C12.7523 13.1899 11.9855 13.8698 10.4521 13.8698H9.90958V12.7197H10.17C10.4882 12.7197 10.7161 12.6293 10.8535 12.4485C10.991 12.2676 11.0597 11.9964 11.0597 11.6347C11.0597 11.2731 11.038 10.9982 10.9946 10.8101C10.9946 10.6944 10.9801 10.5244 10.9512 10.3002C10.9222 10.0759 10.9078 9.90597 10.9078 9.79024C10.9078 9.25497 11.0235 8.84268 11.255 8.55334C11.4575 8.32188 11.7758 8.14828 12.2098 8.03255C11.7758 7.93128 11.4575 7.75768 11.255 7.51175C11.0235 7.23689 10.9078 6.82459 10.9078 6.27486C10.9078 6.1302 10.9222 5.92767 10.9512 5.66727C10.9801 5.4792 10.9946 5.34177 10.9946 5.25497C11.038 5.02351 11.0597 4.73418 11.0597 4.38698C11.0597 4.03978 10.9873 3.77939 10.8427 3.60579C10.698 3.43219 10.4738 3.32369 10.17 3.28029H9.90958V2H10.4521C11.1754 2 11.7396 2.16636 12.1447 2.49909C12.5497 2.83183 12.7523 3.34539 12.7523 4.03978C12.7523 4.16998 12.7414 4.36166 12.7197 4.61483C12.698 4.86799 12.6872 5.05967 12.6872 5.18987C12.6438 5.46474 12.6148 5.8481 12.6004 6.33996C12.6148 6.64376 12.6799 6.87523 12.7957 7.03436C12.9837 7.25136 13.3092 7.35986 13.7722 7.35986V8.50995Z" fill="#424242"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.8 KiB |
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 2H9V3H10V3.586V4V4.414V6H13V13H5V8H4V14H14V5L11 2Z" fill="#C5C5C5"/>
|
||||
<path d="M7.08971 4.65186L8 4.50014V3.50029L7.091 3.34857C7.05157 3.22225 7.00079 3.09975 6.93929 2.98257L7.475 2.23257L6.76786 1.52543L6.017 2.06157C5.95829 2.03071 5.90471 1.99343 5.84214 1.96771C5.77957 1.942 5.71357 1.93043 5.65186 1.91071L5.50014 1H4.50029L4.34857 1.909C4.22224 1.94843 4.09974 1.99921 3.98257 2.06071L3.23257 1.525L2.52543 2.23214L3.06157 2.983C3.03071 3.04171 2.99343 3.09529 2.96771 3.15786C2.942 3.22043 2.93043 3.28643 2.91071 3.34814L2 3.49986V4.49971L2.909 4.65143C2.94844 4.77775 2.99921 4.90025 3.06071 5.01743L2.525 5.76743L3.23214 6.47457L3.983 5.938C4.04171 5.96886 4.09529 6.00614 4.15786 6.03229C4.22043 6.05843 4.28643 6.06957 4.34814 6.08929L4.49986 7H5.49971L5.65143 6.091C5.77775 6.05157 5.90025 6.00079 6.01743 5.93929L6.76743 6.475L7.47457 5.76786L6.938 5.017C6.96886 4.95829 7.00614 4.90429 7.03186 4.84171C7.05757 4.77914 7.07 4.71529 7.08971 4.65186ZM5 4.948C4.8125 4.948 4.62922 4.8924 4.47332 4.78823C4.31742 4.68407 4.19591 4.53601 4.12416 4.36278C4.05241 4.18956 4.03364 3.99895 4.07022 3.81505C4.10679 3.63116 4.19708 3.46224 4.32966 3.32966C4.46224 3.19708 4.63116 3.10679 4.81505 3.07022C4.99895 3.03364 5.18956 3.05241 5.36278 3.12416C5.53601 3.19591 5.68407 3.31742 5.78823 3.47332C5.8924 3.62922 5.948 3.8125 5.948 4C5.948 4.25143 5.84812 4.49255 5.67034 4.67034C5.49255 4.84812 5.25143 4.948 5 4.948Z" fill="#75BEFF"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@@ -1,4 +0,0 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 2H9V3H10V3.586V4V4.414V6H13V13H5V8H4V14H14V5L11 2Z" fill="#656565"/>
|
||||
<path d="M7.08971 4.65186L8 4.50014V3.50029L7.091 3.34857C7.05157 3.22225 7.00079 3.09975 6.93929 2.98257L7.475 2.23257L6.76786 1.52543L6.017 2.06157C5.95829 2.03071 5.90471 1.99343 5.84214 1.96771C5.77957 1.942 5.71357 1.93043 5.65186 1.91071L5.50014 1H4.50029L4.34857 1.909C4.22224 1.94843 4.09974 1.99921 3.98257 2.06071L3.23257 1.525L2.52543 2.23214L3.06157 2.983C3.03071 3.04171 2.99343 3.09529 2.96771 3.15786C2.942 3.22043 2.93043 3.28643 2.91071 3.34814L2 3.49986V4.49971L2.909 4.65143C2.94844 4.77775 2.99921 4.90025 3.06071 5.01743L2.525 5.76743L3.23214 6.47457L3.983 5.938C4.04171 5.96886 4.09529 6.00614 4.15786 6.03229C4.22043 6.05843 4.28643 6.06957 4.34814 6.08929L4.49986 7H5.49971L5.65143 6.091C5.77775 6.05157 5.90025 6.00079 6.01743 5.93929L6.76743 6.475L7.47457 5.76786L6.938 5.017C6.96886 4.95829 7.00614 4.90429 7.03186 4.84171C7.05757 4.77914 7.07 4.71529 7.08971 4.65186ZM5 4.948C4.8125 4.948 4.62922 4.8924 4.47332 4.78823C4.31742 4.68407 4.19591 4.53601 4.12416 4.36278C4.05241 4.18956 4.03364 3.99895 4.07022 3.81505C4.10679 3.63116 4.19708 3.46224 4.32966 3.32966C4.46224 3.19708 4.63116 3.10679 4.81505 3.07022C4.99895 3.03364 5.18956 3.05241 5.36278 3.12416C5.53601 3.19591 5.68407 3.31742 5.78823 3.47332C5.8924 3.62922 5.948 3.8125 5.948 4C5.948 4.25143 5.84812 4.49255 5.67034 4.67034C5.49255 4.84812 5.25143 4.948 5 4.948Z" fill="#00539C"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |