Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
c6ac991a
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,发现更多精彩内容 >>
提交
c6ac991a
编写于
10月 11, 2017
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - remove apiUsage telemetry
上级
12439dfb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
1 addition
and
48 deletion
+1
-48
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+0
-45
src/vs/workbench/api/node/extHostLanguageFeatures.ts
src/vs/workbench/api/node/extHostLanguageFeatures.ts
+1
-3
未找到文件。
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
c6ac991a
...
...
@@ -81,8 +81,6 @@ export function createApiFactory(
extensionService
:
ExtHostExtensionService
):
IExtensionApiFactory
{
const
mainThreadTelemetry
=
threadService
.
get
(
MainContext
.
MainThreadTelemetry
);
// Addressable instances
const
extHostHeapService
=
threadService
.
set
(
ExtHostContext
.
ExtHostHeapService
,
new
ExtHostHeapService
());
const
extHostDocumentsAndEditors
=
threadService
.
set
(
ExtHostContext
.
ExtHostDocumentsAndEditors
,
new
ExtHostDocumentsAndEditors
(
threadService
));
...
...
@@ -140,29 +138,6 @@ export function createApiFactory(
}
}
const
apiUsage
=
new
class
{
private
_seen
=
new
Set
<
string
>
();
publicLog
(
apiName
:
string
)
{
if
(
this
.
_seen
.
has
(
apiName
))
{
return
undefined
;
}
this
.
_seen
.
add
(
apiName
);
/* __GDPR__
"apiUsage" : {
"name" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"extension": { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"${include}": [
"${MainThreadData}"
]
}
*/
return
mainThreadTelemetry
.
$publicLog
(
'
apiUsage
'
,
{
name
:
apiName
,
extension
:
extension
.
id
});
}
};
// namespace: commands
const
commands
:
typeof
vscode
.
commands
=
{
registerCommand
<
T
>
(
id
:
string
,
command
:
<
T
>
(...
args
:
any
[])
=>
T
|
Thenable
<
T
>
,
thisArgs
?:
any
):
vscode
.
Disposable
{
...
...
@@ -407,22 +382,18 @@ export function createApiFactory(
// namespace: workspace
const
workspace
:
typeof
vscode
.
workspace
=
{
get
rootPath
()
{
apiUsage
.
publicLog
(
'
workspace#rootPath
'
);
return
extHostWorkspace
.
getPath
();
},
set
rootPath
(
value
)
{
throw
errors
.
readonly
();
},
getWorkspaceFolder
(
resource
)
{
apiUsage
.
publicLog
(
'
workspace#getWorkspaceFolder
'
);
return
extHostWorkspace
.
getWorkspaceFolder
(
resource
);
},
get
workspaceFolders
()
{
apiUsage
.
publicLog
(
'
workspace#workspaceFolders
'
);
return
extHostWorkspace
.
getWorkspaceFolders
();
},
onDidChangeWorkspaceFolders
:
function
(
listener
,
thisArgs
?,
disposables
?)
{
apiUsage
.
publicLog
(
'
workspace#onDidChangeWorkspaceFolders
'
);
return
extHostWorkspace
.
onDidChangeWorkspace
(
listener
,
thisArgs
,
disposables
);
},
asRelativePath
:
(
pathOrUri
,
includeWorkspace
)
=>
{
...
...
@@ -505,22 +476,6 @@ export function createApiFactory(
return
extHostSCM
.
getLastInputBox
(
extension
);
},
createSourceControl
(
id
:
string
,
label
:
string
,
rootUri
?:
vscode
.
Uri
)
{
/* __GDPR__
"registerSCMProvider" : {
"extensionId" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" },
"providerId": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" },
"providerLabel": { "classification": "PublicPersonalData", "purpose": "FeatureInsight" },
"${include}": [
"${MainThreadData}"
]
}
*/
mainThreadTelemetry
.
$publicLog
(
'
registerSCMProvider
'
,
{
extensionId
:
extension
.
id
,
providerId
:
id
,
providerLabel
:
label
});
return
extHostSCM
.
createSourceControl
(
extension
,
id
,
label
,
rootUri
);
}
};
...
...
src/vs/workbench/api/node/extHostLanguageFeatures.ts
浏览文件 @
c6ac991a
...
...
@@ -18,7 +18,7 @@ import { ExtHostCommands, CommandsConverter } from 'vs/workbench/api/node/extHos
import
{
ExtHostDiagnostics
}
from
'
vs/workbench/api/node/extHostDiagnostics
'
;
import
{
IWorkspaceSymbolProvider
}
from
'
vs/workbench/parts/search/common/search
'
;
import
{
asWinJsPromise
}
from
'
vs/base/common/async
'
;
import
{
MainContext
,
MainThread
TelemetryShape
,
MainThread
LanguageFeaturesShape
,
ExtHostLanguageFeaturesShape
,
ObjectIdentifier
,
IRawColorInfo
,
IMainContext
,
IExtHostSuggestResult
,
IExtHostSuggestion
}
from
'
./extHost.protocol
'
;
import
{
MainContext
,
MainThreadLanguageFeaturesShape
,
ExtHostLanguageFeaturesShape
,
ObjectIdentifier
,
IRawColorInfo
,
IMainContext
,
IExtHostSuggestResult
,
IExtHostSuggestion
}
from
'
./extHost.protocol
'
;
import
{
regExpLeadsToEndlessLoop
}
from
'
vs/base/common/strings
'
;
import
{
IPosition
}
from
'
vs/editor/common/core/position
'
;
import
{
IRange
}
from
'
vs/editor/common/core/range
'
;
...
...
@@ -748,7 +748,6 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
private
static
_handlePool
:
number
=
0
;
private
_proxy
:
MainThreadLanguageFeaturesShape
;
private
_telemetry
:
MainThreadTelemetryShape
;
private
_documents
:
ExtHostDocuments
;
private
_commands
:
ExtHostCommands
;
private
_heapService
:
ExtHostHeapService
;
...
...
@@ -764,7 +763,6 @@ export class ExtHostLanguageFeatures implements ExtHostLanguageFeaturesShape {
diagnostics
:
ExtHostDiagnostics
)
{
this
.
_proxy
=
mainContext
.
get
(
MainContext
.
MainThreadLanguageFeatures
);
this
.
_telemetry
=
mainContext
.
get
(
MainContext
.
MainThreadTelemetry
);
this
.
_documents
=
documents
;
this
.
_commands
=
commands
;
this
.
_heapService
=
heapMonitor
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录