Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b5ae9438
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,发现更多精彩内容 >>
提交
b5ae9438
编写于
6月 26, 2017
作者:
D
Dirk Baeumer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixes #29013: Tasks 2.0 integration with launch.json
上级
a5248f36
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
23 addition
and
6 deletion
+23
-6
src/vs/workbench/parts/debug/electron-browser/debugService.ts
...vs/workbench/parts/debug/electron-browser/debugService.ts
+4
-5
src/vs/workbench/parts/tasks/common/taskService.ts
src/vs/workbench/parts/tasks/common/taskService.ts
+4
-0
src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts
...s/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts
+7
-0
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
...rkbench/parts/tasks/electron-browser/task.contribution.ts
+8
-1
未找到文件。
src/vs/workbench/parts/debug/electron-browser/debugService.ts
浏览文件 @
b5ae9438
...
...
@@ -855,9 +855,8 @@ export class DebugService implements debug.IDebugService {
}
// run a task before starting a debug session
return
this
.
taskService
.
tasks
().
then
(
descriptions
=>
{
const
filteredTasks
=
descriptions
.
filter
(
task
=>
task
.
name
===
taskName
);
if
(
filteredTasks
.
length
!==
1
)
{
return
this
.
taskService
.
getTask
(
taskName
).
then
(
task
=>
{
if
(
!
task
)
{
return
TPromise
.
wrapError
(
errors
.
create
(
nls
.
localize
(
'
DebugTaskNotFound
'
,
"
Could not find the preLaunchTask
\
'{0}
\
'.
"
,
taskName
)));
}
...
...
@@ -872,14 +871,14 @@ export class DebugService implements debug.IDebugService {
}
// no task running, execute the preLaunchTask.
const
taskPromise
=
this
.
taskService
.
run
(
filteredTasks
[
0
]
).
then
(
result
=>
{
const
taskPromise
=
this
.
taskService
.
run
(
task
).
then
(
result
=>
{
this
.
lastTaskEvent
=
null
;
return
result
;
},
err
=>
{
this
.
lastTaskEvent
=
null
;
});
if
(
filteredTasks
[
0
]
.
isBackground
)
{
if
(
task
.
isBackground
)
{
return
new
TPromise
((
c
,
e
)
=>
this
.
taskService
.
addOneTimeListener
(
TaskServiceEvents
.
Inactive
,
()
=>
c
(
null
)));
}
...
...
src/vs/workbench/parts/tasks/common/taskService.ts
浏览文件 @
b5ae9438
...
...
@@ -42,6 +42,10 @@ export interface ITaskService extends IEventEmitter {
terminate
(
task
:
string
|
Task
):
TPromise
<
TaskTerminateResponse
>
;
terminateAll
():
TPromise
<
TaskTerminateResponse
[]
>
;
tasks
():
TPromise
<
Task
[]
>
;
/**
* @param identifier The task's name, label or defined identifier.
*/
getTask
(
identifier
:
string
):
TPromise
<
Task
>
;
getTasksForGroup
(
group
:
string
):
TPromise
<
Task
[]
>
;
getRecentlyUsedTasks
():
LinkedMap
<
string
,
string
>
;
...
...
src/vs/workbench/parts/tasks/electron-browser/jsonSchema_v2.ts
浏览文件 @
b5ae9438
...
...
@@ -139,6 +139,11 @@ const version: IJSONSchema = {
description
:
nls
.
localize
(
'
JsonSchema.version
'
,
'
The config
\'
s version number.
'
)
};
const
identifier
:
IJSONSchema
=
{
type
:
'
string
'
,
description
:
nls
.
localize
(
'
JsonSchema.tasks.identifier
'
,
'
A user defined identifier to reference the task in launch.json or a dependsOn clause.
'
)
};
let
taskConfiguration
:
IJSONSchema
=
{
type
:
'
object
'
,
additionalProperties
:
false
,
...
...
@@ -152,6 +157,7 @@ let taskConfiguration: IJSONSchema = {
description
:
nls
.
localize
(
'
JsonSchema.tasks.taskName
'
,
'
The task
\'
s name
'
),
deprecationMessage
:
nls
.
localize
(
'
JsonSchema.tasks.taskName.deprecated
'
,
'
The task
\'
s name property is deprecated. Use the label property instead.
'
)
},
identifier
:
Objects
.
deepClone
(
identifier
),
group
:
Objects
.
deepClone
(
group
),
isBackground
:
{
type
:
'
boolean
'
,
...
...
@@ -204,6 +210,7 @@ let definitions = Objects.deepClone(commonSchema.definitions);
let
taskDescription
:
IJSONSchema
=
definitions
.
taskDescription
;
taskDescription
.
properties
.
isShellCommand
=
Objects
.
deepClone
(
shellCommand
);
taskDescription
.
properties
.
dependsOn
=
dependsOn
;
taskDescription
.
properties
.
identifier
=
Objects
.
deepClone
(
identifier
);
definitions
.
showOutputType
.
deprecationMessage
=
nls
.
localize
(
'
JsonSchema.tasks.showOputput.deprecated
'
,
'
The property showOutput is deprecated. Use the reveal property inside the presentation property instead. See also the 1.14 release notes.
'
...
...
src/vs/workbench/parts/tasks/electron-browser/task.contribution.ts
浏览文件 @
b5ae9438
...
...
@@ -681,6 +681,13 @@ class TaskService extends EventEmitter implements ITaskService {
return
this
.
_providers
.
delete
(
handle
);
}
public
getTask
(
identifier
:
string
):
TPromise
<
Task
>
{
return
this
.
getTaskSets
().
then
((
sets
)
=>
{
let
resolver
=
this
.
createResolver
(
sets
);
return
resolver
.
resolve
(
identifier
);
});
}
public
tasks
():
TPromise
<
Task
[]
>
{
return
this
.
getTaskSets
().
then
((
sets
)
=>
{
let
result
:
Task
[]
=
[];
...
...
@@ -1697,7 +1704,7 @@ schema.definitions = {
...
schemaVersion1
.
definitions
,
...
schemaVersion2
.
definitions
,
};
schema
.
oneOf
=
[...
schemaVersion
1
.
oneOf
,
...
schemaVersion2
.
oneOf
];
schema
.
oneOf
=
[...
schemaVersion
2
.
oneOf
,
...
schemaVersion1
.
oneOf
];
let
jsonRegistry
=
<
jsonContributionRegistry
.
IJSONContributionRegistry
>
Registry
.
as
(
jsonContributionRegistry
.
Extensions
.
JSONContribution
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录