Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
262134cf
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
262134cf
编写于
3月 20, 2018
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reduce extension host IInitData
上级
f8007cd6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
9 addition
and
17 deletion
+9
-17
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+1
-3
src/vs/workbench/api/node/extHostExtensionService.ts
src/vs/workbench/api/node/extHostExtensionService.ts
+1
-3
src/vs/workbench/api/node/extHostLogService.ts
src/vs/workbench/api/node/extHostLogService.ts
+3
-4
src/vs/workbench/node/extensionHostMain.ts
src/vs/workbench/node/extensionHostMain.ts
+2
-4
src/vs/workbench/services/extensions/electron-browser/extensionHost.ts
...nch/services/extensions/electron-browser/extensionHost.ts
+2
-3
未找到文件。
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
262134cf
...
...
@@ -44,7 +44,6 @@ import { IDisposable } from 'vs/base/common/lifecycle';
import
{
SerializedError
}
from
'
vs/base/common/errors
'
;
import
{
IStat
,
FileChangeType
}
from
'
vs/platform/files/common/files
'
;
import
{
ConfigurationScope
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
ParsedArgs
}
from
'
vs/platform/environment/common/environment
'
;
import
{
CommentRule
,
CharacterPair
,
EnterAction
}
from
'
vs/editor/common/modes/languageConfiguration
'
;
import
{
ISingleEditOperation
}
from
'
vs/editor/common/model
'
;
import
{
ILineMatch
,
IPatternInfo
}
from
'
vs/platform/search/common/search
'
;
...
...
@@ -77,9 +76,8 @@ export interface IInitData {
configuration
:
IConfigurationInitData
;
telemetryInfo
:
ITelemetryInfo
;
windowId
:
number
;
args
:
ParsedArgs
;
execPath
:
string
;
logLevel
:
LogLevel
;
logsPath
:
string
;
}
export
interface
IConfigurationInitData
extends
IConfigurationData
{
...
...
src/vs/workbench/api/node/extHostExtensionService.ts
浏览文件 @
262134cf
...
...
@@ -20,7 +20,6 @@ import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace';
import
{
TernarySearchTree
}
from
'
vs/base/common/map
'
;
import
{
Barrier
}
from
'
vs/base/common/async
'
;
import
{
ILogService
}
from
'
vs/platform/log/common/log
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
ExtHostLogService
}
from
'
vs/workbench/api/node/extHostLogService
'
;
import
URI
from
'
vs/base/common/uri
'
;
...
...
@@ -140,8 +139,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
extHostContext
:
IExtHostContext
,
extHostWorkspace
:
ExtHostWorkspace
,
extHostConfiguration
:
ExtHostConfiguration
,
extHostLogService
:
ExtHostLogService
,
environmentService
:
IEnvironmentService
extHostLogService
:
ExtHostLogService
)
{
this
.
_barrier
=
new
Barrier
();
this
.
_registry
=
new
ExtensionDescriptionRegistry
(
initData
.
extensions
);
...
...
src/vs/workbench/api/node/extHostLogService.ts
浏览文件 @
262134cf
...
...
@@ -9,7 +9,6 @@ import { join } from 'vs/base/common/paths';
import
{
LogLevel
}
from
'
vs/workbench/api/node/extHostTypes
'
;
import
{
ILogService
,
DelegatedLogService
}
from
'
vs/platform/log/common/log
'
;
import
{
createSpdLogService
}
from
'
vs/platform/log/node/spdlogService
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
ExtHostLogServiceShape
}
from
'
vs/workbench/api/node/extHost.protocol
'
;
...
...
@@ -20,9 +19,9 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic
constructor
(
private
_windowId
:
number
,
logLevel
:
LogLevel
,
private
_
environmentService
:
IEnvironmentService
private
_
logsPath
:
string
)
{
super
(
createSpdLogService
(
`exthost
${
_windowId
}
`
,
logLevel
,
_
environmentService
.
logsPath
));
super
(
createSpdLogService
(
`exthost
${
_windowId
}
`
,
logLevel
,
_logsPath
));
}
$setLevel
(
level
:
LogLevel
):
void
{
...
...
@@ -39,7 +38,7 @@ export class ExtHostLogService extends DelegatedLogService implements ILogServic
}
getLogDirectory
(
extensionID
:
string
):
string
{
return
join
(
this
.
_
environmentService
.
logsPath
,
`
${
extensionID
}
_
${
this
.
_windowId
}
`
);
return
join
(
this
.
_logsPath
,
`
${
extensionID
}
_
${
this
.
_windowId
}
`
);
}
private
createLogger
(
extensionID
:
string
):
ExtHostLogger
{
...
...
src/vs/workbench/node/extensionHostMain.ts
浏览文件 @
262134cf
...
...
@@ -20,7 +20,6 @@ import * as errors from 'vs/base/common/errors';
import
*
as
watchdog
from
'
native-watchdog
'
;
import
*
as
glob
from
'
vs/base/common/glob
'
;
import
{
ExtensionActivatedByEvent
}
from
'
vs/workbench/api/node/extHostExtensionActivator
'
;
import
{
EnvironmentService
}
from
'
vs/platform/environment/node/environmentService
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IMessagePassingProtocol
}
from
'
vs/base/parts/ipc/common/ipc
'
;
import
{
RPCProtocol
}
from
'
vs/workbench/services/extensions/node/rpcProtocol
'
;
...
...
@@ -89,8 +88,7 @@ export class ExtensionHostMain {
// services
const
rpcProtocol
=
new
RPCProtocol
(
protocol
);
const
environmentService
=
new
EnvironmentService
(
initData
.
args
,
initData
.
execPath
);
this
.
_extHostLogService
=
new
ExtHostLogService
(
initData
.
windowId
,
initData
.
logLevel
,
environmentService
);
this
.
_extHostLogService
=
new
ExtHostLogService
(
initData
.
windowId
,
initData
.
logLevel
,
initData
.
logsPath
);
this
.
disposables
.
push
(
this
.
_extHostLogService
);
const
extHostWorkspace
=
new
ExtHostWorkspace
(
rpcProtocol
,
initData
.
workspace
,
this
.
_extHostLogService
);
...
...
@@ -98,7 +96,7 @@ export class ExtensionHostMain {
this
.
_extHostLogService
.
trace
(
'
initData
'
,
initData
);
this
.
_extHostConfiguration
=
new
ExtHostConfiguration
(
rpcProtocol
.
getProxy
(
MainContext
.
MainThreadConfiguration
),
extHostWorkspace
,
initData
.
configuration
);
this
.
_extensionService
=
new
ExtHostExtensionService
(
initData
,
rpcProtocol
,
extHostWorkspace
,
this
.
_extHostConfiguration
,
this
.
_extHostLogService
,
environmentService
);
this
.
_extensionService
=
new
ExtHostExtensionService
(
initData
,
rpcProtocol
,
extHostWorkspace
,
this
.
_extHostConfiguration
,
this
.
_extHostLogService
);
// error forwarding and stack trace scanning
Error
.
stackTraceLimit
=
100
;
// increase number of stack frames (from 10, https://github.com/v8/v8/wiki/Stack-Trace-API)
...
...
src/vs/workbench/services/extensions/electron-browser/extensionHost.ts
浏览文件 @
262134cf
...
...
@@ -381,10 +381,9 @@ export class ExtensionHostProcessWorker {
// Send configurations scopes only in development mode.
configuration
:
!
this
.
_environmentService
.
isBuilt
||
this
.
_environmentService
.
isExtensionDevelopment
?
{
...
configurationData
,
configurationScopes
:
getScopes
()
}
:
configurationData
,
telemetryInfo
,
args
:
this
.
_environmentService
.
args
,
execPath
:
this
.
_environmentService
.
execPath
,
windowId
:
this
.
_windowService
.
getCurrentWindowId
(),
logLevel
:
this
.
_logService
.
getLevel
()
logLevel
:
this
.
_logService
.
getLevel
(),
logsPath
:
this
.
_environmentService
.
logsPath
};
return
r
;
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录