Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
78cc8788
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,发现更多精彩内容 >>
提交
78cc8788
编写于
8月 23, 2017
作者:
R
Ramya Rao
提交者:
GitHub
8月 23, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Telemetry for Ext recommendations pop ups (#32995)
上级
b5cbff49
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
17 addition
and
4 deletion
+17
-4
src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts
...parts/extensions/electron-browser/extensionTipsService.ts
+17
-4
未找到文件。
src/vs/workbench/parts/extensions/electron-browser/extensionTipsService.ts
浏览文件 @
78cc8788
...
...
@@ -25,6 +25,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import
{
IExtensionsConfiguration
,
ConfigurationKey
}
from
'
vs/workbench/parts/extensions/common/extensions
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationEditingService
,
ConfigurationTarget
}
from
'
vs/workbench/services/configuration/common/configurationEditing
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
interface
IExtensionsContent
{
recommendations
:
string
[];
...
...
@@ -54,7 +55,8 @@ export class ExtensionTipsService implements IExtensionTipsService {
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
IConfigurationService
private
configurationService
:
IConfigurationService
,
@
IConfigurationEditingService
private
configurationEditingService
:
IConfigurationEditingService
,
@
IMessageService
private
messageService
:
IMessageService
@
IMessageService
private
messageService
:
IMessageService
,
@
ITelemetryService
private
telemetryService
:
ITelemetryService
)
{
if
(
!
this
.
_galleryService
.
isEnabled
())
{
return
;
...
...
@@ -198,15 +200,20 @@ export class ExtensionTipsService implements IExtensionTipsService {
this
.
choiceService
.
choose
(
Severity
.
Info
,
message
,
options
,
2
).
done
(
choice
=>
{
switch
(
choice
)
{
case
0
:
return
recommendationsAction
.
run
();
case
0
:
this
.
telemetryService
.
publicLog
(
'
extensionRecommendations:popup
'
,
{
userReaction
:
'
show
'
});
return
recommendationsAction
.
run
();
case
1
:
this
.
importantRecommendationsIgnoreList
.
push
(
id
);
this
.
storageService
.
store
(
'
extensionsAssistant/importantRecommendationsIgnore
'
,
JSON
.
stringify
(
this
.
importantRecommendationsIgnoreList
),
StorageScope
.
GLOBAL
);
this
.
telemetryService
.
publicLog
(
'
extensionRecommendations:popup
'
,
{
userReaction
:
'
neverShowAgain
'
});
return
this
.
ignoreExtensionRecommendations
();
}
},
()
=>
{
this
.
telemetryService
.
publicLog
(
'
extensionRecommendations:popup
'
,
{
userReaction
:
'
cancelled
'
});
});
});
});
...
...
@@ -249,9 +256,15 @@ export class ExtensionTipsService implements IExtensionTipsService {
this
.
choiceService
.
choose
(
Severity
.
Info
,
message
,
options
,
2
).
done
(
choice
=>
{
switch
(
choice
)
{
case
0
:
return
action
.
run
();
case
1
:
return
this
.
storageService
.
store
(
storageKey
,
true
,
StorageScope
.
WORKSPACE
);
}
case
0
:
this
.
telemetryService
.
publicLog
(
'
extensionWorkspaceRecommendations:popup
'
,
{
userReaction
:
'
show
'
});
return
action
.
run
();
case
1
:
this
.
telemetryService
.
publicLog
(
'
extensionWorkspaceRecommendations:popup
'
,
{
userReaction
:
'
neverShowAgain
'
});
return
this
.
storageService
.
store
(
storageKey
,
true
,
StorageScope
.
WORKSPACE
);
}
},
()
=>
{
this
.
telemetryService
.
publicLog
(
'
extensionWorkspaceRecommendations:popup
'
,
{
userReaction
:
'
cancelled
'
});
});
});
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录