Skip to content

Commit 801ab0e

Browse files
author
Benjamin Pasero
authored
editors - move open with to editor (fix microsoft#100057) (microsoft#100466)
1 parent 60d2192 commit 801ab0e

13 files changed

Lines changed: 166 additions & 192 deletions

File tree

src/vs/workbench/api/browser/mainThreadEditors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ import { ExtHostContext, ExtHostEditorsShape, IApplyEditsOptions, IExtHostContex
2424
import { EditorViewColumn, editorGroupToViewColumn, viewColumnToEditorGroup } from 'vs/workbench/api/common/shared/editor';
2525
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
2626
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
27-
import { openEditorWith } from 'vs/workbench/contrib/files/common/openWith';
2827
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
2928
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
29+
import { openEditorWith } from 'vs/workbench/services/editor/common/editorOpenWith';
3030

3131
export class MainThreadTextEditors implements MainThreadTextEditorsShape {
3232

src/vs/workbench/browser/parts/editor/editor.contribution.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
77
import * as nls from 'vs/nls';
88
import { URI, UriComponents } from 'vs/base/common/uri';
99
import { IEditorRegistry, EditorDescriptor, Extensions as EditorExtensions } from 'vs/workbench/browser/editor';
10-
import { EditorInput, IEditorInputFactory, SideBySideEditorInput, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions, TextCompareEditorActiveContext, EditorPinnedContext, EditorGroupEditorsCountContext, EditorStickyContext } from 'vs/workbench/common/editor';
10+
import { EditorInput, IEditorInputFactory, SideBySideEditorInput, IEditorInputFactoryRegistry, Extensions as EditorInputExtensions, TextCompareEditorActiveContext, EditorPinnedContext, EditorGroupEditorsCountContext, EditorStickyContext, ActiveEditorAvailableEditorIdsContext } from 'vs/workbench/common/editor';
1111
import { TextResourceEditor } from 'vs/workbench/browser/parts/editor/textResourceEditor';
1212
import { SideBySideEditor } from 'vs/workbench/browser/parts/editor/sideBySideEditor';
1313
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
@@ -34,7 +34,7 @@ import {
3434
JoinAllGroupsAction, FocusLeftGroup, FocusAboveGroup, FocusRightGroup, FocusBelowGroup, EditorLayoutSingleAction, EditorLayoutTwoColumnsAction, EditorLayoutThreeColumnsAction, EditorLayoutTwoByTwoGridAction,
3535
EditorLayoutTwoRowsAction, EditorLayoutThreeRowsAction, EditorLayoutTwoColumnsBottomAction, EditorLayoutTwoRowsRightAction, NewEditorGroupLeftAction, NewEditorGroupRightAction,
3636
NewEditorGroupAboveAction, NewEditorGroupBelowAction, SplitEditorOrthogonalAction, CloseEditorInAllGroupsAction, NavigateToLastEditLocationAction, ToggleGroupSizesAction, ShowAllEditorsByMostRecentlyUsedAction,
37-
QuickAccessPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction, QuickAccessLeastRecentlyUsedEditorAction, QuickAccessLeastRecentlyUsedEditorInGroupAction
37+
QuickAccessPreviousRecentlyUsedEditorAction, OpenPreviousRecentlyUsedEditorInGroupAction, OpenNextRecentlyUsedEditorInGroupAction, QuickAccessLeastRecentlyUsedEditorAction, QuickAccessLeastRecentlyUsedEditorInGroupAction, ReopenResourcesAction, ToggleEditorTypeAction
3838
} from 'vs/workbench/browser/parts/editor/editorActions';
3939
import * as editorCommands from 'vs/workbench/browser/parts/editor/editorCommands';
4040
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -386,6 +386,8 @@ registry.registerWorkbenchAction(SyncActionDescriptor.from(EditorLayoutThreeRows
386386
registry.registerWorkbenchAction(SyncActionDescriptor.from(EditorLayoutTwoByTwoGridAction), 'View: Grid Editor Layout (2x2)', category);
387387
registry.registerWorkbenchAction(SyncActionDescriptor.from(EditorLayoutTwoRowsRightAction), 'View: Two Rows Right Editor Layout', category);
388388
registry.registerWorkbenchAction(SyncActionDescriptor.from(EditorLayoutTwoColumnsBottomAction), 'View: Two Columns Bottom Editor Layout', category);
389+
registry.registerWorkbenchAction(SyncActionDescriptor.from(ReopenResourcesAction), 'View: Reopen Editor With...', category, ActiveEditorAvailableEditorIdsContext);
390+
registry.registerWorkbenchAction(SyncActionDescriptor.from(ToggleEditorTypeAction), 'View: Toggle Editor Type', category, ActiveEditorAvailableEditorIdsContext);
389391

390392
// Register Quick Editor Actions including built in quick navigate support for some
391393

@@ -461,6 +463,7 @@ MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: editorCommands.
461463
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: editorCommands.SHOW_EDITORS_IN_GROUP, title: nls.localize('showOpenedEditors', "Show Opened Editors") }, group: '3_open', order: 10, when: ContextKeyExpr.has('config.workbench.editor.showTabs') });
462464
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: editorCommands.CLOSE_EDITORS_IN_GROUP_COMMAND_ID, title: nls.localize('closeAll', "Close All") }, group: '5_close', order: 10, when: ContextKeyExpr.has('config.workbench.editor.showTabs') });
463465
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: editorCommands.CLOSE_SAVED_EDITORS_COMMAND_ID, title: nls.localize('closeAllSaved', "Close Saved") }, group: '5_close', order: 20, when: ContextKeyExpr.has('config.workbench.editor.showTabs') });
466+
MenuRegistry.appendMenuItem(MenuId.EditorTitle, { command: { id: ReopenResourcesAction.ID, title: ReopenResourcesAction.LABEL }, group: '6_reopen', order: 20, when: ActiveEditorAvailableEditorIdsContext });
464467

465468
interface IEditorToolItem { id: string; title: string; icon?: { dark?: URI; light?: URI; } | ThemeIcon; }
466469

src/vs/workbench/browser/parts/editor/editorActions.ts

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { IHistoryService } from 'vs/workbench/services/history/common/history';
1111
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
1212
import { ICommandService } from 'vs/platform/commands/common/commands';
1313
import { CLOSE_EDITOR_COMMAND_ID, MOVE_ACTIVE_EDITOR_COMMAND_ID, ActiveEditorMoveArguments, SPLIT_EDITOR_LEFT, SPLIT_EDITOR_RIGHT, SPLIT_EDITOR_UP, SPLIT_EDITOR_DOWN, splitEditor, LAYOUT_EDITOR_GROUPS_COMMAND_ID, mergeAllGroups } from 'vs/workbench/browser/parts/editor/editorCommands';
14-
import { IEditorGroupsService, IEditorGroup, GroupsArrangement, GroupLocation, GroupDirection, preferredSideBySideGroupDirection, IFindGroupScope, GroupOrientation, EditorGroupLayout, GroupsOrder } from 'vs/workbench/services/editor/common/editorGroupsService';
14+
import { IEditorGroupsService, IEditorGroup, GroupsArrangement, GroupLocation, GroupDirection, preferredSideBySideGroupDirection, IFindGroupScope, GroupOrientation, EditorGroupLayout, GroupsOrder, OpenEditorContext } from 'vs/workbench/services/editor/common/editorGroupsService';
1515
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
1616
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
1717
import { DisposableStore } from 'vs/base/common/lifecycle';
@@ -22,6 +22,7 @@ import { ItemActivation, IQuickInputService } from 'vs/platform/quickinput/commo
2222
import { AllEditorsByMostRecentlyUsedQuickAccess, ActiveGroupEditorsByMostRecentlyUsedQuickAccess, AllEditorsByAppearanceQuickAccess } from 'vs/workbench/browser/parts/editor/editorQuickAccess';
2323
import { Codicon } from 'vs/base/common/codicons';
2424
import { IFilesConfigurationService, AutoSaveMode } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService';
25+
import { openEditorWith, getAllAvailableEditors } from 'vs/workbench/services/editor/common/editorOpenWith';
2526

2627
export class ExecuteCommandAction extends Action {
2728

@@ -1775,3 +1776,72 @@ export class NewEditorGroupBelowAction extends BaseCreateEditorGroupAction {
17751776
super(id, label, GroupDirection.DOWN, editorGroupService);
17761777
}
17771778
}
1779+
1780+
export class ReopenResourcesAction extends Action {
1781+
1782+
static readonly ID = 'workbench.action.reopenWithEditor';
1783+
static readonly LABEL = nls.localize('workbench.action.reopenWithEditor', "Reopen Editor With...");
1784+
1785+
constructor(
1786+
id: string,
1787+
label: string,
1788+
@IQuickInputService private readonly quickInputService: IQuickInputService,
1789+
@IEditorService private readonly editorService: IEditorService,
1790+
@IConfigurationService private readonly configurationService: IConfigurationService
1791+
) {
1792+
super(id, label);
1793+
}
1794+
1795+
async run(): Promise<void> {
1796+
const activeInput = this.editorService.activeEditor;
1797+
if (!activeInput) {
1798+
return;
1799+
}
1800+
1801+
const activeEditorPane = this.editorService.activeEditorPane;
1802+
if (!activeEditorPane) {
1803+
return;
1804+
}
1805+
1806+
const options = activeEditorPane.options;
1807+
const group = activeEditorPane.group;
1808+
await openEditorWith(activeInput, undefined, options, group, this.editorService, this.configurationService, this.quickInputService);
1809+
}
1810+
}
1811+
1812+
export class ToggleEditorTypeAction extends Action {
1813+
1814+
static readonly ID = 'workbench.action.toggleEditorType';
1815+
static readonly LABEL = nls.localize('workbench.action.toggleEditorType', "Toggle Editor Type");
1816+
1817+
constructor(
1818+
id: string,
1819+
label: string,
1820+
@IEditorService private readonly editorService: IEditorService,
1821+
) {
1822+
super(id, label);
1823+
}
1824+
1825+
async run(): Promise<void> {
1826+
const activeEditorPane = this.editorService.activeEditorPane;
1827+
if (!activeEditorPane) {
1828+
return;
1829+
}
1830+
1831+
const input = activeEditorPane.input;
1832+
if (!input.resource) {
1833+
return;
1834+
}
1835+
1836+
const options = activeEditorPane.options;
1837+
const group = activeEditorPane.group;
1838+
1839+
const overrides = getAllAvailableEditors(input.resource, options, group, this.editorService);
1840+
const firstNonActiveOverride = overrides.find(([_, entry]) => !entry.active);
1841+
if (!firstNonActiveOverride) {
1842+
return;
1843+
}
1844+
1845+
await firstNonActiveOverride[0].open(input, { ...options, override: firstNonActiveOverride[1].id }, group, OpenEditorContext.NEW_EDITOR)?.override;
1846+
}
1847+
}

src/vs/workbench/contrib/customEditor/browser/customEditors.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@ import { EditorInput, EditorOptions, GroupIdentifier, IEditorInput, IEditorPane,
2626
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
2727
import { CONTEXT_CUSTOM_EDITORS, CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE, CustomEditorCapabilities, CustomEditorInfo, CustomEditorInfoCollection, CustomEditorPriority, ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor';
2828
import { CustomEditorModelManager } from 'vs/workbench/contrib/customEditor/common/customEditorModelManager';
29-
import { defaultEditorOverrideEntry } from 'vs/workbench/contrib/files/common/openWith';
3029
import { IWebviewService, webviewHasOwnEditFunctionsContext } from 'vs/workbench/contrib/webview/browser/webview';
31-
import { CustomEditorAssociation, CustomEditorsAssociations, customEditorsAssociationsSettingId } from 'vs/workbench/services/editor/common/editorAssociationsSetting';
30+
import { CustomEditorAssociation, CustomEditorsAssociations, customEditorsAssociationsSettingId, defaultEditorOverrideEntry } from 'vs/workbench/services/editor/common/editorOpenWith';
3231
import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
3332
import { ICustomEditorInfo, ICustomEditorViewTypesHandler, IEditorService, IOpenEditorOverride, IOpenEditorOverrideEntry } from 'vs/workbench/services/editor/common/editorService';
3433
import { ContributedCustomEditors, defaultCustomEditor } from '../common/contributedCustomEditors';

src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { IStorageService, StorageScope } from 'vs/platform/storage/common/storag
1212
import { Memento } from 'vs/workbench/common/memento';
1313
import { CustomEditorDescriptor, CustomEditorInfo, CustomEditorPriority } from 'vs/workbench/contrib/customEditor/common/customEditor';
1414
import { customEditorsExtensionPoint, ICustomEditorsExtensionPoint } from 'vs/workbench/contrib/customEditor/common/extensionPoint';
15-
import { DEFAULT_EDITOR_ID } from 'vs/workbench/contrib/files/common/files';
1615
import { IExtensionPointUser } from 'vs/workbench/services/extensions/common/extensionsRegistry';
16+
import { DEFAULT_EDITOR_ID } from 'vs/workbench/services/editor/common/editorOpenWith';
1717

1818
const builtinProviderDisplayName = nls.localize('builtinProviderDisplayName', "Built-in");
1919

src/vs/workbench/contrib/files/browser/fileActions.contribution.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import * as nls from 'vs/nls';
77
import { Registry } from 'vs/platform/registry/common/platform';
8-
import { ToggleAutoSaveAction, FocusFilesExplorer, GlobalCompareResourcesAction, SaveAllAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView, CompareWithClipboardAction, NEW_FILE_COMMAND_ID, NEW_FILE_LABEL, NEW_FOLDER_COMMAND_ID, NEW_FOLDER_LABEL, TRIGGER_RENAME_LABEL, MOVE_FILE_TO_TRASH_LABEL, COPY_FILE_LABEL, PASTE_FILE_LABEL, FileCopiedContext, renameHandler, moveFileToTrashHandler, copyFileHandler, pasteFileHandler, deleteFileHandler, cutFileHandler, DOWNLOAD_COMMAND_ID, openFilePreserveFocusHandler, DOWNLOAD_LABEL, ShowOpenedFileInNewWindow, ReopenResourcesAction, ToggleEditorTypeCommand as ToggleEditorTypeAction } from 'vs/workbench/contrib/files/browser/fileActions';
8+
import { ToggleAutoSaveAction, FocusFilesExplorer, GlobalCompareResourcesAction, SaveAllAction, ShowActiveFileInExplorer, CollapseExplorerView, RefreshExplorerView, CompareWithClipboardAction, NEW_FILE_COMMAND_ID, NEW_FILE_LABEL, NEW_FOLDER_COMMAND_ID, NEW_FOLDER_LABEL, TRIGGER_RENAME_LABEL, MOVE_FILE_TO_TRASH_LABEL, COPY_FILE_LABEL, PASTE_FILE_LABEL, FileCopiedContext, renameHandler, moveFileToTrashHandler, copyFileHandler, pasteFileHandler, deleteFileHandler, cutFileHandler, DOWNLOAD_COMMAND_ID, openFilePreserveFocusHandler, DOWNLOAD_LABEL, ShowOpenedFileInNewWindow } from 'vs/workbench/contrib/files/browser/fileActions';
99
import { revertLocalChangesCommand, acceptLocalChangesCommand, CONFLICT_RESOLUTION_CONTEXT } from 'vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler';
1010
import { SyncActionDescriptor, MenuId, MenuRegistry, ILocalizedString } from 'vs/platform/actions/common/actions';
1111
import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actions';
@@ -26,7 +26,7 @@ import { WorkspaceFolderCountContext } from 'vs/workbench/browser/contextkeys';
2626
import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys';
2727
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
2828
import { OpenFileFolderAction, OpenFileAction, OpenFolderAction, OpenWorkspaceAction } from 'vs/workbench/browser/actions/workspaceActions';
29-
import { ActiveEditorIsReadonlyContext, DirtyWorkingCopiesContext, ActiveEditorContext, ActiveEditorAvailableEditorIdsContext } from 'vs/workbench/common/editor';
29+
import { ActiveEditorIsReadonlyContext, DirtyWorkingCopiesContext, ActiveEditorContext } from 'vs/workbench/common/editor';
3030
import { SidebarFocusContext } from 'vs/workbench/common/viewlet';
3131
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
3232

@@ -36,8 +36,6 @@ const category = { value: nls.localize('filesCategory', "File"), original: 'File
3636
const registry = Registry.as<IWorkbenchActionRegistry>(ActionExtensions.WorkbenchActions);
3737
registry.registerWorkbenchAction(SyncActionDescriptor.from(SaveAllAction, { primary: undefined, mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_S }, win: { primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_S) } }), 'File: Save All', category.value);
3838
registry.registerWorkbenchAction(SyncActionDescriptor.from(GlobalCompareResourcesAction), 'File: Compare Active File With...', category.value);
39-
registry.registerWorkbenchAction(SyncActionDescriptor.from(ReopenResourcesAction), 'File: Reopen With...', category.value, ActiveEditorAvailableEditorIdsContext);
40-
registry.registerWorkbenchAction(SyncActionDescriptor.from(ToggleEditorTypeAction), 'File: Toggle Editor Type', category.value, ActiveEditorAvailableEditorIdsContext);
4139
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusFilesExplorer), 'File: Focus on Files Explorer', category.value);
4240
registry.registerWorkbenchAction(SyncActionDescriptor.from(ShowActiveFileInExplorer), 'File: Reveal Active File in Side Bar', category.value);
4341
registry.registerWorkbenchAction(SyncActionDescriptor.from(CollapseExplorerView), 'File: Collapse Folders in Explorer', category.value);
@@ -182,19 +180,6 @@ export function appendEditorTitleContextMenuItem(id: string, title: string, when
182180
});
183181
}
184182

185-
// Reopen with editor title
186-
187-
MenuRegistry.appendMenuItem(MenuId.EditorTitle, {
188-
command: {
189-
id: ReopenResourcesAction.ID,
190-
title: ReopenResourcesAction.LABEL,
191-
category: fileCategory,
192-
},
193-
group: '6_reopen',
194-
order: 20,
195-
when: ActiveEditorAvailableEditorIdsContext,
196-
});
197-
198183
// Editor Title Menu for Conflict Resolution
199184
appendSaveConflictEditorTitleAction('workbench.files.action.acceptLocalChanges', nls.localize('acceptLocalChanges', "Use your changes and overwrite file contents"), { id: 'codicon/check' }, -10, acceptLocalChangesCommand);
200185
appendSaveConflictEditorTitleAction('workbench.files.action.revertLocalChanges', nls.localize('revertLocalChanges', "Discard your changes and revert to file contents"), { id: 'codicon/discard' }, -9, revertLocalChangesCommand);

src/vs/workbench/contrib/files/browser/fileActions.ts

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,8 @@ import { IWorkingCopyService, IWorkingCopy } from 'vs/workbench/services/working
4747
import { sequence, timeout } from 'vs/base/common/async';
4848
import { IWorkingCopyFileService } from 'vs/workbench/services/workingCopy/common/workingCopyFileService';
4949
import { once } from 'vs/base/common/functional';
50-
import { OpenEditorContext } from 'vs/workbench/services/editor/common/editorGroupsService';
5150
import { Codicon } from 'vs/base/common/codicons';
5251
import { IViewsService } from 'vs/workbench/common/views';
53-
import { openEditorWith, getAllAvailableEditors } from 'vs/workbench/contrib/files/common/openWith';
5452

5553
export const NEW_FILE_COMMAND_ID = 'explorer.newFile';
5654
export const NEW_FILE_LABEL = nls.localize('newFile', "New File");
@@ -499,75 +497,6 @@ export class GlobalCompareResourcesAction extends Action {
499497
}
500498
}
501499

502-
export class ReopenResourcesAction extends Action {
503-
504-
static readonly ID = 'workbench.files.action.reopenWithEditor';
505-
static readonly LABEL = nls.localize('workbench.files.action.reopenWithEditor', "Reopen With...");
506-
507-
constructor(
508-
id: string,
509-
label: string,
510-
@IQuickInputService private readonly quickInputService: IQuickInputService,
511-
@IEditorService private readonly editorService: IEditorService,
512-
@IConfigurationService private readonly configurationService: IConfigurationService
513-
) {
514-
super(id, label);
515-
}
516-
517-
async run(): Promise<void> {
518-
const activeInput = this.editorService.activeEditor;
519-
if (!activeInput) {
520-
return;
521-
}
522-
523-
const activeEditorPane = this.editorService.activeEditorPane;
524-
if (!activeEditorPane) {
525-
return;
526-
}
527-
528-
const options = activeEditorPane.options;
529-
const group = activeEditorPane.group;
530-
await openEditorWith(activeInput, undefined, options, group, this.editorService, this.configurationService, this.quickInputService);
531-
}
532-
}
533-
534-
export class ToggleEditorTypeCommand extends Action {
535-
536-
static readonly ID = 'workbench.files.action.toggleEditorType';
537-
static readonly LABEL = nls.localize('workbench.files.action.toggleEditorType', "Toggle Editor Type");
538-
539-
constructor(
540-
id: string,
541-
label: string,
542-
@IEditorService private readonly editorService: IEditorService,
543-
) {
544-
super(id, label);
545-
}
546-
547-
async run(): Promise<void> {
548-
const activeEditorPane = this.editorService.activeEditorPane;
549-
if (!activeEditorPane) {
550-
return;
551-
}
552-
553-
const input = activeEditorPane.input;
554-
if (!input.resource) {
555-
return;
556-
}
557-
558-
const options = activeEditorPane.options;
559-
const group = activeEditorPane.group;
560-
561-
const overrides = getAllAvailableEditors(input.resource, options, group, this.editorService);
562-
const firstNonActiveOverride = overrides.find(([_, entry]) => !entry.active);
563-
if (!firstNonActiveOverride) {
564-
return;
565-
}
566-
567-
await firstNonActiveOverride[0].open(input, { ...options, override: firstNonActiveOverride[1].id }, group, OpenEditorContext.NEW_EDITOR)?.override;
568-
}
569-
}
570-
571500
export class ToggleAutoSaveAction extends Action {
572501
static readonly ID = 'workbench.action.toggleAutoSave';
573502
static readonly LABEL = nls.localize('toggleAutoSave', "Toggle Auto Save");

0 commit comments

Comments
 (0)