Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
0aba6731
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0aba6731
编写于
9月 18, 2020
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use `ConsoleLogService` as `ILogService` in standalone editor
上级
761b3455
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
6 deletion
+9
-6
src/vs/editor/standalone/browser/simpleServices.ts
src/vs/editor/standalone/browser/simpleServices.ts
+3
-2
src/vs/editor/standalone/browser/standaloneServices.ts
src/vs/editor/standalone/browser/standaloneServices.ts
+4
-3
src/vs/editor/standalone/test/browser/simpleServices.test.ts
src/vs/editor/standalone/test/browser/simpleServices.test.ts
+2
-1
未找到文件。
src/vs/editor/standalone/browser/simpleServices.ts
浏览文件 @
0aba6731
...
...
@@ -46,7 +46,7 @@ import { SimpleServicesNLS } from 'vs/editor/common/standaloneStrings';
import
{
ClassifiedEvent
,
StrictPropertyCheck
,
GDPRClassification
}
from
'
vs/platform/telemetry/common/gdprTypings
'
;
import
{
basename
}
from
'
vs/base/common/resources
'
;
import
{
ICodeEditorService
}
from
'
vs/editor/browser/services/codeEditorService
'
;
import
{
Null
LogService
}
from
'
vs/platform/log/common/log
'
;
import
{
I
LogService
}
from
'
vs/platform/log/common/log
'
;
export
class
SimpleModel
implements
IResolvedTextEditorModel
{
...
...
@@ -298,9 +298,10 @@ export class StandaloneKeybindingService extends AbstractKeybindingService {
commandService
:
ICommandService
,
telemetryService
:
ITelemetryService
,
notificationService
:
INotificationService
,
logService
:
ILogService
,
domNode
:
HTMLElement
)
{
super
(
contextKeyService
,
commandService
,
telemetryService
,
notificationService
,
new
NullLogService
()
);
super
(
contextKeyService
,
commandService
,
telemetryService
,
notificationService
,
logService
);
this
.
_cachedResolver
=
null
;
this
.
_dynamicKeybindings
=
[];
...
...
src/vs/editor/standalone/browser/standaloneServices.ts
浏览文件 @
0aba6731
...
...
@@ -32,7 +32,7 @@ import { ServiceCollection } from 'vs/platform/instantiation/common/serviceColle
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
ILabelService
}
from
'
vs/platform/label/common/label
'
;
import
{
IListService
,
ListService
}
from
'
vs/platform/list/browser/listService
'
;
import
{
ILogService
,
Null
LogService
}
from
'
vs/platform/log/common/log
'
;
import
{
ConsoleLogService
,
I
LogService
}
from
'
vs/platform/log/common/log
'
;
import
{
MarkerService
}
from
'
vs/platform/markers/common/markerService
'
;
import
{
IMarkerService
}
from
'
vs/platform/markers/common/markers
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
...
...
@@ -153,7 +153,7 @@ export module StaticServices {
export
const
standaloneThemeService
=
define
(
IStandaloneThemeService
,
()
=>
new
StandaloneThemeServiceImpl
());
export
const
logService
=
define
(
ILogService
,
()
=>
new
Null
LogService
());
export
const
logService
=
define
(
ILogService
,
()
=>
new
Console
LogService
());
export
const
undoRedoService
=
define
(
IUndoRedoService
,
(
o
)
=>
new
UndoRedoService
(
dialogService
.
get
(
o
),
notificationService
.
get
(
o
)));
...
...
@@ -188,6 +188,7 @@ export class DynamicStandaloneServices extends Disposable {
const
notificationService
=
this
.
get
(
INotificationService
);
const
telemetryService
=
this
.
get
(
ITelemetryService
);
const
themeService
=
this
.
get
(
IThemeService
);
const
logService
=
this
.
get
(
ILogService
);
let
ensure
=
<
T
>
(
serviceId
:
ServiceIdentifier
<
T
>
,
factory
:
()
=>
T
):
T
=>
{
let
value
:
T
|
null
=
null
;
...
...
@@ -209,7 +210,7 @@ export class DynamicStandaloneServices extends Disposable {
let
commandService
=
ensure
(
ICommandService
,
()
=>
new
StandaloneCommandService
(
this
.
_instantiationService
));
let
keybindingService
=
ensure
(
IKeybindingService
,
()
=>
this
.
_register
(
new
StandaloneKeybindingService
(
contextKeyService
,
commandService
,
telemetryService
,
notificationService
,
domElement
)));
let
keybindingService
=
ensure
(
IKeybindingService
,
()
=>
this
.
_register
(
new
StandaloneKeybindingService
(
contextKeyService
,
commandService
,
telemetryService
,
notificationService
,
logService
,
domElement
)));
let
layoutService
=
ensure
(
ILayoutService
,
()
=>
new
SimpleLayoutService
(
StaticServices
.
codeEditorService
.
get
(
ICodeEditorService
),
domElement
));
...
...
src/vs/editor/standalone/test/browser/simpleServices.test.ts
浏览文件 @
0aba6731
...
...
@@ -9,6 +9,7 @@ import { ContextKeyService } from 'vs/platform/contextkey/browser/contextKeyServ
import
{
InstantiationService
}
from
'
vs/platform/instantiation/common/instantiationService
'
;
import
{
ServiceCollection
}
from
'
vs/platform/instantiation/common/serviceCollection
'
;
import
{
IKeyboardEvent
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
NullLogService
}
from
'
vs/platform/log/common/log
'
;
import
{
NullTelemetryService
}
from
'
vs/platform/telemetry/common/telemetryUtils
'
;
suite
(
'
StandaloneKeybindingService
'
,
()
=>
{
...
...
@@ -34,7 +35,7 @@ suite('StandaloneKeybindingService', () => {
let
domElement
=
document
.
createElement
(
'
div
'
);
let
keybindingService
=
new
TestStandaloneKeybindingService
(
contextKeyService
,
commandService
,
NullTelemetryService
,
notificationService
,
domElement
);
let
keybindingService
=
new
TestStandaloneKeybindingService
(
contextKeyService
,
commandService
,
NullTelemetryService
,
notificationService
,
new
NullLogService
(),
domElement
);
let
commandInvoked
=
false
;
keybindingService
.
addDynamicKeybinding
(
'
testCommand
'
,
KeyCode
.
F9
,
()
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录