Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d2e8c846
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,发现更多精彩内容 >>
提交
d2e8c846
编写于
2月 12, 2019
作者:
G
Gabriel DeBacker
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleanup round one
上级
db7766c4
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
50 addition
and
46 deletion
+50
-46
src/vs/workbench/api/electron-browser/mainThreadTask.ts
src/vs/workbench/api/electron-browser/mainThreadTask.ts
+5
-6
src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts
...rkbench/api/electron-browser/mainThreadTerminalService.ts
+2
-2
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+1
-1
src/vs/workbench/api/node/extHostTask.ts
src/vs/workbench/api/node/extHostTask.ts
+24
-19
src/vs/workbench/contrib/tasks/common/taskService.ts
src/vs/workbench/contrib/tasks/common/taskService.ts
+1
-1
src/vs/workbench/contrib/tasks/common/taskSystem.ts
src/vs/workbench/contrib/tasks/common/taskSystem.ts
+1
-1
src/vs/workbench/contrib/tasks/common/tasks.ts
src/vs/workbench/contrib/tasks/common/tasks.ts
+3
-3
src/vs/workbench/contrib/tasks/electron-browser/task.contribution.ts
...bench/contrib/tasks/electron-browser/task.contribution.ts
+2
-2
src/vs/workbench/contrib/tasks/electron-browser/terminalTaskSystem.ts
...ench/contrib/tasks/electron-browser/terminalTaskSystem.ts
+7
-7
src/vs/workbench/contrib/tasks/node/processTaskSystem.ts
src/vs/workbench/contrib/tasks/node/processTaskSystem.ts
+1
-1
src/vs/workbench/contrib/terminal/common/terminal.ts
src/vs/workbench/contrib/terminal/common/terminal.ts
+1
-1
src/vs/workbench/contrib/terminal/electron-browser/terminalInstance.ts
...nch/contrib/terminal/electron-browser/terminalInstance.ts
+2
-2
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadTask.ts
浏览文件 @
d2e8c846
...
...
@@ -30,9 +30,8 @@ import { extHostNamedCustomer } from 'vs/workbench/api/electron-browser/extHostC
import
{
ExtHostContext
,
MainThreadTaskShape
,
ExtHostTaskShape
,
MainContext
,
IExtHostContext
}
from
'
vs/workbench/api/node/extHost.protocol
'
;
import
{
TaskDefinitionDTO
,
TaskExecutionDTO
,
ProcessExecutionOptionsDTO
,
TaskPresentationOptionsDTO
,
ProcessExecutionDTO
,
ShellExecutionDTO
,
ShellExecutionOptionsDTO
,
TaskDTO
,
TaskSourceDTO
,
TaskHandleDTO
,
TaskFilterDTO
,
TaskProcessStartedDTO
,
TaskProcessEndedDTO
,
TaskSystemInfoDTO
,
RunOptionsDTO
,
CustomTaskExecutionDTO
ProcessExecutionDTO
,
ShellExecutionDTO
,
ShellExecutionOptionsDTO
,
CustomTaskExecutionDTO
,
TaskDTO
,
TaskSourceDTO
,
TaskHandleDTO
,
TaskFilterDTO
,
TaskProcessStartedDTO
,
TaskProcessEndedDTO
,
TaskSystemInfoDTO
,
RunOptionsDTO
}
from
'
vs/workbench/api/shared/tasks
'
;
import
{
IConfigurationResolverService
}
from
'
vs/workbench/services/configurationResolver/common/configurationResolver
'
;
...
...
@@ -252,7 +251,7 @@ namespace CustomTaskExecutionDTO {
export
function
to
(
value
:
CustomTaskExecutionDTO
):
CommandConfiguration
{
return
{
runtime
:
RuntimeType
.
ExtensionCallback
,
runtime
:
RuntimeType
.
CustomTaskExecution
,
presentation
:
undefined
};
}
...
...
@@ -519,12 +518,12 @@ export class MainThreadTask implements MainThreadTaskShape {
});
}
public
$
extensionCallbackTaskComplete
(
id
:
string
):
Promise
<
void
>
{
public
$
customTaskExecutionComplete
(
id
:
string
,
result
:
number
|
undefined
):
Promise
<
void
>
{
return
new
Promise
<
void
>
((
resolve
,
reject
)
=>
{
this
.
_taskService
.
getActiveTasks
().
then
((
tasks
)
=>
{
for
(
let
task
of
tasks
)
{
if
(
id
===
task
.
_id
)
{
this
.
_taskService
.
extensionCallbackTaskComplete
(
task
).
then
((
value
)
=>
{
this
.
_taskService
.
extensionCallbackTaskComplete
(
task
,
result
).
then
((
value
)
=>
{
resolve
(
undefined
);
},
(
error
)
=>
{
reject
(
error
);
...
...
src/vs/workbench/api/electron-browser/mainThreadTerminalService.ts
浏览文件 @
d2e8c846
...
...
@@ -196,10 +196,10 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
private
_onTerminalOpened
(
terminalInstance
:
ITerminalInstance
):
void
{
if
(
terminalInstance
.
title
)
{
this
.
_proxy
.
$acceptTerminalOpened
(
terminalInstance
.
id
,
terminalInstance
.
title
,
terminalInstance
.
shellLaunchConfig
.
isRendererOnly
,
terminalInstance
.
cols
,
terminalInstance
.
rows
);
this
.
_proxy
.
$acceptTerminalOpened
(
terminalInstance
.
id
,
terminalInstance
.
title
,
!!
terminalInstance
.
shellLaunchConfig
.
isRendererOnly
,
terminalInstance
.
cols
,
terminalInstance
.
rows
);
}
else
{
terminalInstance
.
waitForTitle
().
then
(
title
=>
{
this
.
_proxy
.
$acceptTerminalOpened
(
terminalInstance
.
id
,
title
,
terminalInstance
.
shellLaunchConfig
.
isRendererOnly
,
terminalInstance
.
cols
,
terminalInstance
.
rows
);
this
.
_proxy
.
$acceptTerminalOpened
(
terminalInstance
.
id
,
title
,
!!
terminalInstance
.
shellLaunchConfig
.
isRendererOnly
,
terminalInstance
.
cols
,
terminalInstance
.
rows
);
});
}
}
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
d2e8c846
...
...
@@ -548,7 +548,7 @@ export interface MainThreadTaskShape extends IDisposable {
$executeTask
(
task
:
TaskHandleDTO
|
TaskDTO
):
Promise
<
TaskExecutionDTO
>
;
$terminateTask
(
id
:
string
):
Promise
<
void
>
;
$registerTaskSystem
(
scheme
:
string
,
info
:
TaskSystemInfoDTO
):
void
;
$
extensionCallbackTaskComplete
(
id
:
string
):
Promise
<
void
>
;
$
customTaskExecutionComplete
(
id
:
string
,
result
:
number
|
undefined
):
Promise
<
void
>
;
}
export
interface
MainThreadExtensionServiceShape
extends
IDisposable
{
...
...
src/vs/workbench/api/node/extHostTask.ts
浏览文件 @
d2e8c846
...
...
@@ -336,12 +336,13 @@ interface HandlerData {
extension
:
IExtensionDescription
;
}
class
ExtensionCallbac
kExecutionData
implements
IDisposable
{
class
CustomTas
kExecutionData
implements
IDisposable
{
private
_cancellationSource
?:
CancellationTokenSource
;
private
readonly
_onTaskExecutionComplete
:
Emitter
<
ExtensionCallbackExecutionData
>
=
new
Emitter
<
ExtensionCallbac
kExecutionData
>
();
private
readonly
_onTaskExecutionComplete
:
Emitter
<
CustomTaskExecutionData
>
=
new
Emitter
<
CustomTas
kExecutionData
>
();
private
readonly
_disposables
:
IDisposable
[]
=
[];
private
terminal
?:
vscode
.
Terminal
;
private
terminalId
?:
number
;
public
result
:
number
|
undefined
;
constructor
(
private
readonly
callbackData
:
vscode
.
CustomTaskExecution
,
...
...
@@ -352,7 +353,7 @@ class ExtensionCallbackExecutionData implements IDisposable {
dispose
(
this
.
_disposables
);
}
public
get
onTaskExecutionComplete
():
Event
<
ExtensionCallbac
kExecutionData
>
{
public
get
onTaskExecutionComplete
():
Event
<
CustomTas
kExecutionData
>
{
return
this
.
_onTaskExecutionComplete
.
event
;
}
...
...
@@ -405,6 +406,7 @@ class ExtensionCallbackExecutionData implements IDisposable {
// Regardless of how the task completes, we are done with this extension callback task execution.
this
.
callbackData
.
callback
(
terminalRenderer
,
this
.
_cancellationSource
.
token
).
then
(
(
success
)
=>
{
this
.
result
=
success
;
this
.
_onTaskExecutionComplete
.
fire
(
this
);
},
(
rejected
)
=>
{
this
.
_onTaskExecutionComplete
.
fire
(
this
);
...
...
@@ -422,8 +424,8 @@ export class ExtHostTask implements ExtHostTaskShape {
private
_handleCounter
:
number
;
private
_handlers
:
Map
<
number
,
HandlerData
>
;
private
_taskExecutions
:
Map
<
string
,
TaskExecutionImpl
>
;
private
_provided
ExtensionCallbacks
:
Map
<
string
,
ExtensionCallbac
kExecutionData
>
;
private
_active
ExtensionCallbacks
:
Map
<
string
,
ExtensionCallbac
kExecutionData
>
;
private
_provided
CustomTaskExecutions
:
Map
<
string
,
CustomTas
kExecutionData
>
;
private
_active
CustomTaskExecutions
:
Map
<
string
,
CustomTas
kExecutionData
>
;
private
readonly
_onDidExecuteTask
:
Emitter
<
vscode
.
TaskStartEvent
>
=
new
Emitter
<
vscode
.
TaskStartEvent
>
();
private
readonly
_onDidTerminateTask
:
Emitter
<
vscode
.
TaskEndEvent
>
=
new
Emitter
<
vscode
.
TaskEndEvent
>
();
...
...
@@ -445,8 +447,8 @@ export class ExtHostTask implements ExtHostTaskShape {
this
.
_handleCounter
=
0
;
this
.
_handlers
=
new
Map
<
number
,
HandlerData
>
();
this
.
_taskExecutions
=
new
Map
<
string
,
TaskExecutionImpl
>
();
this
.
_provided
ExtensionCallbacks
=
new
Map
<
string
,
ExtensionCallbac
kExecutionData
>
();
this
.
_active
ExtensionCallbacks
=
new
Map
<
string
,
ExtensionCallbac
kExecutionData
>
();
this
.
_provided
CustomTaskExecutions
=
new
Map
<
string
,
CustomTas
kExecutionData
>
();
this
.
_active
CustomTaskExecutions
=
new
Map
<
string
,
CustomTas
kExecutionData
>
();
}
public
registerTaskProvider
(
extension
:
IExtensionDescription
,
provider
:
vscode
.
TaskProvider
):
vscode
.
Disposable
{
...
...
@@ -517,15 +519,16 @@ export class ExtHostTask implements ExtHostTaskShape {
// this event will be fired.
// At that point, we need to actually start the callback, but
// only if it hasn't already begun.
const
extensionCallback
:
ExtensionCallbackExecutionData
|
undefined
=
this
.
_providedExtensionCallback
s
.
get
(
execution
.
id
);
const
extensionCallback
:
CustomTaskExecutionData
|
undefined
=
this
.
_providedCustomTaskExecution
s
.
get
(
execution
.
id
);
if
(
extensionCallback
)
{
// TODO: Verify whether this can ever happen???
if
(
this
.
_activeExtensionCallbacks
.
get
(
execution
.
id
)
===
undefined
)
{
this
.
_activeExtensionCallbacks
.
set
(
execution
.
id
,
extensionCallback
);
if
(
this
.
_activeCustomTaskExecutions
.
get
(
execution
.
id
)
!==
undefined
)
{
throw
new
Error
(
'
We should not be trying to start the same custom task executions twice.
'
);
}
this
.
_activeCustomTaskExecutions
.
set
(
execution
.
id
,
extensionCallback
);
const
taskExecutionComplete
:
IDisposable
=
extensionCallback
.
onTaskExecutionComplete
(()
=>
{
this
.
extensionCallbackTask
Complete
(
execution
);
this
.
customTaskExecution
Complete
(
execution
);
taskExecutionComplete
.
dispose
();
});
...
...
@@ -546,7 +549,7 @@ export class ExtHostTask implements ExtHostTaskShape {
const
workspaceProvider
=
await
this
.
_workspaceService
.
getWorkspaceProvider
();
const
_execution
=
this
.
getTaskExecution
(
execution
,
workspaceProvider
);
this
.
_taskExecutions
.
delete
(
execution
.
id
);
this
.
extensionCallbackTask
Complete
(
execution
);
this
.
customTaskExecution
Complete
(
execution
);
this
.
_onDidTerminateTask
.
fire
({
execution
:
_execution
});
...
...
@@ -591,7 +594,7 @@ export class ExtHostTask implements ExtHostTaskShape {
// For extension callback tasks, we need to store the execution objects locally
// since we obviously cannot send callback functions through the proxy.
// So, clear out any existing ones.
this
.
_provided
ExtensionCallback
s
.
clear
();
this
.
_provided
CustomTaskExecution
s
.
clear
();
// Set up a list of task ID promises that we can wait on
// before returning the provided tasks. The ensures that
...
...
@@ -615,8 +618,10 @@ export class ExtHostTask implements ExtHostTaskShape {
if
(
CustomTaskExecutionDTO
.
is
(
taskDTO
.
execution
))
{
taskIdPromises
.
push
(
new
Promise
((
resolve
)
=>
{
// The ID is calculated on the main thread task side, so, let's call into it here.
// We need the task id's pre-computed for custom task executions because when OnDidStartTask
// is invoked, we have to be able to map it back to our data.
this
.
_proxy
.
$createTaskId
(
taskDTO
).
then
((
taskId
)
=>
{
this
.
_provided
ExtensionCallbacks
.
set
(
taskId
,
new
ExtensionCallbac
kExecutionData
(
<
vscode
.
CustomTaskExecution
>
(
<
vscode
.
TaskWithCustomTaskExecution
>
task
).
executionWithExtensionCallback
,
this
.
_terminalService
));
this
.
_provided
CustomTaskExecutions
.
set
(
taskId
,
new
CustomTas
kExecutionData
(
<
vscode
.
CustomTaskExecution
>
(
<
vscode
.
TaskWithCustomTaskExecution
>
task
).
executionWithExtensionCallback
,
this
.
_terminalService
));
resolve
();
});
}));
...
...
@@ -694,12 +699,12 @@ export class ExtHostTask implements ExtHostTaskShape {
return
result
;
}
private
extensionCallbackTask
Complete
(
execution
:
TaskExecutionDTO
):
void
{
const
extensionCallback
:
ExtensionCallbackExecutionData
|
undefined
=
this
.
_activeExtensionCallback
s
.
get
(
execution
.
id
);
private
customTaskExecution
Complete
(
execution
:
TaskExecutionDTO
):
void
{
const
extensionCallback
:
CustomTaskExecutionData
|
undefined
=
this
.
_activeCustomTaskExecution
s
.
get
(
execution
.
id
);
if
(
extensionCallback
)
{
this
.
_activeCustomTaskExecutions
.
delete
(
execution
.
id
);
this
.
_proxy
.
$customTaskExecutionComplete
(
execution
.
id
,
extensionCallback
.
result
);
extensionCallback
.
dispose
();
this
.
_activeExtensionCallbacks
.
delete
(
execution
.
id
);
this
.
_proxy
.
$extensionCallbackTaskComplete
(
execution
.
id
);
}
}
}
src/vs/workbench/contrib/tasks/common/taskService.ts
浏览文件 @
d2e8c846
...
...
@@ -83,5 +83,5 @@ export interface ITaskService {
registerTaskSystem
(
scheme
:
string
,
taskSystemInfo
:
TaskSystemInfo
):
void
;
extensionCallbackTaskComplete
(
task
:
Task
):
Promise
<
void
>
;
extensionCallbackTaskComplete
(
task
:
Task
,
result
:
number
|
undefined
):
Promise
<
void
>
;
}
src/vs/workbench/contrib/tasks/common/taskSystem.ts
浏览文件 @
d2e8c846
...
...
@@ -136,5 +136,5 @@ export interface ITaskSystem {
terminate
(
task
:
Task
):
Promise
<
TaskTerminateResponse
>
;
terminateAll
():
Promise
<
TaskTerminateResponse
[]
>
;
revealTask
(
task
:
Task
):
boolean
;
extensionCallbackTaskComplete
(
task
:
Task
):
Promise
<
void
>
;
extensionCallbackTaskComplete
(
task
:
Task
,
result
:
number
|
undefined
):
Promise
<
void
>
;
}
\ No newline at end of file
src/vs/workbench/contrib/tasks/common/tasks.ts
浏览文件 @
d2e8c846
...
...
@@ -230,7 +230,7 @@ export namespace PresentationOptions {
export
enum
RuntimeType
{
Shell
=
1
,
Process
=
2
,
ExtensionCallback
=
3
CustomTaskExecution
=
3
}
export
namespace
RuntimeType
{
...
...
@@ -241,7 +241,7 @@ export namespace RuntimeType {
case
'
process
'
:
return
RuntimeType
.
Process
;
case
'
customTaskExecution
'
:
return
RuntimeType
.
ExtensionCallback
;
return
RuntimeType
.
CustomTaskExecution
;
default
:
return
RuntimeType
.
Process
;
}
...
...
@@ -607,7 +607,7 @@ export class CustomTask extends CommonTask {
type
=
'
process
'
;
break
;
case
RuntimeType
.
ExtensionCallback
:
case
RuntimeType
.
CustomTaskExecution
:
type
=
'
customTaskExecution
'
;
break
;
...
...
src/vs/workbench/contrib/tasks/electron-browser/task.contribution.ts
浏览文件 @
d2e8c846
...
...
@@ -706,11 +706,11 @@ class TaskService extends Disposable implements ITaskService {
this
.
_taskSystemInfos
.
set
(
key
,
info
);
}
public
extensionCallbackTaskComplete
(
task
:
Task
):
Promise
<
void
>
{
public
extensionCallbackTaskComplete
(
task
:
Task
,
result
:
number
|
undefined
):
Promise
<
void
>
{
if
(
!
this
.
_taskSystem
)
{
return
Promise
.
resolve
();
}
return
this
.
_taskSystem
.
extensionCallbackTaskComplete
(
task
);
return
this
.
_taskSystem
.
extensionCallbackTaskComplete
(
task
,
result
);
}
public
getTask
(
folder
:
IWorkspaceFolder
|
string
,
identifier
:
string
|
TaskIdentifier
,
compareId
:
boolean
=
false
):
Promise
<
Task
|
undefined
>
{
...
...
src/vs/workbench/contrib/tasks/electron-browser/terminalTaskSystem.ts
浏览文件 @
d2e8c846
...
...
@@ -266,14 +266,14 @@ export class TerminalTaskSystem implements ITaskSystem {
return
Object
.
keys
(
this
.
activeTasks
).
map
(
key
=>
this
.
activeTasks
[
key
].
task
);
}
public
extensionCallbackTaskComplete
(
task
:
Task
):
Promise
<
void
>
{
public
extensionCallbackTaskComplete
(
task
:
Task
,
result
:
number
|
undefined
):
Promise
<
void
>
{
let
activeTerminal
=
this
.
activeTasks
[
task
.
getMapKey
()];
if
(
!
activeTerminal
)
{
return
Promise
.
reject
(
new
Error
(
'
Expected to have a terminal for an extension callback task
'
));
}
return
new
Promise
<
void
>
((
resolve
)
=>
{
activeTerminal
.
terminal
.
finishedWithRenderer
();
activeTerminal
.
terminal
.
finishedWithRenderer
(
result
);
resolve
();
});
}
...
...
@@ -550,7 +550,7 @@ export class TerminalTaskSystem implements ITaskSystem {
let
processStartedSignaled
=
false
;
terminal
.
processReady
.
then
(()
=>
{
if
(
!
processStartedSignaled
)
{
if
(
task
.
command
.
runtime
!==
RuntimeType
.
ExtensionCallback
)
{
if
(
task
.
command
.
runtime
!==
RuntimeType
.
CustomTaskExecution
)
{
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessStarted
,
task
,
terminal
!
.
processId
!
));
}
processStartedSignaled
=
true
;
...
...
@@ -622,7 +622,7 @@ export class TerminalTaskSystem implements ITaskSystem {
let
processStartedSignaled
=
false
;
terminal
.
processReady
.
then
(()
=>
{
if
(
!
processStartedSignaled
)
{
if
(
task
.
command
.
runtime
!==
RuntimeType
.
ExtensionCallback
)
{
if
(
task
.
command
.
runtime
!==
RuntimeType
.
CustomTaskExecution
)
{
this
.
_onDidStateChange
.
fire
(
TaskEvent
.
create
(
TaskEventKind
.
ProcessStarted
,
task
,
terminal
!
.
processId
!
));
}
processStartedSignaled
=
true
;
...
...
@@ -826,7 +826,7 @@ export class TerminalTaskSystem implements ITaskSystem {
}
}
}
else
{
let
commandExecutable
=
task
.
command
.
runtime
!==
RuntimeType
.
ExtensionCallback
?
CommandString
.
value
(
command
)
:
undefined
;
let
commandExecutable
=
task
.
command
.
runtime
!==
RuntimeType
.
CustomTaskExecution
?
CommandString
.
value
(
command
)
:
undefined
;
let
executable
=
!
isShellCommand
?
this
.
resolveVariable
(
variableResolver
,
'
${
'
+
TerminalTaskSystem
.
ProcessVarName
+
'
}
'
)
:
commandExecutable
;
...
...
@@ -906,7 +906,7 @@ export class TerminalTaskSystem implements ITaskSystem {
let
command
:
CommandString
|
undefined
;
let
args
:
CommandString
[]
|
undefined
;
if
(
task
.
command
.
runtime
===
RuntimeType
.
ExtensionCallback
)
{
if
(
task
.
command
.
runtime
===
RuntimeType
.
CustomTaskExecution
)
{
this
.
currentTask
.
shellLaunchConfig
=
{
isRendererOnly
:
true
,
waitOnExit
,
...
...
@@ -1126,7 +1126,7 @@ export class TerminalTaskSystem implements ITaskSystem {
private
collectCommandVariables
(
variables
:
Set
<
string
>
,
command
:
CommandConfiguration
,
task
:
CustomTask
|
ContributedTask
):
void
{
// An extension callback should have everything it needs already as it provided
// the callback.
if
(
command
.
runtime
===
RuntimeType
.
ExtensionCallback
)
{
if
(
command
.
runtime
===
RuntimeType
.
CustomTaskExecution
)
{
return
;
}
...
...
src/vs/workbench/contrib/tasks/node/processTaskSystem.ts
浏览文件 @
d2e8c846
...
...
@@ -105,7 +105,7 @@ export class ProcessTaskSystem implements ITaskSystem {
return
true
;
}
public
extensionCallbackTaskComplete
(
task
:
Task
):
Promise
<
void
>
{
public
extensionCallbackTaskComplete
(
task
:
Task
,
result
:
number
|
undefined
):
Promise
<
void
>
{
throw
new
TaskError
(
Severity
.
Error
,
'
Extension callback task completion is never expected in the process task system.
'
,
TaskErrors
.
UnknownError
);
}
...
...
src/vs/workbench/contrib/terminal/common/terminal.ts
浏览文件 @
d2e8c846
...
...
@@ -432,7 +432,7 @@ export interface ITerminalInstance {
/**
* Indicates that a consumer of a renderer only terminal is finished with it.
*/
finishedWithRenderer
():
void
;
finishedWithRenderer
(
result
:
number
|
undefined
):
void
;
/**
* Forces the terminal to redraw its viewport.
...
...
src/vs/workbench/contrib/terminal/electron-browser/terminalInstance.ts
浏览文件 @
d2e8c846
...
...
@@ -754,7 +754,7 @@ export class TerminalInstance implements ITerminalInstance {
this
.
_disposables
=
lifecycle
.
dispose
(
this
.
_disposables
);
}
public
finishedWithRenderer
():
void
{
public
finishedWithRenderer
(
result
:
number
|
undefined
):
void
{
// The use of this API is for cases where there is no backing process
// behind a terminal instance (such as when executing an extension callback task).
// There is no associated string, error text, etc, as the consumer of the renderer
...
...
@@ -764,7 +764,7 @@ export class TerminalInstance implements ITerminalInstance {
return
;
}
return
this
.
_onProcessOrExtensionCallbackExit
();
return
this
.
_onProcessOrExtensionCallbackExit
(
result
);
}
public
forceRedraw
():
void
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录