Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
8bf5e263
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
8bf5e263
编写于
11月 07, 2017
作者:
D
Dirk Baeumer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes #7353: Running build task in Code approximately 50% slower than in terminal
上级
ab17bb71
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
11 addition
and
32 deletion
+11
-32
src/vs/workbench/parts/tasks/electron-browser/media/task.contribution.css
.../parts/tasks/electron-browser/media/task.contribution.css
+1
-3
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
...rkbench/parts/tasks/electron-browser/task.contribution.ts
+10
-29
未找到文件。
src/vs/workbench/parts/tasks/electron-browser/media/task.contribution.css
浏览文件 @
8bf5e263
...
...
@@ -32,8 +32,7 @@
vertical-align
:
top
;
}
.task-statusbar-item-progress
{
width
:
6px
;
.task-statusbar-item-building
{
height
:
18px
;
padding
:
0px
2px
0px
2px
;
display
:
inline-block
;
...
...
@@ -44,7 +43,6 @@
.task-statusbar-item-label
{
display
:
inline-block
;
cursor
:
pointer
;
padding
:
0
5px
0
0
;
}
.task-statusbar-item-label
>
.task-statusbar-item-label-counter
{
...
...
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
浏览文件 @
8bf5e263
...
...
@@ -136,9 +136,7 @@ class ViewTerminalAction extends Action {
}
class
BuildStatusBarItem
extends
Themable
implements
IStatusbarItem
{
private
intervalToken
:
any
;
private
activeCount
:
number
;
private
static
progressChars
:
string
=
'
|/-
\\
'
;
private
icons
:
HTMLElement
[];
constructor
(
...
...
@@ -174,7 +172,6 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
let
callOnDispose
:
IDisposable
[]
=
[];
const
element
=
document
.
createElement
(
'
div
'
);
const
progress
=
document
.
createElement
(
'
div
'
);
const
label
=
document
.
createElement
(
'
a
'
);
const
errorIcon
=
document
.
createElement
(
'
div
'
);
const
warningIcon
=
document
.
createElement
(
'
div
'
);
...
...
@@ -182,14 +179,10 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
const
error
=
document
.
createElement
(
'
div
'
);
const
warning
=
document
.
createElement
(
'
div
'
);
const
info
=
document
.
createElement
(
'
div
'
);
const
building
=
document
.
createElement
(
'
div
'
);
Dom
.
addClass
(
element
,
'
task-statusbar-item
'
);
Dom
.
addClass
(
progress
,
'
task-statusbar-item-progress
'
);
element
.
appendChild
(
progress
);
progress
.
innerHTML
=
BuildStatusBarItem
.
progressChars
[
0
];
$
(
progress
).
hide
();
Dom
.
addClass
(
label
,
'
task-statusbar-item-label
'
);
element
.
appendChild
(
label
);
element
.
title
=
nls
.
localize
(
'
problems
'
,
"
Problems
"
);
...
...
@@ -222,6 +215,12 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
label
.
appendChild
(
info
);
$
(
info
).
hide
();
Dom
.
addClass
(
building
,
'
task-statusbar-item-building
'
);
element
.
appendChild
(
building
);
building
.
innerHTML
=
nls
.
localize
(
'
building
'
,
'
Building...
'
);
$
(
building
).
hide
();
callOnDispose
.
push
(
Dom
.
addDisposableListener
(
label
,
'
click
'
,
(
e
:
MouseEvent
)
=>
{
const
panel
=
this
.
panelService
.
getActivePanel
();
if
(
panel
&&
panel
.
getId
()
===
Constants
.
MARKERS_PANEL_ID
)
{
...
...
@@ -261,17 +260,7 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
}
this
.
activeCount
++
;
if
(
this
.
activeCount
===
1
)
{
let
index
=
1
;
let
chars
=
BuildStatusBarItem
.
progressChars
;
progress
.
innerHTML
=
chars
[
0
];
this
.
intervalToken
=
setInterval
(()
=>
{
progress
.
innerHTML
=
chars
[
index
];
index
++
;
if
(
index
>=
chars
.
length
)
{
index
=
0
;
}
},
50
);
$
(
progress
).
show
();
$
(
building
).
show
();
}
}));
...
...
@@ -284,11 +273,7 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
if
(
this
.
activeCount
>
0
)
{
this
.
activeCount
--
;
if
(
this
.
activeCount
===
0
)
{
$
(
progress
).
hide
();
if
(
this
.
intervalToken
)
{
clearInterval
(
this
.
intervalToken
);
this
.
intervalToken
=
null
;
}
$
(
building
).
hide
();
}
}
}));
...
...
@@ -298,11 +283,7 @@ class BuildStatusBarItem extends Themable implements IStatusbarItem {
return
;
}
if
(
this
.
activeCount
!==
0
)
{
$
(
progress
).
hide
();
if
(
this
.
intervalToken
)
{
clearInterval
(
this
.
intervalToken
);
this
.
intervalToken
=
null
;
}
$
(
building
).
hide
();
this
.
activeCount
=
0
;
}
}));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录