Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5a79a1ed
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,发现更多精彩内容 >>
提交
5a79a1ed
编写于
2月 20, 2019
作者:
G
Gabriel DeBacker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updates based on feedback
上级
d728d3dc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
31 deletion
+16
-31
src/vs/workbench/contrib/tasks/electron-browser/terminalTaskSystem.ts
...ench/contrib/tasks/electron-browser/terminalTaskSystem.ts
+8
-23
src/vs/workbench/contrib/tasks/node/processTaskSystem.ts
src/vs/workbench/contrib/tasks/node/processTaskSystem.ts
+2
-2
src/vs/workbench/contrib/terminal/electron-browser/terminalInstance.ts
...nch/contrib/terminal/electron-browser/terminalInstance.ts
+6
-6
未找到文件。
src/vs/workbench/contrib/tasks/electron-browser/terminalTaskSystem.ts
浏览文件 @
5a79a1ed
...
...
@@ -299,27 +299,6 @@ export class TerminalTaskSystem implements ITaskSystem {
});
}
public
extensionCallbackTaskEnded
(
task
:
Task
):
Promise
<
TaskTerminateResponse
>
{
let
activeTerminal
=
this
.
activeTasks
[
task
.
getMapKey
()];
if
(
!
activeTerminal
)
{
return
Promise
.
resolve
<
TaskTerminateResponse
>
({
success
:
false
,
task
:
undefined
});
}
return
new
Promise
<
TaskTerminateResponse
>
((
resolve
,
reject
)
=>
{
let
terminal
=
activeTerminal
.
terminal
;
const
onDisposed
=
terminal
.
onDisposed
(()
=>
{
let
task
=
activeTerminal
.
task
;
try
{
onDisposed
.
dispose
();
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
End
,
task
));
}
catch
(
error
)
{
// Do nothing.
}
resolve
({
success
:
true
,
task
:
task
});
});
terminal
.
dispose
();
});
}
public
terminateAll
():
Promise
<
TaskTerminateResponse
[]
>
{
let
promises
:
Promise
<
TaskTerminateResponse
>
[]
=
[];
Object
.
keys
(
this
.
activeTasks
).
forEach
((
key
)
=>
{
...
...
@@ -599,7 +578,11 @@ export class TerminalTaskSystem implements ITaskSystem {
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessStarted
,
task
,
terminal
!
.
processId
!
));
processStartedSignaled
=
true
;
}
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessEnded
,
task
,
exitCode
));
if
(
task
.
command
.
runtime
!==
RuntimeType
.
CustomExecution
)
{
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessEnded
,
task
,
exitCode
));
}
for
(
let
i
=
0
;
i
<
eventCounter
;
i
++
)
{
let
event
=
TaskEvent
.
create
(
TaskEventKind
.
Inactive
,
task
);
this
.
_onDidStateChange
.
fire
(
event
);
...
...
@@ -671,7 +654,9 @@ export class TerminalTaskSystem implements ITaskSystem {
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessStarted
,
task
,
terminal
.
processId
!
));
processStartedSignaled
=
true
;
}
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessEnded
,
task
,
exitCode
));
if
(
task
.
command
.
runtime
!==
RuntimeType
.
CustomExecution
)
{
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessEnded
,
task
,
exitCode
));
}
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
Inactive
,
task
));
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
End
,
task
));
resolve
({
exitCode
});
...
...
src/vs/workbench/contrib/tasks/node/processTaskSystem.ts
浏览文件 @
5a79a1ed
...
...
@@ -283,7 +283,7 @@ export class ProcessTaskSystem implements ITaskSystem {
this
.
childProcessEnded
();
watchingProblemMatcher
.
done
();
watchingProblemMatcher
.
dispose
();
if
(
processStartedSignaled
)
{
if
(
processStartedSignaled
&&
task
.
command
.
runtime
!==
RuntimeType
.
CustomExecution
)
{
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessEnded
,
task
,
success
.
cmdCode
!
));
}
toDispose
=
dispose
(
toDispose
!
);
...
...
@@ -339,7 +339,7 @@ export class ProcessTaskSystem implements ITaskSystem {
startStopProblemMatcher
.
done
();
startStopProblemMatcher
.
dispose
();
this
.
checkTerminated
(
task
,
success
);
if
(
processStartedSignaled
)
{
if
(
processStartedSignaled
&&
task
.
command
.
runtime
!==
RuntimeType
.
CustomExecution
)
{
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessEnded
,
task
,
success
.
cmdCode
!
));
}
this
.
_onDidStateChange
.
fire
(
inactiveEvent
);
...
...
src/vs/workbench/contrib/terminal/electron-browser/terminalInstance.ts
浏览文件 @
5a79a1ed
...
...
@@ -740,10 +740,10 @@ export class TerminalInstance implements ITerminalInstance {
if
(
this
.
_processManager
)
{
this
.
_processManager
.
dispose
(
immediate
);
}
else
{
// In cases where there is no associated process (for example executing an ex
et
nsion callback task)
// consumers still expect on onExit event to be fired. An example of this is terminating the ext
ne
sion callback
// task.
this
.
_onExit
.
fire
(
this
.
_i
d
);
// In cases where there is no associated process (for example executing an ex
te
nsion callback task)
// consumers still expect on onExit event to be fired. An example of this is terminating the ext
en
sion callback
// task.
There is no exit code at this point, so firing undefined is appropriate.
this
.
_onExit
.
fire
(
undefine
d
);
}
if
(
!
this
.
_isDisposed
)
{
...
...
@@ -1094,8 +1094,8 @@ export class TerminalInstance implements ITerminalInstance {
// Set the new shell launch config
this
.
_shellLaunchConfig
=
shell
;
// Must be done before calling _createProcess()
//
Initialize new process if we have one
.
if
(
this
.
_shellLaunchConfig
.
executable
)
{
//
Launch the process unless this is only a renderer
.
if
(
!
this
.
_shellLaunchConfig
.
isRendererOnly
)
{
this
.
_createProcess
();
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录