mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-31 09:10:30 -04:00
This reverts commit 5d44b6a6a7.
This commit is contained in:
@@ -9,7 +9,7 @@ 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 { CheckboxActionViewItem } from 'vs/base/browser/ui/checkbox/checkbox';
|
||||
import { CheckboxActionItem } 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';
|
||||
import { IAction, Action } from 'vs/base/common/actions';
|
||||
@@ -372,12 +372,12 @@ export class KeybindingsEditor extends BaseEditor implements IKeybindingsEditor
|
||||
|
||||
this.actionBar = this._register(new ActionBar(this.actionsContainer, {
|
||||
animated: false,
|
||||
actionViewItemProvider: (action: Action) => {
|
||||
actionItemProvider: (action: Action) => {
|
||||
if (action.id === this.sortByPrecedenceAction.id) {
|
||||
return new CheckboxActionViewItem(null, action);
|
||||
return new CheckboxActionItem(null, action);
|
||||
}
|
||||
if (action.id === this.recordKeysAction.id) {
|
||||
return new CheckboxActionViewItem(null, action);
|
||||
return new CheckboxActionItem(null, action);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -154,14 +154,14 @@ export class PreferencesEditor extends BaseEditor {
|
||||
this.preferencesRenderers.editFocusedPreference();
|
||||
}
|
||||
|
||||
setInput(newInput: EditorInput, options: SettingsEditorOptions, token: CancellationToken): Promise<void> {
|
||||
setInput(newInput: PreferencesEditorInput, options: SettingsEditorOptions, token: CancellationToken): Promise<void> {
|
||||
this.defaultSettingsEditorContextKey.set(true);
|
||||
this.defaultSettingsJSONEditorContextKey.set(true);
|
||||
if (options && options.query) {
|
||||
this.focusSearch(options.query);
|
||||
}
|
||||
|
||||
return super.setInput(newInput, options, token).then(() => this.updateInput(newInput as PreferencesEditorInput, options, token));
|
||||
return super.setInput(newInput, options, token).then(() => this.updateInput(newInput, options, token));
|
||||
}
|
||||
|
||||
layout(dimension: DOM.Dimension): void {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { IKeyboardEvent, StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { ActionBar, ActionsOrientation, BaseActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { ActionBar, ActionsOrientation, BaseActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { IInputOptions, InputBox } from 'vs/base/browser/ui/inputbox/inputBox';
|
||||
import { Widget } from 'vs/base/browser/ui/widget';
|
||||
import { Action, IAction } from 'vs/base/common/actions';
|
||||
@@ -291,7 +291,7 @@ export class SettingsGroupTitleWidget extends Widget implements IViewZone {
|
||||
}
|
||||
}
|
||||
|
||||
export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
||||
export class FolderSettingsActionItem extends BaseActionItem {
|
||||
|
||||
private _folder: IWorkspaceFolder | null;
|
||||
private _folderSettingCounts = new Map<string, number>();
|
||||
@@ -427,7 +427,7 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
|
||||
this.contextMenuService.showContextMenu({
|
||||
getAnchor: () => this.container,
|
||||
getActions: () => this.getDropdownMenuActions(),
|
||||
getActionViewItem: () => undefined,
|
||||
getActionItem: () => undefined,
|
||||
onHide: () => {
|
||||
this.anchorElement.blur();
|
||||
}
|
||||
@@ -479,7 +479,7 @@ export class SettingsTargetsWidget extends Widget {
|
||||
private userLocalSettings: Action;
|
||||
private userRemoteSettings: Action;
|
||||
private workspaceSettings: Action;
|
||||
private folderSettings: FolderSettingsActionViewItem;
|
||||
private folderSettings: FolderSettingsActionItem;
|
||||
private options: ISettingsTargetsWidgetOptions;
|
||||
|
||||
private _settingsTarget: SettingsTarget;
|
||||
@@ -508,7 +508,7 @@ export class SettingsTargetsWidget extends Widget {
|
||||
orientation: ActionsOrientation.HORIZONTAL,
|
||||
ariaLabel: localize('settingsSwitcherBarAriaLabel', "Settings Switcher"),
|
||||
animated: false,
|
||||
actionViewItemProvider: (action: Action) => action.id === 'folderSettings' ? this.folderSettings : undefined
|
||||
actionItemProvider: (action: Action) => action.id === 'folderSettings' ? this.folderSettings : undefined
|
||||
}));
|
||||
|
||||
this.userLocalSettings = new Action('userSettings', localize('userSettings', "User"), '.settings-tab', true, () => this.updateTarget(ConfigurationTarget.USER_LOCAL));
|
||||
@@ -525,7 +525,7 @@ export class SettingsTargetsWidget extends Widget {
|
||||
this.workspaceSettings.tooltip = this.workspaceSettings.label;
|
||||
|
||||
const folderSettingsAction = new Action('folderSettings', localize('folderSettings', "Folder"), '.settings-tab', false, (folder: IWorkspaceFolder) => this.updateTarget(folder.uri));
|
||||
this.folderSettings = this.instantiationService.createInstance(FolderSettingsActionViewItem, folderSettingsAction);
|
||||
this.folderSettings = this.instantiationService.createInstance(FolderSettingsActionItem, folderSettingsAction);
|
||||
|
||||
this.update();
|
||||
|
||||
|
||||
@@ -405,10 +405,10 @@ export function settingKeyToDisplayFormat(key: string, groupId = ''): { category
|
||||
|
||||
function wordifyKey(key: string): string {
|
||||
return key
|
||||
.replace(/\.([a-z0-9])/g, (match, p1) => ` › ${p1.toUpperCase()}`) // Replace dot with spaced '>'
|
||||
.replace(/([a-z0-9])([A-Z])/g, '$1 $2') // Camel case to spacing, fooBar => foo Bar
|
||||
.replace(/^[a-z]/g, match => match.toUpperCase()) // Upper casing all first letters, foo => Foo
|
||||
.replace(/\b\w+\b/g, match => { // Upper casing known acronyms
|
||||
.replace(/\.([a-z])/g, (match, p1) => ` › ${p1.toUpperCase()}`)
|
||||
.replace(/([a-z])([A-Z])/g, '$1 $2') // fooBar => foo Bar
|
||||
.replace(/^[a-z]/g, match => match.toUpperCase()) // foo => Foo
|
||||
.replace(/\b\w+\b/g, match => {
|
||||
return knownAcronyms.has(match.toLowerCase()) ?
|
||||
match.toUpperCase() :
|
||||
match;
|
||||
|
||||
Reference in New Issue
Block a user