Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
00549804
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,发现更多精彩内容 >>
提交
00549804
编写于
7月 02, 2019
作者:
D
Daniel Imms
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pass args via object
上级
188c3652
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
27 addition
and
16 deletion
+27
-16
src/vs/workbench/api/browser/mainThreadTerminalService.ts
src/vs/workbench/api/browser/mainThreadTerminalService.ts
+12
-12
src/vs/workbench/api/common/extHost.protocol.ts
src/vs/workbench/api/common/extHost.protocol.ts
+13
-1
src/vs/workbench/api/node/extHostTerminalService.ts
src/vs/workbench/api/node/extHostTerminalService.ts
+2
-3
未找到文件。
src/vs/workbench/api/browser/mainThreadTerminalService.ts
浏览文件 @
00549804
...
...
@@ -5,9 +5,9 @@
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
ITerminalService
,
ITerminalInstance
,
IShellLaunchConfig
,
ITerminalProcessExtHostProxy
,
ITerminalProcessExtHostRequest
,
ITerminalDimensions
,
EXT_HOST_CREATION_DELAY
,
IAvailableShellsRequest
,
IDefaultShellAndArgsRequest
}
from
'
vs/workbench/contrib/terminal/common/terminal
'
;
import
{
ExtHostContext
,
ExtHostTerminalServiceShape
,
MainThreadTerminalServiceShape
,
MainContext
,
IExtHostContext
,
ShellLaunchConfigDto
}
from
'
vs/workbench/api/common/extHost.protocol
'
;
import
{
ExtHostContext
,
ExtHostTerminalServiceShape
,
MainThreadTerminalServiceShape
,
MainContext
,
IExtHostContext
,
ShellLaunchConfigDto
,
TerminalLaunchConfig
}
from
'
vs/workbench/api/common/extHost.protocol
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/common/extHostCustomers
'
;
import
{
U
riComponents
,
U
RI
}
from
'
vs/base/common/uri
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
StopWatch
}
from
'
vs/base/common/stopwatch
'
;
import
{
ITerminalInstanceService
}
from
'
vs/workbench/contrib/terminal/browser/terminal
'
;
import
{
IRemoteAgentService
}
from
'
vs/workbench/services/remote/common/remoteAgentService
'
;
...
...
@@ -78,18 +78,18 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
// when the extension host process goes down ?
}
public
$createTerminal
(
name
?:
string
,
shellPath
?:
string
,
shellArgs
?:
string
[]
|
string
,
cwd
?:
string
|
UriComponents
,
env
?:
{
[
key
:
string
]:
string
},
waitOnExit
?:
boolean
,
strictEnv
?:
boolean
,
hideFromUser
?:
boolean
,
isVirtualProcess
?:
boolean
):
Promise
<
{
id
:
number
,
name
:
string
}
>
{
public
$createTerminal
(
launchConfig
:
TerminalLaunchConfig
):
Promise
<
{
id
:
number
,
name
:
string
}
>
{
const
shellLaunchConfig
:
IShellLaunchConfig
=
{
name
,
executable
:
shellPath
,
args
:
shellArgs
,
cwd
:
typeof
cwd
===
'
string
'
?
cwd
:
URI
.
revive
(
cwd
),
waitOnExit
,
name
:
launchConfig
.
name
,
executable
:
launchConfig
.
shellPath
,
args
:
launchConfig
.
shellArgs
,
cwd
:
typeof
launchConfig
.
cwd
===
'
string
'
?
launchConfig
.
cwd
:
URI
.
revive
(
launchConfig
.
cwd
),
waitOnExit
:
launchConfig
.
waitOnExit
,
ignoreConfigurationCwd
:
true
,
env
,
strictEnv
,
hideFromUser
,
isVirtualProcess
env
:
launchConfig
.
env
,
strictEnv
:
launchConfig
.
strictEnv
,
hideFromUser
:
launchConfig
.
hideFromUser
,
isVirtualProcess
:
launchConfig
.
isVirtualProcess
};
const
terminal
=
this
.
_terminalService
.
createTerminal
(
shellLaunchConfig
);
this
.
_terminalProcesses
[
terminal
.
id
]
=
new
Promise
<
ITerminalProcessExtHostProxy
>
(
r
=>
this
.
_terminalProcessesReady
[
terminal
.
id
]
=
r
);
...
...
src/vs/workbench/api/common/extHost.protocol.ts
浏览文件 @
00549804
...
...
@@ -389,8 +389,20 @@ export interface MainThreadProgressShape extends IDisposable {
$progressEnd
(
handle
:
number
):
void
;
}
export
interface
TerminalLaunchConfig
{
name
?:
string
;
shellPath
?:
string
;
shellArgs
?:
string
[]
|
string
;
cwd
?:
string
|
UriComponents
;
env
?:
{
[
key
:
string
]:
string
|
null
};
waitOnExit
?:
boolean
;
strictEnv
?:
boolean
;
hideFromUser
?:
boolean
;
isVirtualProcess
?:
boolean
;
}
export
interface
MainThreadTerminalServiceShape
extends
IDisposable
{
$createTerminal
(
name
?:
string
,
shellPath
?:
string
,
shellArgs
?:
string
[]
|
string
,
cwd
?:
string
|
UriComponents
,
env
?:
{
[
key
:
string
]:
string
|
null
},
waitOnExit
?:
boolean
,
strictEnv
?:
boolean
,
hideFromUser
?:
boolean
,
isVirtualProcess
?:
boolean
):
Promise
<
{
id
:
number
,
name
:
string
}
>
;
$createTerminal
(
config
:
TerminalLaunchConfig
):
Promise
<
{
id
:
number
,
name
:
string
}
>
;
$createTerminalRenderer
(
name
:
string
):
Promise
<
number
>
;
$dispose
(
terminalId
:
number
):
void
;
$hide
(
terminalId
:
number
):
void
;
...
...
src/vs/workbench/api/node/extHostTerminalService.ts
浏览文件 @
00549804
...
...
@@ -119,15 +119,14 @@ export class ExtHostTerminal extends BaseExtHostTerminal implements vscode.Termi
strictEnv
?:
boolean
,
hideFromUser
?:
boolean
):
void
{
this
.
_proxy
.
$createTerminal
(
this
.
_name
,
shellPath
,
shellArgs
,
cwd
,
env
,
waitOnExit
,
strictEnv
,
hideFromUser
).
then
(
terminal
=>
{
this
.
_proxy
.
$createTerminal
(
{
name
:
this
.
_name
,
shellPath
,
shellArgs
,
cwd
,
env
,
waitOnExit
,
strictEnv
,
hideFromUser
}
).
then
(
terminal
=>
{
this
.
_name
=
terminal
.
name
;
this
.
_runQueuedRequests
(
terminal
.
id
);
});
}
public
createVirtualProcess
():
Promise
<
void
>
{
// TODO: Change $createTerminal to accept an object
return
this
.
_proxy
.
$createTerminal
(
this
.
_name
,
undefined
,
undefined
,
undefined
,
undefined
,
undefined
,
undefined
,
undefined
,
true
).
then
(
terminal
=>
{
return
this
.
_proxy
.
$createTerminal
({
name
:
this
.
_name
,
isVirtualProcess
:
true
}).
then
(
terminal
=>
{
this
.
_name
=
terminal
.
name
;
this
.
_runQueuedRequests
(
terminal
.
id
);
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录