提交 71c95a46 编写于 作者: M Matt Bierner

Disable open with command for now

It needs more polishing and should probably only be enabled for files that may have custom editors enabled
上级 9bb24dc1
......@@ -3,7 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Schemas } from 'vs/base/common/network';
// import { Schemas } from 'vs/base/common/network';
import { firstOrDefault } from 'vs/base/common/arrays';
import { URI } from 'vs/base/common/uri';
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
import * as nls from 'vs/nls';
......@@ -12,19 +13,18 @@ import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { IListService } from 'vs/platform/list/browser/listService';
import { IEditorCommandsContext } from 'vs/workbench/common/editor';
import { ResourceContextKey } from 'vs/workbench/common/resources';
// import { ResourceContextKey } from 'vs/workbench/common/resources';
import { ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor';
import { getMultiSelectedResources } from 'vs/workbench/contrib/files/browser/files';
import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { firstOrDefault } from 'vs/base/common/arrays';
const viewCategory = nls.localize('viewCategory', "View");
// #region Open With
const OPEN_WITH_COMMAND_ID = 'openWith';
const OPEN_WITH_TITLE = { value: nls.localize('openWith.title', 'Open With'), original: 'Open With' };
// const OPEN_WITH_TITLE = { value: nls.localize('openWith.title', 'Open With'), original: 'Open With' };
KeybindingsRegistry.registerCommandAndKeybindingRule({
id: OPEN_WITH_COMMAND_ID,
......@@ -41,15 +41,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
}
});
MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
group: 'navigation',
order: 20,
command: {
id: OPEN_WITH_COMMAND_ID,
title: OPEN_WITH_TITLE,
},
when: ResourceContextKey.Scheme.isEqualTo(Schemas.file)
});
// MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
// group: 'navigation',
// order: 20,
// command: {
// id: OPEN_WITH_COMMAND_ID,
// title: OPEN_WITH_TITLE,
// },
// when: ResourceContextKey.Scheme.isEqualTo(Schemas.file)
// });
// #endregion
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册