Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
643e569a
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,发现更多精彩内容 >>
提交
643e569a
编写于
9月 25, 2017
作者:
D
Dirk Baeumer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes #34966: Task list doesn't update when gulp, grunt or jake file changes.
上级
67b56123
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
57 deletion
+3
-57
extensions/grunt/src/main.ts
extensions/grunt/src/main.ts
+1
-19
extensions/gulp/src/main.ts
extensions/gulp/src/main.ts
+1
-19
extensions/jake/src/main.ts
extensions/jake/src/main.ts
+1
-19
未找到文件。
extensions/grunt/src/main.ts
浏览文件 @
643e569a
...
...
@@ -205,7 +205,6 @@ class TaskDetector {
private
taskProvider
:
vscode
.
Disposable
|
undefined
;
private
detectors
:
Map
<
string
,
FolderDetector
>
=
new
Map
();
private
promise
:
Promise
<
vscode
.
Task
[]
>
|
undefined
;
constructor
()
{
}
...
...
@@ -225,15 +224,12 @@ class TaskDetector {
this
.
taskProvider
=
undefined
;
}
this
.
detectors
.
clear
();
this
.
promise
=
undefined
;
}
private
updateWorkspaceFolders
(
added
:
vscode
.
WorkspaceFolder
[],
removed
:
vscode
.
WorkspaceFolder
[]):
void
{
let
changed
=
false
;
for
(
let
remove
of
removed
)
{
let
detector
=
this
.
detectors
.
get
(
remove
.
uri
.
toString
());
if
(
detector
)
{
changed
=
true
;
detector
.
dispose
();
this
.
detectors
.
delete
(
remove
.
uri
.
toString
());
}
...
...
@@ -241,22 +237,16 @@ class TaskDetector {
for
(
let
add
of
added
)
{
let
detector
=
new
FolderDetector
(
add
);
if
(
detector
.
isEnabled
())
{
changed
=
true
;
this
.
detectors
.
set
(
add
.
uri
.
toString
(),
detector
);
detector
.
start
();
}
}
if
(
changed
)
{
this
.
promise
=
undefined
;
}
this
.
updateProvider
();
}
private
updateConfiguration
():
void
{
let
changed
=
false
;
for
(
let
detector
of
this
.
detectors
.
values
())
{
if
(
!
detector
.
isEnabled
())
{
changed
=
true
;
detector
.
dispose
();
this
.
detectors
.
delete
(
detector
.
workspaceFolder
.
uri
.
toString
());
}
...
...
@@ -267,16 +257,12 @@ class TaskDetector {
if
(
!
this
.
detectors
.
has
(
folder
.
uri
.
toString
()))
{
let
detector
=
new
FolderDetector
(
folder
);
if
(
detector
.
isEnabled
())
{
changed
=
true
;
this
.
detectors
.
set
(
folder
.
uri
.
toString
(),
detector
);
detector
.
start
();
}
}
}
}
if
(
changed
)
{
this
.
promise
=
undefined
;
}
this
.
updateProvider
();
}
...
...
@@ -294,15 +280,11 @@ class TaskDetector {
else
if
(
this
.
taskProvider
&&
this
.
detectors
.
size
===
0
)
{
this
.
taskProvider
.
dispose
();
this
.
taskProvider
=
undefined
;
this
.
promise
=
undefined
;
}
}
public
getTasks
():
Promise
<
vscode
.
Task
[]
>
{
if
(
!
this
.
promise
)
{
this
.
promise
=
this
.
computeTasks
();
}
return
this
.
promise
;
return
this
.
computeTasks
();
}
private
computeTasks
():
Promise
<
vscode
.
Task
[]
>
{
...
...
extensions/gulp/src/main.ts
浏览文件 @
643e569a
...
...
@@ -177,7 +177,6 @@ class TaskDetector {
private
taskProvider
:
vscode
.
Disposable
|
undefined
;
private
detectors
:
Map
<
string
,
FolderDetector
>
=
new
Map
();
private
promise
:
Promise
<
vscode
.
Task
[]
>
|
undefined
;
constructor
()
{
}
...
...
@@ -197,15 +196,12 @@ class TaskDetector {
this
.
taskProvider
=
undefined
;
}
this
.
detectors
.
clear
();
this
.
promise
=
undefined
;
}
private
updateWorkspaceFolders
(
added
:
vscode
.
WorkspaceFolder
[],
removed
:
vscode
.
WorkspaceFolder
[]):
void
{
let
changed
=
false
;
for
(
let
remove
of
removed
)
{
let
detector
=
this
.
detectors
.
get
(
remove
.
uri
.
toString
());
if
(
detector
)
{
changed
=
true
;
detector
.
dispose
();
this
.
detectors
.
delete
(
remove
.
uri
.
toString
());
}
...
...
@@ -213,22 +209,16 @@ class TaskDetector {
for
(
let
add
of
added
)
{
let
detector
=
new
FolderDetector
(
add
);
if
(
detector
.
isEnabled
())
{
changed
=
true
;
this
.
detectors
.
set
(
add
.
uri
.
toString
(),
detector
);
detector
.
start
();
}
}
if
(
changed
)
{
this
.
promise
=
undefined
;
}
this
.
updateProvider
();
}
private
updateConfiguration
():
void
{
let
changed
=
false
;
for
(
let
detector
of
this
.
detectors
.
values
())
{
if
(
!
detector
.
isEnabled
())
{
changed
=
true
;
detector
.
dispose
();
this
.
detectors
.
delete
(
detector
.
workspaceFolder
.
uri
.
toString
());
}
...
...
@@ -239,16 +229,12 @@ class TaskDetector {
if
(
!
this
.
detectors
.
has
(
folder
.
uri
.
toString
()))
{
let
detector
=
new
FolderDetector
(
folder
);
if
(
detector
.
isEnabled
())
{
changed
=
true
;
this
.
detectors
.
set
(
folder
.
uri
.
toString
(),
detector
);
detector
.
start
();
}
}
}
}
if
(
changed
)
{
this
.
promise
=
undefined
;
}
this
.
updateProvider
();
}
...
...
@@ -266,15 +252,11 @@ class TaskDetector {
else
if
(
this
.
taskProvider
&&
this
.
detectors
.
size
===
0
)
{
this
.
taskProvider
.
dispose
();
this
.
taskProvider
=
undefined
;
this
.
promise
=
undefined
;
}
}
public
getTasks
():
Promise
<
vscode
.
Task
[]
>
{
if
(
!
this
.
promise
)
{
this
.
promise
=
this
.
computeTasks
();
}
return
this
.
promise
;
return
this
.
computeTasks
();
}
private
computeTasks
():
Promise
<
vscode
.
Task
[]
>
{
...
...
extensions/jake/src/main.ts
浏览文件 @
643e569a
...
...
@@ -182,7 +182,6 @@ class TaskDetector {
private
taskProvider
:
vscode
.
Disposable
|
undefined
;
private
detectors
:
Map
<
string
,
FolderDetector
>
=
new
Map
();
private
promise
:
Promise
<
vscode
.
Task
[]
>
|
undefined
;
constructor
()
{
}
...
...
@@ -202,15 +201,12 @@ class TaskDetector {
this
.
taskProvider
=
undefined
;
}
this
.
detectors
.
clear
();
this
.
promise
=
undefined
;
}
private
updateWorkspaceFolders
(
added
:
vscode
.
WorkspaceFolder
[],
removed
:
vscode
.
WorkspaceFolder
[]):
void
{
let
changed
=
false
;
for
(
let
remove
of
removed
)
{
let
detector
=
this
.
detectors
.
get
(
remove
.
uri
.
toString
());
if
(
detector
)
{
changed
=
true
;
detector
.
dispose
();
this
.
detectors
.
delete
(
remove
.
uri
.
toString
());
}
...
...
@@ -218,22 +214,16 @@ class TaskDetector {
for
(
let
add
of
added
)
{
let
detector
=
new
FolderDetector
(
add
);
if
(
detector
.
isEnabled
())
{
changed
=
true
;
this
.
detectors
.
set
(
add
.
uri
.
toString
(),
detector
);
detector
.
start
();
}
}
if
(
changed
)
{
this
.
promise
=
undefined
;
}
this
.
updateProvider
();
}
private
updateConfiguration
():
void
{
let
changed
=
false
;
for
(
let
detector
of
this
.
detectors
.
values
())
{
if
(
!
detector
.
isEnabled
())
{
changed
=
true
;
detector
.
dispose
();
this
.
detectors
.
delete
(
detector
.
workspaceFolder
.
uri
.
toString
());
}
...
...
@@ -244,16 +234,12 @@ class TaskDetector {
if
(
!
this
.
detectors
.
has
(
folder
.
uri
.
toString
()))
{
let
detector
=
new
FolderDetector
(
folder
);
if
(
detector
.
isEnabled
())
{
changed
=
true
;
this
.
detectors
.
set
(
folder
.
uri
.
toString
(),
detector
);
detector
.
start
();
}
}
}
}
if
(
changed
)
{
this
.
promise
=
undefined
;
}
this
.
updateProvider
();
}
...
...
@@ -271,15 +257,11 @@ class TaskDetector {
else
if
(
this
.
taskProvider
&&
this
.
detectors
.
size
===
0
)
{
this
.
taskProvider
.
dispose
();
this
.
taskProvider
=
undefined
;
this
.
promise
=
undefined
;
}
}
public
getTasks
():
Promise
<
vscode
.
Task
[]
>
{
if
(
!
this
.
promise
)
{
this
.
promise
=
this
.
computeTasks
();
}
return
this
.
promise
;
return
this
.
computeTasks
();
}
private
computeTasks
():
Promise
<
vscode
.
Task
[]
>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录