Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ec3c0834
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,发现更多精彩内容 >>
未验证
提交
ec3c0834
编写于
3月 14, 2018
作者:
S
Sandeep Somavarapu
提交者:
GitHub
3月 14, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #45593 from rsalvador/counters
Make problem counters consistent, fixes #45592
上级
b64faa99
205a503e
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
20 addition
and
17 deletion
+20
-17
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
...rkbench/parts/tasks/electron-browser/task.contribution.ts
+20
-17
未找到文件。
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
浏览文件 @
ec3c0834
...
...
@@ -137,11 +137,14 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
const
info
=
document
.
createElement
(
'
div
'
);
const
building
=
document
.
createElement
(
'
div
'
);
const
errorTitle
=
n
=>
nls
.
localize
(
'
totalErrors
'
,
"
{0} Errors
"
,
n
);
const
warningTitle
=
n
=>
nls
.
localize
(
'
totalWarnings
'
,
"
{0} Warnings
"
,
n
);
const
infoTitle
=
n
=>
nls
.
localize
(
'
totalInfos
'
,
"
{0} Infos
"
,
n
);
Dom
.
addClass
(
element
,
'
task-statusbar-item
'
);
Dom
.
addClass
(
label
,
'
task-statusbar-item-label
'
);
element
.
appendChild
(
label
);
element
.
title
=
nls
.
localize
(
'
problems
'
,
"
Problems
"
);
Dom
.
addClass
(
errorIcon
,
'
task-statusbar-item-label-error
'
);
Dom
.
addClass
(
errorIcon
,
'
mask-icon
'
);
...
...
@@ -150,6 +153,7 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
Dom
.
addClass
(
error
,
'
task-statusbar-item-label-counter
'
);
error
.
innerHTML
=
'
0
'
;
error
.
title
=
errorIcon
.
title
=
errorTitle
(
0
);
label
.
appendChild
(
error
);
Dom
.
addClass
(
warningIcon
,
'
task-statusbar-item-label-warning
'
);
...
...
@@ -159,6 +163,7 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
Dom
.
addClass
(
warning
,
'
task-statusbar-item-label-counter
'
);
warning
.
innerHTML
=
'
0
'
;
warning
.
title
=
warningIcon
.
title
=
warningTitle
(
0
);
label
.
appendChild
(
warning
);
Dom
.
addClass
(
infoIcon
,
'
task-statusbar-item-label-info
'
);
...
...
@@ -186,26 +191,24 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
}
}));
let
updateStatus
=
(
element
:
HTMLDivElement
,
icon
:
HTMLDivElement
,
stats
:
number
):
boolean
=>
{
if
(
stats
>
0
)
{
element
.
innerHTML
=
stats
.
toString
();
$
(
element
).
show
();
$
(
icon
).
show
();
return
true
;
const
manyProblems
=
nls
.
localize
(
'
manyProblems
'
,
"
10K+
"
);
const
packNumber
=
n
=>
n
>
9999
?
manyProblems
:
n
>
999
?
n
.
toString
().
charAt
(
0
)
+
'
K
'
:
n
.
toString
();
let
updateLabel
=
(
stats
:
MarkerStatistics
)
=>
{
error
.
innerHTML
=
packNumber
(
stats
.
errors
);
error
.
title
=
errorIcon
.
title
=
errorTitle
(
stats
.
errors
);
warning
.
innerHTML
=
packNumber
(
stats
.
warnings
);
warning
.
title
=
warningIcon
.
title
=
warningTitle
(
stats
.
warnings
);
if
(
stats
.
infos
>
0
)
{
info
.
innerHTML
=
packNumber
(
stats
.
infos
);
info
.
title
=
infoIcon
.
title
=
infoTitle
(
stats
.
infos
);
$
(
info
).
show
();
$
(
infoIcon
).
show
();
}
else
{
$
(
element
).
hide
();
$
(
icon
).
hide
();
return
false
;
$
(
info
).
hide
();
$
(
infoIcon
).
hide
();
}
};
let
manyMarkers
=
nls
.
localize
(
'
manyMarkers
'
,
"
99+
"
);
let
updateLabel
=
(
stats
:
MarkerStatistics
)
=>
{
error
.
innerHTML
=
stats
.
errors
<
100
?
stats
.
errors
.
toString
()
:
manyMarkers
;
warning
.
innerHTML
=
stats
.
warnings
<
100
?
stats
.
warnings
.
toString
()
:
manyMarkers
;
updateStatus
(
info
,
infoIcon
,
stats
.
infos
);
};
this
.
markerService
.
onMarkerChanged
((
changedResources
)
=>
{
updateLabel
(
this
.
markerService
.
getStatistics
());
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录