提交 a8b004a3 编写于 作者: J Joao Moreno

fixes #62629

上级 e7c77a3a
......@@ -24,6 +24,8 @@ import { ExtHostContext, ExtHostEditorsShape, IApplyEditsOptions, IExtHostContex
import { EditorViewColumn, editorGroupToViewColumn, viewColumnToEditorGroup } from 'vs/workbench/api/shared/editor';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
import { IURLService } from 'vs/platform/url/common/url';
import product from 'vs/platform/node/product';
export class MainThreadTextEditors implements MainThreadTextEditorsShape {
......@@ -264,6 +266,7 @@ CommandsRegistry.registerCommand('_workbench.open', function (accessor: Services
const editorService = accessor.get(IEditorService);
const editorGroupService = accessor.get(IEditorGroupsService);
const openerService = accessor.get(IOpenerService);
const urlService = accessor.get(IURLService);
const [resource, options, position, label] = args;
......@@ -277,6 +280,10 @@ CommandsRegistry.registerCommand('_workbench.open', function (accessor: Services
return Promise.resolve(void 0);
}
if (resource && (resource.scheme === product.urlProtocol || /^vscode/.test(resource.scheme))) {
return urlService.open(resource).then(_ => void 0);
}
// finally, delegate to opener service
return openerService.open(resource).then(_ => void 0);
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册