mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
quick access - more renames towards less quick open usage
This commit is contained in:
parent
1cce616475
commit
88d189b479
|
@ -56,7 +56,7 @@ export interface ParsedArgs {
|
|||
'open-url'?: boolean;
|
||||
'skip-getting-started'?: boolean;
|
||||
'skip-release-notes'?: boolean;
|
||||
'sticky-quickopen'?: boolean;
|
||||
'sticky-quickinput'?: boolean;
|
||||
'disable-restore-windows'?: boolean;
|
||||
'disable-telemetry'?: boolean;
|
||||
'export-default-configuration'?: string;
|
||||
|
|
|
@ -90,7 +90,7 @@ export const OPTIONS: OptionDescriptions<Required<ParsedArgs>> = {
|
|||
'logExtensionHostCommunication': { type: 'boolean' },
|
||||
'skip-getting-started': { type: 'boolean' },
|
||||
'skip-release-notes': { type: 'boolean' },
|
||||
'sticky-quickopen': { type: 'boolean' },
|
||||
'sticky-quickinput': { type: 'boolean' },
|
||||
'disable-restore-windows': { type: 'boolean' },
|
||||
'disable-telemetry': { type: 'boolean' },
|
||||
'disable-updates': { type: 'boolean' },
|
||||
|
|
|
@ -154,7 +154,7 @@ export function attachFindReplaceInputBoxStyler(widget: IThemable, themeService:
|
|||
} as IInputBoxStyleOverrides, widget);
|
||||
}
|
||||
|
||||
export interface IQuickOpenStyleOverrides extends IListStyleOverrides, IInputBoxStyleOverrides, IProgressBarStyleOverrides {
|
||||
export interface IQuickInputStyleOverrides extends IListStyleOverrides, IInputBoxStyleOverrides, IProgressBarStyleOverrides {
|
||||
foreground?: ColorIdentifier;
|
||||
background?: ColorIdentifier;
|
||||
borderColor?: ColorIdentifier;
|
||||
|
@ -163,7 +163,7 @@ export interface IQuickOpenStyleOverrides extends IListStyleOverrides, IInputBox
|
|||
pickerGroupBorder?: ColorIdentifier;
|
||||
}
|
||||
|
||||
export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeService, style?: IQuickOpenStyleOverrides): IDisposable {
|
||||
export function attachQuickInputStyler(widget: IThemable, themeService: IThemeService, style?: IQuickInputStyleOverrides): IDisposable {
|
||||
return attachStyler(themeService, {
|
||||
foreground: (style && style.foreground) || foreground,
|
||||
background: (style && style.background) || editorBackground,
|
||||
|
@ -199,7 +199,7 @@ export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeSer
|
|||
listFocusOutline: (style && style.listFocusOutline) || activeContrastBorder,
|
||||
listSelectionOutline: (style && style.listSelectionOutline) || activeContrastBorder,
|
||||
listHoverOutline: (style && style.listHoverOutline) || activeContrastBorder
|
||||
} as IQuickOpenStyleOverrides, widget);
|
||||
} as IQuickInputStyleOverrides, widget);
|
||||
}
|
||||
|
||||
export interface IListStyleOverrides extends IStyleOverrides {
|
||||
|
|
|
@ -14,35 +14,35 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
|||
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { inQuickOpenContext, defaultQuickOpenContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickopen';
|
||||
import { inQuickPickContext, defaultQuickAccessContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickaccess';
|
||||
|
||||
//#region Quick open management commands and keys
|
||||
//#region Quick access management commands and keys
|
||||
|
||||
const globalQuickOpenKeybinding = {
|
||||
const globalQuickAccessKeybinding = {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_P,
|
||||
secondary: [KeyMod.CtrlCmd | KeyCode.KEY_E],
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_P, secondary: undefined }
|
||||
};
|
||||
|
||||
const QUICKOPEN_ACTION_ID = 'workbench.action.quickOpen';
|
||||
const QUICKACCESS_ACTION_ID = 'workbench.action.quickOpen';
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
||||
command: { id: QUICKOPEN_ACTION_ID, title: { value: localize('quickOpen', "Go to File..."), original: 'Go to File...' } }
|
||||
command: { id: QUICKACCESS_ACTION_ID, title: { value: localize('quickOpen', "Go to File..."), original: 'Go to File...' } }
|
||||
});
|
||||
|
||||
KeybindingsRegistry.registerKeybindingRule({
|
||||
id: QUICKOPEN_ACTION_ID,
|
||||
id: QUICKACCESS_ACTION_ID,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: undefined,
|
||||
primary: globalQuickOpenKeybinding.primary,
|
||||
secondary: globalQuickOpenKeybinding.secondary,
|
||||
mac: globalQuickOpenKeybinding.mac
|
||||
primary: globalQuickAccessKeybinding.primary,
|
||||
secondary: globalQuickAccessKeybinding.secondary,
|
||||
mac: globalQuickAccessKeybinding.mac
|
||||
});
|
||||
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'workbench.action.closeQuickOpen',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: inQuickOpenContext,
|
||||
when: inQuickPickContext,
|
||||
primary: KeyCode.Escape, secondary: [KeyMod.Shift | KeyCode.Escape],
|
||||
handler: accessor => {
|
||||
const quickInputService = accessor.get(IQuickInputService);
|
||||
|
@ -53,7 +53,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'workbench.action.acceptSelectedQuickOpenItem',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: inQuickOpenContext,
|
||||
when: inQuickPickContext,
|
||||
primary: 0,
|
||||
handler: accessor => {
|
||||
const quickInputService = accessor.get(IQuickInputService);
|
||||
|
@ -64,7 +64,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'workbench.action.alternativeAcceptSelectedQuickOpenItem',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: inQuickOpenContext,
|
||||
when: inQuickPickContext,
|
||||
primary: 0,
|
||||
handler: accessor => {
|
||||
const quickInputService = accessor.get(IQuickInputService);
|
||||
|
@ -75,7 +75,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'workbench.action.focusQuickOpen',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: inQuickOpenContext,
|
||||
when: inQuickPickContext,
|
||||
primary: 0,
|
||||
handler: accessor => {
|
||||
const quickInputService = accessor.get(IQuickInputService);
|
||||
|
@ -83,27 +83,27 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
}
|
||||
});
|
||||
|
||||
const quickOpenNavigateNextInFilePickerId = 'workbench.action.quickOpenNavigateNextInFilePicker';
|
||||
const quickAccessNavigateNextInFilePickerId = 'workbench.action.quickOpenNavigateNextInFilePicker';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: quickOpenNavigateNextInFilePickerId,
|
||||
id: quickAccessNavigateNextInFilePickerId,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickOpenNavigateNextInFilePickerId, true),
|
||||
when: defaultQuickOpenContext,
|
||||
primary: globalQuickOpenKeybinding.primary,
|
||||
secondary: globalQuickOpenKeybinding.secondary,
|
||||
mac: globalQuickOpenKeybinding.mac
|
||||
handler: getQuickNavigateHandler(quickAccessNavigateNextInFilePickerId, true),
|
||||
when: defaultQuickAccessContext,
|
||||
primary: globalQuickAccessKeybinding.primary,
|
||||
secondary: globalQuickAccessKeybinding.secondary,
|
||||
mac: globalQuickAccessKeybinding.mac
|
||||
});
|
||||
|
||||
const quickOpenNavigatePreviousInFilePickerId = 'workbench.action.quickOpenNavigatePreviousInFilePicker';
|
||||
const quickAccessNavigatePreviousInFilePickerId = 'workbench.action.quickOpenNavigatePreviousInFilePicker';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: quickOpenNavigatePreviousInFilePickerId,
|
||||
id: quickAccessNavigatePreviousInFilePickerId,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickOpenNavigatePreviousInFilePickerId, false),
|
||||
when: defaultQuickOpenContext,
|
||||
primary: globalQuickOpenKeybinding.primary | KeyMod.Shift,
|
||||
secondary: [globalQuickOpenKeybinding.secondary[0] | KeyMod.Shift],
|
||||
handler: getQuickNavigateHandler(quickAccessNavigatePreviousInFilePickerId, false),
|
||||
when: defaultQuickAccessContext,
|
||||
primary: globalQuickAccessKeybinding.primary | KeyMod.Shift,
|
||||
secondary: [globalQuickAccessKeybinding.secondary[0] | KeyMod.Shift],
|
||||
mac: {
|
||||
primary: globalQuickOpenKeybinding.mac.primary | KeyMod.Shift,
|
||||
primary: globalQuickAccessKeybinding.mac.primary | KeyMod.Shift,
|
||||
secondary: undefined
|
||||
}
|
||||
});
|
||||
|
@ -111,7 +111,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'workbench.action.quickPickManyToggle',
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
when: inQuickOpenContext,
|
||||
when: inQuickPickContext,
|
||||
primary: 0,
|
||||
handler: accessor => {
|
||||
const quickInputService = accessor.get(IQuickInputService);
|
||||
|
@ -122,7 +122,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: 'workbench.action.quickInputBack',
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
when: inQuickOpenContext,
|
||||
when: inQuickPickContext,
|
||||
primary: 0,
|
||||
win: { primary: KeyMod.Alt | KeyCode.LeftArrow },
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.US_MINUS },
|
||||
|
@ -134,14 +134,14 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|||
});
|
||||
|
||||
CommandsRegistry.registerCommand({
|
||||
id: QUICKOPEN_ACTION_ID,
|
||||
id: QUICKACCESS_ACTION_ID,
|
||||
handler: async function (accessor: ServicesAccessor, prefix: unknown) {
|
||||
const quickInputService = accessor.get(IQuickInputService);
|
||||
|
||||
quickInputService.quickAccess.show(typeof prefix === 'string' ? prefix : undefined);
|
||||
},
|
||||
description: {
|
||||
description: `Quick open`,
|
||||
description: `Quick access`,
|
||||
args: [{
|
||||
name: 'prefix',
|
||||
schema: {
|
||||
|
@ -161,7 +161,7 @@ CommandsRegistry.registerCommand('workbench.action.quickOpenPreviousEditor', asy
|
|||
|
||||
//#region Workbench actions
|
||||
|
||||
export class BaseQuickOpenNavigateAction extends Action {
|
||||
export class BaseQuickAccessNavigateAction extends Action {
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
@ -182,7 +182,7 @@ export class BaseQuickOpenNavigateAction extends Action {
|
|||
}
|
||||
}
|
||||
|
||||
export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction {
|
||||
export class QuickAccessNavigateNextAction extends BaseQuickAccessNavigateAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenNavigateNext';
|
||||
static readonly LABEL = localize('quickNavigateNext', "Navigate Next in Quick Open");
|
||||
|
@ -197,7 +197,7 @@ export class QuickOpenNavigateNextAction extends BaseQuickOpenNavigateAction {
|
|||
}
|
||||
}
|
||||
|
||||
class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction {
|
||||
class QuickAccessNavigatePreviousAction extends BaseQuickAccessNavigateAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenNavigatePrevious';
|
||||
static readonly LABEL = localize('quickNavigatePrevious', "Navigate Previous in Quick Open");
|
||||
|
@ -212,7 +212,7 @@ class QuickOpenNavigatePreviousAction extends BaseQuickOpenNavigateAction {
|
|||
}
|
||||
}
|
||||
|
||||
class QuickOpenSelectNextAction extends BaseQuickOpenNavigateAction {
|
||||
class QuickAccessSelectNextAction extends BaseQuickAccessNavigateAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenSelectNext';
|
||||
static readonly LABEL = localize('quickSelectNext', "Select Next in Quick Open");
|
||||
|
@ -227,7 +227,7 @@ class QuickOpenSelectNextAction extends BaseQuickOpenNavigateAction {
|
|||
}
|
||||
}
|
||||
|
||||
class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction {
|
||||
class QuickAccessSelectPreviousAction extends BaseQuickAccessNavigateAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenSelectPrevious';
|
||||
static readonly LABEL = localize('quickSelectPrevious', "Select Previous in Quick Open");
|
||||
|
@ -243,9 +243,9 @@ class QuickOpenSelectPreviousAction extends BaseQuickOpenNavigateAction {
|
|||
}
|
||||
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenSelectNextAction, QuickOpenSelectNextAction.ID, QuickOpenSelectNextAction.LABEL, { primary: 0, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_N } }, inQuickOpenContext, KeybindingWeight.WorkbenchContrib + 50), 'Select Next in Quick Open');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenSelectPreviousAction, QuickOpenSelectPreviousAction.ID, QuickOpenSelectPreviousAction.LABEL, { primary: 0, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_P } }, inQuickOpenContext, KeybindingWeight.WorkbenchContrib + 50), 'Select Previous in Quick Open');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenNavigateNextAction, QuickOpenNavigateNextAction.ID, QuickOpenNavigateNextAction.LABEL), 'Navigate Next in Quick Open');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenNavigatePreviousAction, QuickOpenNavigatePreviousAction.ID, QuickOpenNavigatePreviousAction.LABEL), 'Navigate Previous in Quick Open');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessSelectNextAction, QuickAccessSelectNextAction.ID, QuickAccessSelectNextAction.LABEL, { primary: 0, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_N } }, inQuickPickContext, KeybindingWeight.WorkbenchContrib + 50), 'Select Next in Quick Open');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessSelectPreviousAction, QuickAccessSelectPreviousAction.ID, QuickAccessSelectPreviousAction.LABEL, { primary: 0, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_P } }, inQuickPickContext, KeybindingWeight.WorkbenchContrib + 50), 'Select Previous in Quick Open');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessNavigateNextAction, QuickAccessNavigateNextAction.ID, QuickAccessNavigateNextAction.LABEL), 'Navigate Next in Quick Open');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessNavigatePreviousAction, QuickAccessNavigatePreviousAction.ID, QuickAccessNavigatePreviousAction.LABEL), 'Navigate Previous in Quick Open');
|
||||
|
||||
//#endregion
|
|
@ -29,7 +29,7 @@ import { FileKind } from 'vs/platform/files/common/files';
|
|||
import { splitName } from 'vs/base/common/labels';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { inQuickOpenContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickopen';
|
||||
import { inQuickPickContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickaccess';
|
||||
import { IHostService } from 'vs/workbench/services/host/browser/host';
|
||||
|
||||
export const inRecentFilesPickerContextKey = 'inRecentFilesPicker';
|
||||
|
@ -165,7 +165,7 @@ export class OpenRecentAction extends BaseOpenRecentAction {
|
|||
}
|
||||
}
|
||||
|
||||
class QuickOpenRecentAction extends BaseOpenRecentAction {
|
||||
class QuickPickRecentAction extends BaseOpenRecentAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenRecent';
|
||||
static readonly LABEL = nls.localize('quickOpenRecent', "Quick Open Recent...");
|
||||
|
@ -270,7 +270,7 @@ const registry = Registry.as<IWorkbenchActionRegistry>(Extensions.WorkbenchActio
|
|||
|
||||
const fileCategory = nls.localize('file', "File");
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(NewWindowAction, NewWindowAction.ID, NewWindowAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_N }), 'New Window');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenRecentAction, QuickOpenRecentAction.ID, QuickOpenRecentAction.LABEL), 'File: Quick Open Recent...', fileCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickPickRecentAction, QuickPickRecentAction.ID, QuickPickRecentAction.LABEL), 'File: Quick Open Recent...', fileCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(OpenRecentAction, OpenRecentAction.ID, OpenRecentAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_R, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R } }), 'File: Open Recent...', fileCategory);
|
||||
|
||||
const viewCategory = nls.localize('view', "View");
|
||||
|
@ -284,23 +284,23 @@ registry.registerWorkbenchAction(SyncActionDescriptor.create(ShowAboutDialogActi
|
|||
|
||||
// --- Commands/Keybindings Registration
|
||||
|
||||
const recentFilesPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inRecentFilesPickerContextKey));
|
||||
const recentFilesPickerContext = ContextKeyExpr.and(inQuickPickContext, ContextKeyExpr.has(inRecentFilesPickerContextKey));
|
||||
|
||||
const quickOpenNavigateNextInRecentFilesPickerId = 'workbench.action.quickOpenNavigateNextInRecentFilesPicker';
|
||||
const quickPickNavigateNextInRecentFilesPickerId = 'workbench.action.quickOpenNavigateNextInRecentFilesPicker';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: quickOpenNavigateNextInRecentFilesPickerId,
|
||||
id: quickPickNavigateNextInRecentFilesPickerId,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickOpenNavigateNextInRecentFilesPickerId, true),
|
||||
handler: getQuickNavigateHandler(quickPickNavigateNextInRecentFilesPickerId, true),
|
||||
when: recentFilesPickerContext,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_R,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_R }
|
||||
});
|
||||
|
||||
const quickOpenNavigatePreviousInRecentFilesPicker = 'workbench.action.quickOpenNavigatePreviousInRecentFilesPicker';
|
||||
const quickPickNavigatePreviousInRecentFilesPicker = 'workbench.action.quickOpenNavigatePreviousInRecentFilesPicker';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: quickOpenNavigatePreviousInRecentFilesPicker,
|
||||
id: quickPickNavigatePreviousInRecentFilesPicker,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickOpenNavigatePreviousInRecentFilesPicker, false),
|
||||
handler: getQuickNavigateHandler(quickPickNavigatePreviousInRecentFilesPicker, false),
|
||||
when: recentFilesPickerContext,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.KEY_R }
|
||||
|
|
|
@ -26,7 +26,7 @@ import {
|
|||
CloseEditorsInOtherGroupsAction, CloseAllEditorsAction, MoveGroupLeftAction, MoveGroupRightAction, SplitEditorAction, JoinTwoGroupsAction, RevertAndCloseEditorAction,
|
||||
NavigateBetweenGroupsAction, FocusActiveGroupAction, FocusFirstGroupAction, ResetGroupSizesAction, MaximizeGroupAction, MinimizeOtherGroupsAction, FocusPreviousGroup, FocusNextGroup,
|
||||
CloseLeftEditorsInGroupAction, OpenNextEditor, OpenPreviousEditor, NavigateBackwardsAction, NavigateForwardAction, NavigateLastAction, ReopenClosedEditorAction,
|
||||
QuickOpenPreviousRecentlyUsedEditorInGroupAction, QuickOpenPreviousEditorFromHistoryAction, ShowAllEditorsByAppearanceAction, ClearEditorHistoryAction, MoveEditorRightInGroupAction, OpenNextEditorInGroup,
|
||||
QuickAccessPreviousRecentlyUsedEditorInGroupAction, QuickAccessPreviousEditorFromHistoryAction, ShowAllEditorsByAppearanceAction, ClearEditorHistoryAction, MoveEditorRightInGroupAction, OpenNextEditorInGroup,
|
||||
OpenPreviousEditorInGroup, OpenNextRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorAction, MoveEditorToPreviousGroupAction,
|
||||
MoveEditorToNextGroupAction, MoveEditorToFirstGroupAction, MoveEditorLeftInGroupAction, ClearRecentFilesAction, OpenLastEditorInGroup,
|
||||
ShowEditorsInActiveGroupByMostRecentlyUsedAction, MoveEditorToLastGroupAction, OpenFirstEditorInGroup, MoveGroupUpAction, MoveGroupDownAction, FocusLastGroupAction, SplitEditorLeftAction, SplitEditorRightAction,
|
||||
|
@ -34,12 +34,11 @@ import {
|
|||
JoinAllGroupsAction, FocusLeftGroup, FocusAboveGroup, FocusRightGroup, FocusBelowGroup, EditorLayoutSingleAction, EditorLayoutTwoColumnsAction, EditorLayoutThreeColumnsAction, EditorLayoutTwoByTwoGridAction,
|
||||
EditorLayoutTwoRowsAction, EditorLayoutThreeRowsAction, EditorLayoutTwoColumnsBottomAction, EditorLayoutTwoRowsRightAction, NewEditorGroupLeftAction, NewEditorGroupRightAction,
|
||||
NewEditorGroupAboveAction, NewEditorGroupBelowAction, SplitEditorOrthogonalAction, CloseEditorInAllGroupsAction, NavigateToLastEditLocationAction, ToggleGroupSizesAction, ShowAllEditorsByMostRecentlyUsedAction,
|
||||
QuickOpenPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction, QuickOpenNextRecentlyUsedEditorAction as QuickOpenLeastRecentlyUsedEditorAction,
|
||||
QuickOpenLeastRecentlyUsedEditorInGroupAction
|
||||
QuickAccessPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction, QuickAccessLeastRecentlyUsedEditorAction, QuickAccessLeastRecentlyUsedEditorInGroupAction
|
||||
} from 'vs/workbench/browser/parts/editor/editorActions';
|
||||
import * as editorCommands from 'vs/workbench/browser/parts/editor/editorCommands';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { inQuickOpenContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickopen';
|
||||
import { inQuickPickContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickaccess';
|
||||
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { ContextKeyExpr, ContextKeyExpression } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
|
@ -269,7 +268,7 @@ if (Object.keys(SUPPORTED_ENCODINGS).length > 1) {
|
|||
// Register Editor Quick Access
|
||||
const quickAccessRegistry = Registry.as<IQuickAccessRegistry>(QuickAccessExtensions.Quickaccess);
|
||||
const editorPickerContextKey = 'inEditorsPicker';
|
||||
const editorPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(editorPickerContextKey));
|
||||
const editorPickerContext = ContextKeyExpr.and(inQuickPickContext, ContextKeyExpr.has(editorPickerContextKey));
|
||||
|
||||
quickAccessRegistry.registerQuickAccessProvider({
|
||||
ctor: ActiveGroupEditorsByMostRecentlyUsedQuickAccess,
|
||||
|
@ -374,29 +373,29 @@ registry.registerWorkbenchAction(SyncActionDescriptor.create(EditorLayoutTwoColu
|
|||
|
||||
// Register Quick Editor Actions including built in quick navigate support for some
|
||||
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenPreviousRecentlyUsedEditorAction, QuickOpenPreviousRecentlyUsedEditorAction.ID, QuickOpenPreviousRecentlyUsedEditorAction.LABEL), 'View: Quick Open Previous Recently Used Editor', category);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenLeastRecentlyUsedEditorAction, QuickOpenLeastRecentlyUsedEditorAction.ID, QuickOpenLeastRecentlyUsedEditorAction.LABEL), 'View: Quick Open Least Recently Used Editor', category);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessPreviousRecentlyUsedEditorAction, QuickAccessPreviousRecentlyUsedEditorAction.ID, QuickAccessPreviousRecentlyUsedEditorAction.LABEL), 'View: Quick Open Previous Recently Used Editor', category);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessLeastRecentlyUsedEditorAction, QuickAccessLeastRecentlyUsedEditorAction.ID, QuickAccessLeastRecentlyUsedEditorAction.LABEL), 'View: Quick Open Least Recently Used Editor', category);
|
||||
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenPreviousRecentlyUsedEditorInGroupAction, QuickOpenPreviousRecentlyUsedEditorInGroupAction.ID, QuickOpenPreviousRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }), 'View: Quick Open Previous Recently Used Editor in Group', category);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenLeastRecentlyUsedEditorInGroupAction, QuickOpenLeastRecentlyUsedEditorInGroupAction.ID, QuickOpenLeastRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }), 'View: Quick Open Least Recently Used Editor in Group', category);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessPreviousRecentlyUsedEditorInGroupAction, QuickAccessPreviousRecentlyUsedEditorInGroupAction.ID, QuickAccessPreviousRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyCode.Tab } }), 'View: Quick Open Previous Recently Used Editor in Group', category);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessLeastRecentlyUsedEditorInGroupAction, QuickAccessLeastRecentlyUsedEditorInGroupAction.ID, QuickAccessLeastRecentlyUsedEditorInGroupAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab, mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab } }), 'View: Quick Open Least Recently Used Editor in Group', category);
|
||||
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenPreviousEditorFromHistoryAction, QuickOpenPreviousEditorFromHistoryAction.ID, QuickOpenPreviousEditorFromHistoryAction.LABEL), 'Quick Open Previous Editor from History');
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessPreviousEditorFromHistoryAction, QuickAccessPreviousEditorFromHistoryAction.ID, QuickAccessPreviousEditorFromHistoryAction.LABEL), 'Quick Open Previous Editor from History');
|
||||
|
||||
const quickOpenNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker';
|
||||
const quickAccessNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: quickOpenNavigateNextInEditorPickerId,
|
||||
id: quickAccessNavigateNextInEditorPickerId,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickOpenNavigateNextInEditorPickerId, true),
|
||||
handler: getQuickNavigateHandler(quickAccessNavigateNextInEditorPickerId, true),
|
||||
when: editorPickerContext,
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Tab,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Tab }
|
||||
});
|
||||
|
||||
const quickOpenNavigatePreviousInEditorPickerId = 'workbench.action.quickOpenNavigatePreviousInEditorPicker';
|
||||
const quickAccessNavigatePreviousInEditorPickerId = 'workbench.action.quickOpenNavigatePreviousInEditorPicker';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: quickOpenNavigatePreviousInEditorPickerId,
|
||||
id: quickAccessNavigatePreviousInEditorPickerId,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickOpenNavigatePreviousInEditorPickerId, false),
|
||||
handler: getQuickNavigateHandler(quickAccessNavigatePreviousInEditorPickerId, false),
|
||||
when: editorPickerContext,
|
||||
primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.Tab,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyMod.Shift | KeyCode.Tab }
|
||||
|
|
|
@ -1207,7 +1207,7 @@ export class ShowAllEditorsByMostRecentlyUsedAction extends Action {
|
|||
}
|
||||
}
|
||||
|
||||
export class BaseQuickOpenEditorAction extends Action {
|
||||
export class BaseQuickAccessEditorAction extends Action {
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
@ -1230,7 +1230,7 @@ export class BaseQuickOpenEditorAction extends Action {
|
|||
}
|
||||
}
|
||||
|
||||
export class QuickOpenPreviousRecentlyUsedEditorAction extends BaseQuickOpenEditorAction {
|
||||
export class QuickAccessPreviousRecentlyUsedEditorAction extends BaseQuickAccessEditorAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenPreviousRecentlyUsedEditor';
|
||||
static readonly LABEL = nls.localize('quickOpenPreviousRecentlyUsedEditor', "Quick Open Previous Recently Used Editor");
|
||||
|
@ -1245,7 +1245,7 @@ export class QuickOpenPreviousRecentlyUsedEditorAction extends BaseQuickOpenEdit
|
|||
}
|
||||
}
|
||||
|
||||
export class QuickOpenNextRecentlyUsedEditorAction extends BaseQuickOpenEditorAction {
|
||||
export class QuickAccessLeastRecentlyUsedEditorAction extends BaseQuickAccessEditorAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenLeastRecentlyUsedEditor';
|
||||
static readonly LABEL = nls.localize('quickOpenLeastRecentlyUsedEditor', "Quick Open Least Recently Used Editor");
|
||||
|
@ -1260,7 +1260,7 @@ export class QuickOpenNextRecentlyUsedEditorAction extends BaseQuickOpenEditorAc
|
|||
}
|
||||
}
|
||||
|
||||
export class QuickOpenPreviousRecentlyUsedEditorInGroupAction extends BaseQuickOpenEditorAction {
|
||||
export class QuickAccessPreviousRecentlyUsedEditorInGroupAction extends BaseQuickAccessEditorAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup';
|
||||
static readonly LABEL = nls.localize('quickOpenPreviousRecentlyUsedEditorInGroup', "Quick Open Previous Recently Used Editor in Group");
|
||||
|
@ -1275,7 +1275,7 @@ export class QuickOpenPreviousRecentlyUsedEditorInGroupAction extends BaseQuickO
|
|||
}
|
||||
}
|
||||
|
||||
export class QuickOpenLeastRecentlyUsedEditorInGroupAction extends BaseQuickOpenEditorAction {
|
||||
export class QuickAccessLeastRecentlyUsedEditorInGroupAction extends BaseQuickAccessEditorAction {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenLeastRecentlyUsedEditorInGroup';
|
||||
static readonly LABEL = nls.localize('quickOpenLeastRecentlyUsedEditorInGroup', "Quick Open Least Recently Used Editor in Group");
|
||||
|
@ -1290,7 +1290,7 @@ export class QuickOpenLeastRecentlyUsedEditorInGroupAction extends BaseQuickOpen
|
|||
}
|
||||
}
|
||||
|
||||
export class QuickOpenPreviousEditorFromHistoryAction extends Action {
|
||||
export class QuickAccessPreviousEditorFromHistoryAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.openPreviousEditorFromHistory';
|
||||
static readonly LABEL = nls.localize('navigateEditorHistoryByInput', "Quick Open Previous Editor from History");
|
||||
|
|
|
@ -88,7 +88,7 @@ export class NoTabsTitleControl extends TitleControl {
|
|||
private onTitleLabelClick(e: MouseEvent): void {
|
||||
EventHelper.stop(e, false);
|
||||
|
||||
// delayed to let the onTitleClick() come first which can cause a focus change which can close quick open
|
||||
// delayed to let the onTitleClick() come first which can cause a focus change which can close quick access
|
||||
setTimeout(() => this.quickInputService.quickAccess.show());
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ export class NoTabsTitleControl extends TitleControl {
|
|||
}
|
||||
} else {
|
||||
// TODO@rebornix
|
||||
// gesture tap should open the quick open
|
||||
// gesture tap should open the quick access
|
||||
// editorGroupView will focus on the editor again when there are mouse/pointer/touch down events
|
||||
// we need to wait a bit as `GesureEvent.Tap` is generated from `touchstart` and then `touchend` evnets, which are not an atom event.
|
||||
setTimeout(() => this.quickInputService.quickAccess.show(), 50);
|
||||
|
|
|
@ -8,14 +8,14 @@ import { ICommandHandler } from 'vs/platform/commands/common/commands';
|
|||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
|
||||
|
||||
export const inQuickOpenContextKeyValue = 'inQuickOpen';
|
||||
export const InQuickOpenContextKey = new RawContextKey<boolean>(inQuickOpenContextKeyValue, false);
|
||||
export const inQuickOpenContext = ContextKeyExpr.has(inQuickOpenContextKeyValue);
|
||||
export const inQuickPickContextKeyValue = 'inQuickOpen';
|
||||
export const InQuickPickContextKey = new RawContextKey<boolean>(inQuickPickContextKeyValue, false);
|
||||
export const inQuickPickContext = ContextKeyExpr.has(inQuickPickContextKeyValue);
|
||||
|
||||
export const defaultQuickOpenContextKeyValue = 'inFilesPicker';
|
||||
export const defaultQuickOpenContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(defaultQuickOpenContextKeyValue));
|
||||
export const defaultQuickAccessContextKeyValue = 'inFilesPicker';
|
||||
export const defaultQuickAccessContext = ContextKeyExpr.and(inQuickPickContext, ContextKeyExpr.has(defaultQuickAccessContextKeyValue));
|
||||
|
||||
export interface IWorkbenchQuickOpenConfiguration {
|
||||
export interface IWorkbenchQuickAccessConfiguration {
|
||||
workbench: {
|
||||
commandPalette: {
|
||||
history: number;
|
|
@ -501,7 +501,7 @@ export class GlobalCompareResourcesAction extends Action {
|
|||
|
||||
once(this.quickInputService.onHide)((() => toDispose.dispose()));
|
||||
|
||||
// Bring up quick open
|
||||
// Bring up quick access
|
||||
this.quickInputService.quickAccess.show('', { itemActivation: ItemActivation.SECOND });
|
||||
} else {
|
||||
this.notificationService.info(nls.localize('openFileToCompare', "Open a file first to compare it with another file."));
|
||||
|
|
|
@ -22,7 +22,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
|||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { DefaultQuickAccessFilterValue } from 'vs/platform/quickinput/common/quickAccess';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IWorkbenchQuickOpenConfiguration } from 'vs/workbench/browser/quickopen';
|
||||
import { IWorkbenchQuickAccessConfiguration } from 'vs/workbench/browser/quickaccess';
|
||||
import { stripCodicons } from 'vs/base/common/codicons';
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
|
||||
|
@ -66,7 +66,7 @@ export class CommandsQuickAccessProvider extends AbstractEditorCommandsQuickAcce
|
|||
}
|
||||
|
||||
private get configuration() {
|
||||
const commandPaletteConfig = this.configurationService.getValue<IWorkbenchQuickOpenConfiguration>().workbench.commandPalette;
|
||||
const commandPaletteConfig = this.configurationService.getValue<IWorkbenchQuickAccessConfiguration>().workbench.commandPalette;
|
||||
|
||||
return {
|
||||
preserveInput: commandPaletteConfig.preserveInput
|
||||
|
|
|
@ -7,7 +7,7 @@ import { localize } from 'vs/nls';
|
|||
import { IQuickAccessRegistry, Extensions } from 'vs/platform/quickinput/common/quickAccess';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { HelpQuickAccessProvider } from 'vs/platform/quickinput/browser/helpQuickAccess';
|
||||
import { ViewQuickAccessProvider, OpenViewPickerAction, QuickOpenViewPickerAction } from 'vs/workbench/contrib/quickaccess/browser/viewQuickAccess';
|
||||
import { ViewQuickAccessProvider, OpenViewPickerAction, QuickAccessViewPickerAction } from 'vs/workbench/contrib/quickaccess/browser/viewQuickAccess';
|
||||
import { CommandsQuickAccessProvider, CommandPaletteEditorAction, ShowAllCommandsAction, ClearCommandHistoryAction } from 'vs/workbench/contrib/quickaccess/browser/commandsQuickAccess';
|
||||
import { registerEditorAction } from 'vs/editor/browser/editorExtensions';
|
||||
import { MenuRegistry, MenuId, SyncActionDescriptor } from 'vs/platform/actions/common/actions';
|
||||
|
@ -16,21 +16,21 @@ import { KeyMod, KeyCode } from 'vs/base/common/keyCodes';
|
|||
import { GotoLineAction } from 'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess';
|
||||
import { GotoSymbolAction } from 'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess';
|
||||
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { inQuickOpenContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickopen';
|
||||
import { inQuickPickContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickaccess';
|
||||
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
|
||||
//#region Quick Access Proviers
|
||||
|
||||
const quickOpenRegistry = Registry.as<IQuickAccessRegistry>(Extensions.Quickaccess);
|
||||
const quickAccessRegistry = Registry.as<IQuickAccessRegistry>(Extensions.Quickaccess);
|
||||
|
||||
quickOpenRegistry.registerQuickAccessProvider({
|
||||
quickAccessRegistry.registerQuickAccessProvider({
|
||||
ctor: HelpQuickAccessProvider,
|
||||
prefix: HelpQuickAccessProvider.PREFIX,
|
||||
placeholder: localize('helpQuickAccessPlaceholder', "Type '{0}' to get help on the actions you can take from here.", HelpQuickAccessProvider.PREFIX),
|
||||
helpEntries: [{ description: localize('helpQuickAccess', "Show all Quick Access Providers"), needsEditor: false }]
|
||||
});
|
||||
|
||||
quickOpenRegistry.registerQuickAccessProvider({
|
||||
quickAccessRegistry.registerQuickAccessProvider({
|
||||
ctor: ViewQuickAccessProvider,
|
||||
prefix: ViewQuickAccessProvider.PREFIX,
|
||||
contextKey: 'inViewsPicker',
|
||||
|
@ -38,7 +38,7 @@ quickOpenRegistry.registerQuickAccessProvider({
|
|||
helpEntries: [{ description: localize('viewQuickAccess', "Open View"), needsEditor: false }]
|
||||
});
|
||||
|
||||
quickOpenRegistry.registerQuickAccessProvider({
|
||||
quickAccessRegistry.registerQuickAccessProvider({
|
||||
ctor: CommandsQuickAccessProvider,
|
||||
prefix: CommandsQuickAccessProvider.PREFIX,
|
||||
contextKey: 'inCommandsPicker',
|
||||
|
@ -118,30 +118,30 @@ registry.registerWorkbenchAction(SyncActionDescriptor.create(GotoSymbolAction, G
|
|||
}), 'Go to Symbol in Editor...');
|
||||
|
||||
const inViewsPickerContextKey = 'inViewsPicker';
|
||||
const inViewsPickerContext = ContextKeyExpr.and(inQuickOpenContext, ContextKeyExpr.has(inViewsPickerContextKey));
|
||||
const inViewsPickerContext = ContextKeyExpr.and(inQuickPickContext, ContextKeyExpr.has(inViewsPickerContextKey));
|
||||
|
||||
const viewPickerKeybinding = { primary: KeyMod.CtrlCmd | KeyCode.KEY_Q, mac: { primary: KeyMod.WinCtrl | KeyCode.KEY_Q }, linux: { primary: 0 } };
|
||||
|
||||
const viewCategory = localize('view', "View");
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(OpenViewPickerAction, OpenViewPickerAction.ID, OpenViewPickerAction.LABEL), 'View: Open View', viewCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenViewPickerAction, QuickOpenViewPickerAction.ID, QuickOpenViewPickerAction.LABEL, viewPickerKeybinding), 'View: Quick Open View', viewCategory);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessViewPickerAction, QuickAccessViewPickerAction.ID, QuickAccessViewPickerAction.LABEL, viewPickerKeybinding), 'View: Quick Open View', viewCategory);
|
||||
|
||||
const quickOpenNavigateNextInViewPickerId = 'workbench.action.quickOpenNavigateNextInViewPicker';
|
||||
const quickAccessNavigateNextInViewPickerId = 'workbench.action.quickOpenNavigateNextInViewPicker';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: quickOpenNavigateNextInViewPickerId,
|
||||
id: quickAccessNavigateNextInViewPickerId,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickOpenNavigateNextInViewPickerId, true),
|
||||
handler: getQuickNavigateHandler(quickAccessNavigateNextInViewPickerId, true),
|
||||
when: inViewsPickerContext,
|
||||
primary: viewPickerKeybinding.primary,
|
||||
linux: viewPickerKeybinding.linux,
|
||||
mac: viewPickerKeybinding.mac
|
||||
});
|
||||
|
||||
const quickOpenNavigatePreviousInViewPickerId = 'workbench.action.quickOpenNavigatePreviousInViewPicker';
|
||||
const quickAccessNavigatePreviousInViewPickerId = 'workbench.action.quickOpenNavigatePreviousInViewPicker';
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: quickOpenNavigatePreviousInViewPickerId,
|
||||
id: quickAccessNavigatePreviousInViewPickerId,
|
||||
weight: KeybindingWeight.WorkbenchContrib + 50,
|
||||
handler: getQuickNavigateHandler(quickOpenNavigatePreviousInViewPickerId, false),
|
||||
handler: getQuickNavigateHandler(quickAccessNavigatePreviousInViewPickerId, false),
|
||||
when: inViewsPickerContext,
|
||||
primary: viewPickerKeybinding.primary | KeyMod.Shift,
|
||||
linux: viewPickerKeybinding.linux,
|
||||
|
|
|
@ -202,7 +202,7 @@ export class OpenViewPickerAction extends Action {
|
|||
}
|
||||
}
|
||||
|
||||
export class QuickOpenViewPickerAction extends Action {
|
||||
export class QuickAccessViewPickerAction extends Action {
|
||||
|
||||
static readonly ID = 'workbench.action.quickOpenView';
|
||||
static readonly LABEL = localize('quickOpenView', "Quick Open View");
|
||||
|
|
|
@ -56,7 +56,7 @@ import { Event } from 'vs/base/common/event';
|
|||
import { ExtensionsRegistry, IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry';
|
||||
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
|
||||
import { RemoteWindowActiveIndicator } from 'vs/workbench/contrib/remote/browser/remoteIndicator';
|
||||
import { inQuickOpenContextKeyValue } from 'vs/workbench/browser/quickopen';
|
||||
import { inQuickPickContextKeyValue } from 'vs/workbench/browser/quickaccess';
|
||||
|
||||
export interface HelpInformation {
|
||||
extensionDescription: IExtensionDescription;
|
||||
|
@ -774,7 +774,7 @@ class RemoteAgentConnectionStatusListener implements IWorkbenchContribution {
|
|||
|
||||
// Register to listen for quick input is opened
|
||||
disposableListener = contextKeyService.onDidChangeContext((contextKeyChangeEvent) => {
|
||||
const reconnectInteraction = new Set<string>([inQuickOpenContextKeyValue]);
|
||||
const reconnectInteraction = new Set<string>([inQuickPickContextKeyValue]);
|
||||
if (contextKeyChangeEvent.affectsSome(reconnectInteraction)) {
|
||||
// Need to move from dialog if being shown and user needs to type in a prompt
|
||||
if (lastLocation === ProgressLocation.Dialog && visibleProgress !== null) {
|
||||
|
|
|
@ -40,7 +40,7 @@ import { IFilesConfigurationService, AutoSaveMode } from 'vs/workbench/services/
|
|||
import { ResourceMap } from 'vs/base/common/map';
|
||||
import { SymbolsQuickAccessProvider } from 'vs/workbench/contrib/search/browser/symbolsQuickAccess';
|
||||
import { DefaultQuickAccessFilterValue } from 'vs/platform/quickinput/common/quickAccess';
|
||||
import { IWorkbenchQuickOpenConfiguration } from 'vs/workbench/browser/quickopen';
|
||||
import { IWorkbenchQuickAccessConfiguration } from 'vs/workbench/browser/quickaccess';
|
||||
import { GotoSymbolQuickAccessProvider } from 'vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess';
|
||||
import { ITextModelService } from 'vs/editor/common/services/resolverService';
|
||||
import { ScrollType, IEditor, ICodeEditorViewState, IDiffEditorViewState } from 'vs/editor/common/editorCommon';
|
||||
|
@ -168,7 +168,7 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
|
|||
private get configuration() {
|
||||
const editorConfig = this.configurationService.getValue<IWorkbenchEditorConfiguration>().workbench.editor;
|
||||
const searchConfig = this.configurationService.getValue<IWorkbenchSearchConfiguration>().search;
|
||||
const quickOpenConfig = this.configurationService.getValue<IWorkbenchQuickOpenConfiguration>().workbench.quickOpen;
|
||||
const quickAccessConfig = this.configurationService.getValue<IWorkbenchQuickAccessConfiguration>().workbench.quickOpen;
|
||||
|
||||
return {
|
||||
openEditorPinned: !editorConfig.enablePreviewFromQuickOpen,
|
||||
|
@ -177,7 +177,7 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
|
|||
includeHistory: searchConfig.quickOpen.includeHistory,
|
||||
historyFilterSortOrder: searchConfig.quickOpen.history.filterSortOrder,
|
||||
shortAutoSaveDelay: this.filesConfigurationService.getAutoSaveMode() === AutoSaveMode.AFTER_SHORT_DELAY,
|
||||
preserveInput: quickOpenConfig.preserveInput
|
||||
preserveInput: quickAccessConfig.preserveInput
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/co
|
|||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { IListService, WorkbenchListFocusContextKey, WorkbenchObjectTree } from 'vs/platform/list/browser/listService';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { defaultQuickOpenContextKeyValue } from 'vs/workbench/browser/quickopen';
|
||||
import { defaultQuickAccessContextKeyValue } from 'vs/workbench/browser/quickaccess';
|
||||
import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions';
|
||||
import { Extensions as WorkbenchExtensions, IWorkbenchContribution, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
|
||||
import { Extensions as ViewExtensions, IViewsRegistry, IViewContainersRegistry, ViewContainerLocation, IViewDescriptorService, IViewsService } from 'vs/workbench/common/views';
|
||||
|
@ -620,7 +620,7 @@ quickAccessRegistry.registerQuickAccessProvider({
|
|||
ctor: AnythingQuickAccessProvider,
|
||||
prefix: AnythingQuickAccessProvider.PREFIX,
|
||||
placeholder: nls.localize('anythingQuickAccessPlaceholder', "Search files by name (append {0} to go to line or {1} to go to symbol)", AbstractGotoLineQuickAccessProvider.PREFIX, GotoSymbolQuickAccessProvider.PREFIX),
|
||||
contextKey: defaultQuickOpenContextKeyValue,
|
||||
contextKey: defaultQuickAccessContextKeyValue,
|
||||
helpEntries: [{ description: nls.localize('anythingQuickAccess', "Go to File"), needsEditor: false }]
|
||||
});
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
|||
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import * as panel from 'vs/workbench/browser/panel';
|
||||
import { getQuickNavigateHandler } from 'vs/workbench/browser/quickopen';
|
||||
import { getQuickNavigateHandler } from 'vs/workbench/browser/quickaccess';
|
||||
import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions';
|
||||
import { Extensions as ViewContainerExtensions, IViewContainersRegistry, ViewContainerLocation, IViewsRegistry } from 'vs/workbench/common/views';
|
||||
import { ClearSelectionTerminalAction, ClearTerminalAction, CopyTerminalSelectionAction, CreateNewInActiveWorkspaceTerminalAction, CreateNewTerminalAction, DeleteToLineStartTerminalAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, FindNext, FindPrevious, FocusActiveTerminalAction, FocusNextPaneTerminalAction, FocusNextTerminalAction, FocusPreviousPaneTerminalAction, FocusPreviousTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, KillTerminalAction, MoveToLineEndTerminalAction, MoveToLineStartTerminalAction, QuickOpenTermAction, RenameTerminalAction, ResizePaneDownTerminalAction, ResizePaneLeftTerminalAction, ResizePaneRightTerminalAction, ResizePaneUpTerminalAction, RunActiveFileInTerminalAction, RunSelectedTextInTerminalAction, ScrollDownPageTerminalAction, ScrollDownTerminalAction, ScrollToBottomTerminalAction, ScrollToNextCommandAction, ScrollToPreviousCommandAction, ScrollToTopTerminalAction, ScrollUpPageTerminalAction, ScrollUpTerminalAction, SelectAllTerminalAction, SelectDefaultShellWindowsTerminalAction, SelectToNextCommandAction, SelectToNextLineAction, SelectToPreviousCommandAction, SelectToPreviousLineAction, SplitInActiveWorkspaceTerminalAction, SplitTerminalAction, TerminalPasteAction, ToggleCaseSensitiveCommand, ToggleEscapeSequenceLoggingAction, ToggleRegexCommand, ToggleTerminalAction, ToggleWholeWordCommand, NavigationModeFocusPreviousTerminalAction, NavigationModeFocusNextTerminalAction, NavigationModeExitTerminalAction, ManageWorkspaceShellPermissionsTerminalCommand, CreateNewWithCwdTerminalAction, RenameWithArgTerminalAction, SendSequenceTerminalAction } from 'vs/workbench/contrib/terminal/browser/terminalActions';
|
||||
import { ClearSelectionTerminalAction, ClearTerminalAction, CopyTerminalSelectionAction, CreateNewInActiveWorkspaceTerminalAction, CreateNewTerminalAction, DeleteToLineStartTerminalAction, DeleteWordLeftTerminalAction, DeleteWordRightTerminalAction, FindNext, FindPrevious, FocusActiveTerminalAction, FocusNextPaneTerminalAction, FocusNextTerminalAction, FocusPreviousPaneTerminalAction, FocusPreviousTerminalAction, FocusTerminalFindWidgetAction, HideTerminalFindWidgetAction, KillTerminalAction, MoveToLineEndTerminalAction, MoveToLineStartTerminalAction, QuickAccessTerminalAction, RenameTerminalAction, ResizePaneDownTerminalAction, ResizePaneLeftTerminalAction, ResizePaneRightTerminalAction, ResizePaneUpTerminalAction, RunActiveFileInTerminalAction, RunSelectedTextInTerminalAction, ScrollDownPageTerminalAction, ScrollDownTerminalAction, ScrollToBottomTerminalAction, ScrollToNextCommandAction, ScrollToPreviousCommandAction, ScrollToTopTerminalAction, ScrollUpPageTerminalAction, ScrollUpTerminalAction, SelectAllTerminalAction, SelectDefaultShellWindowsTerminalAction, SelectToNextCommandAction, SelectToNextLineAction, SelectToPreviousCommandAction, SelectToPreviousLineAction, SplitInActiveWorkspaceTerminalAction, SplitTerminalAction, TerminalPasteAction, ToggleCaseSensitiveCommand, ToggleEscapeSequenceLoggingAction, ToggleRegexCommand, ToggleTerminalAction, ToggleWholeWordCommand, NavigationModeFocusPreviousTerminalAction, NavigationModeFocusNextTerminalAction, NavigationModeExitTerminalAction, ManageWorkspaceShellPermissionsTerminalCommand, CreateNewWithCwdTerminalAction, RenameWithArgTerminalAction, SendSequenceTerminalAction } from 'vs/workbench/contrib/terminal/browser/terminalActions';
|
||||
import { TerminalViewPane } from 'vs/workbench/contrib/terminal/browser/terminalView';
|
||||
import { KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_VIEW_ID, DEFAULT_LETTER_SPACING, DEFAULT_LINE_HEIGHT, TerminalCursorStyle, TERMINAL_ACTION_CATEGORY, KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS, TERMINAL_COMMAND_ID } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { registerColors } from 'vs/workbench/contrib/terminal/common/terminalColorRegistry';
|
||||
|
@ -56,13 +56,13 @@ quickAccessRegistry.registerQuickAccessProvider({
|
|||
helpEntries: [{ description: nls.localize('tasksQuickAccessHelp', "Show All Opened Terminals"), needsEditor: false }]
|
||||
});
|
||||
|
||||
const quickOpenNavigateNextInTerminalPickerId = 'workbench.action.quickOpenNavigateNextInTerminalPicker';
|
||||
const quickAccessNavigateNextInTerminalPickerId = 'workbench.action.quickOpenNavigateNextInTerminalPicker';
|
||||
CommandsRegistry.registerCommand(
|
||||
{ id: quickOpenNavigateNextInTerminalPickerId, handler: getQuickNavigateHandler(quickOpenNavigateNextInTerminalPickerId, true) });
|
||||
{ id: quickAccessNavigateNextInTerminalPickerId, handler: getQuickNavigateHandler(quickAccessNavigateNextInTerminalPickerId, true) });
|
||||
|
||||
const quickOpenNavigatePreviousInTerminalPickerId = 'workbench.action.quickOpenNavigatePreviousInTerminalPicker';
|
||||
const quickAccessNavigatePreviousInTerminalPickerId = 'workbench.action.quickOpenNavigatePreviousInTerminalPicker';
|
||||
CommandsRegistry.registerCommand(
|
||||
{ id: quickOpenNavigatePreviousInTerminalPickerId, handler: getQuickNavigateHandler(quickOpenNavigatePreviousInTerminalPickerId, false) });
|
||||
{ id: quickAccessNavigatePreviousInTerminalPickerId, handler: getQuickNavigateHandler(quickAccessNavigatePreviousInTerminalPickerId, false) });
|
||||
|
||||
|
||||
const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration);
|
||||
|
@ -357,7 +357,7 @@ configurationRegistry.registerConfiguration({
|
|||
});
|
||||
|
||||
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickOpenTermAction, QuickOpenTermAction.ID, QuickOpenTermAction.LABEL), 'Terminal: Switch Active Terminal', nls.localize('terminal', "Terminal"));
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.create(QuickAccessTerminalAction, QuickAccessTerminalAction.ID, QuickAccessTerminalAction.LABEL), 'Terminal: Switch Active Terminal', nls.localize('terminal', "Terminal"));
|
||||
|
||||
const VIEW_CONTAINER = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry).registerViewContainer({
|
||||
id: TERMINAL_VIEW_ID,
|
||||
|
|
|
@ -1074,10 +1074,10 @@ export class HideTerminalFindWidgetAction extends Action {
|
|||
}
|
||||
}
|
||||
|
||||
export class QuickOpenTermAction extends Action {
|
||||
export class QuickAccessTerminalAction extends Action {
|
||||
|
||||
public static readonly ID = TERMINAL_COMMAND_ID.QUICK_OPEN_TERM;
|
||||
public static readonly LABEL = nls.localize('quickOpenTerm', "Switch Active Terminal");
|
||||
public static readonly LABEL = nls.localize('quickAccessTerminal', "Switch Active Terminal");
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
|
|
|
@ -38,7 +38,7 @@ interface WatermarkEntry {
|
|||
}
|
||||
|
||||
const showCommands: WatermarkEntry = { text: nls.localize('watermark.showCommands', "Show All Commands"), id: ShowAllCommandsAction.ID };
|
||||
const quickOpen: WatermarkEntry = { text: nls.localize('watermark.quickOpen', "Go to File"), id: 'workbench.action.quickOpen' };
|
||||
const quickAccess: WatermarkEntry = { text: nls.localize('watermark.quickAccess', "Go to File"), id: 'workbench.action.quickOpen' };
|
||||
const openFileNonMacOnly: WatermarkEntry = { text: nls.localize('watermark.openFile', "Open File"), id: OpenFileAction.ID, mac: false };
|
||||
const openFolderNonMacOnly: WatermarkEntry = { text: nls.localize('watermark.openFolder', "Open Folder"), id: OpenFolderAction.ID, mac: false };
|
||||
const openFileOrFolderMacOnly: WatermarkEntry = { text: nls.localize('watermark.openFileFolder', "Open File or Folder"), id: OpenFileFolderAction.ID, mac: true };
|
||||
|
@ -60,7 +60,7 @@ const noFolderEntries = [
|
|||
|
||||
const folderEntries = [
|
||||
showCommands,
|
||||
quickOpen,
|
||||
quickAccess,
|
||||
findInFiles,
|
||||
startDebugging,
|
||||
toggleTerminal
|
||||
|
|
|
@ -15,11 +15,11 @@ import { QuickInputController } from 'vs/base/parts/quickinput/browser/quickInpu
|
|||
import { QuickInputService as BaseQuickInputService } from 'vs/platform/quickinput/browser/quickInput';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { InQuickOpenContextKey } from 'vs/workbench/browser/quickopen';
|
||||
import { InQuickPickContextKey } from 'vs/workbench/browser/quickaccess';
|
||||
|
||||
export class QuickInputService extends BaseQuickInputService {
|
||||
|
||||
private readonly inQuickOpenContext = InQuickOpenContextKey.bindTo(this.contextKeyService);
|
||||
private readonly inQuickInputContext = InQuickPickContextKey.bindTo(this.contextKeyService);
|
||||
|
||||
constructor(
|
||||
@IEnvironmentService private readonly environmentService: IEnvironmentService,
|
||||
|
@ -37,13 +37,13 @@ export class QuickInputService extends BaseQuickInputService {
|
|||
}
|
||||
|
||||
private registerListeners(): void {
|
||||
this._register(this.onShow(() => this.inQuickOpenContext.set(true)));
|
||||
this._register(this.onHide(() => this.inQuickOpenContext.set(false)));
|
||||
this._register(this.onShow(() => this.inQuickInputContext.set(true)));
|
||||
this._register(this.onHide(() => this.inQuickInputContext.set(false)));
|
||||
}
|
||||
|
||||
protected createController(): QuickInputController {
|
||||
return super.createController(this.layoutService, {
|
||||
ignoreFocusOut: () => this.environmentService.args['sticky-quickopen'] || !this.configurationService.getValue('workbench.quickOpen.closeOnFocusLost'),
|
||||
ignoreFocusOut: () => this.environmentService.args['sticky-quickinput'] || !this.configurationService.getValue('workbench.quickOpen.closeOnFocusLost'),
|
||||
backKeybindingLabel: () => this.keybindingService.lookupKeybinding('workbench.action.quickInputBack')?.getLabel() || undefined,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -316,12 +316,12 @@ export interface TextSearchContext {
|
|||
export type TextSearchResult = TextSearchMatch | TextSearchContext;
|
||||
|
||||
/**
|
||||
* A FileSearchProvider provides search results for files in the given folder that match a query string. It can be invoked by quickopen or other extensions.
|
||||
* A FileSearchProvider provides search results for files in the given folder that match a query string. It can be invoked by quickaccess or other extensions.
|
||||
*
|
||||
* A FileSearchProvider is the more powerful of two ways to implement file search in VS Code. Use a FileSearchProvider if you wish to search within a folder for
|
||||
* all files that match the user's query.
|
||||
*
|
||||
* The FileSearchProvider will be invoked on every keypress in quickopen. When `workspace.findFiles` is called, it will be invoked with an empty query string,
|
||||
* The FileSearchProvider will be invoked on every keypress in quickaccess. When `workspace.findFiles` is called, it will be invoked with an empty query string,
|
||||
* and in that case, every file in the folder should be returned.
|
||||
*/
|
||||
export interface FileSearchProvider {
|
||||
|
|
|
@ -183,7 +183,7 @@ export class SearchService implements IRawSearchService {
|
|||
const sortSW = (typeof config.maxResults !== 'number' || config.maxResults > 0) && StopWatch.create(false);
|
||||
return this.sortResults(config, results, scorerCache, token)
|
||||
.then<[ISerializedSearchSuccess, IRawFileMatch[]]>(sortedResults => {
|
||||
// sortingTime: -1 indicates a "sorted" search that was not sorted, i.e. populating the cache when quickopen is opened.
|
||||
// sortingTime: -1 indicates a "sorted" search that was not sorted, i.e. populating the cache when quickaccess is opened.
|
||||
// Contrasting with findFiles which is not sorted and will have sortingTime: undefined
|
||||
const sortingTime = sortSW ? sortSW.elapsed() : -1;
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import 'vs/workbench/browser/actions/navigationActions';
|
|||
import 'vs/workbench/browser/actions/windowActions';
|
||||
import 'vs/workbench/browser/actions/workspaceActions';
|
||||
import 'vs/workbench/browser/actions/workspaceCommands';
|
||||
import 'vs/workbench/browser/actions/quickOpenActions';
|
||||
import 'vs/workbench/browser/actions/quickAccessActions';
|
||||
|
||||
//#endregion
|
||||
|
||||
|
@ -146,7 +146,7 @@ import 'vs/workbench/contrib/notebook/browser/notebook.contribution';
|
|||
// Logs
|
||||
import 'vs/workbench/contrib/logs/common/logs.contribution';
|
||||
|
||||
// Quickopen
|
||||
// Quickaccess
|
||||
import 'vs/workbench/contrib/quickaccess/browser/quickAccess.contribution';
|
||||
|
||||
// Explorer
|
||||
|
|
|
@ -134,7 +134,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
|||
options.workspacePath,
|
||||
'--skip-getting-started',
|
||||
'--skip-release-notes',
|
||||
'--sticky-quickopen',
|
||||
'--sticky-quickinput',
|
||||
'--disable-telemetry',
|
||||
'--disable-updates',
|
||||
'--disable-crash-reporter',
|
||||
|
|
Loading…
Reference in a new issue