Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
97eaa84d
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
97eaa84d
编写于
3月 24, 2020
作者:
D
Daniel Imms
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pass terminal method through to ext host terminal service
上级
d2621d7d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
2 deletion
+22
-2
src/vs/workbench/api/common/extHost.api.impl.ts
src/vs/workbench/api/common/extHost.api.impl.ts
+3
-1
src/vs/workbench/api/common/extHostTerminalService.ts
src/vs/workbench/api/common/extHostTerminalService.ts
+8
-1
src/vs/workbench/api/common/extHostTypes.ts
src/vs/workbench/api/common/extHostTypes.ts
+6
-0
src/vs/workbench/api/node/extHostTerminalService.ts
src/vs/workbench/api/node/extHostTerminalService.ts
+5
-0
未找到文件。
src/vs/workbench/api/common/extHost.api.impl.ts
浏览文件 @
97eaa84d
...
...
@@ -488,7 +488,8 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
return
extHostTerminalService
.
onDidWriteTerminalData
(
listener
,
thisArg
,
disposables
);
},
getEnvironmentVariableCollection
(
persistent
?:
boolean
):
vscode
.
EnvironmentVariableCollection
{
return
null
!
;
checkProposedApiEnabled
(
extension
);
return
extHostTerminalService
.
getEnvironmentVariableCollection
(
extension
,
persistent
);
},
get
state
()
{
return
extHostWindow
.
state
;
...
...
@@ -955,6 +956,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
DocumentLink
:
extHostTypes
.
DocumentLink
,
DocumentSymbol
:
extHostTypes
.
DocumentSymbol
,
EndOfLine
:
extHostTypes
.
EndOfLine
,
EnvironmentVariableMutatorType
:
extHostTypes
.
EnvironmentVariableMutatorType
,
EvaluatableExpression
:
extHostTypes
.
EvaluatableExpression
,
EventEmitter
:
Emitter
,
ExtensionKind
:
extHostTypes
.
ExtensionKind
,
...
...
src/vs/workbench/api/common/extHostTerminalService.ts
浏览文件 @
97eaa84d
...
...
@@ -15,6 +15,7 @@ import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
import
{
TerminalDataBufferer
}
from
'
vs/workbench/contrib/terminal/common/terminalDataBuffering
'
;
import
{
IDisposable
,
DisposableStore
}
from
'
vs/base/common/lifecycle
'
;
import
{
Disposable
as
VSCodeDisposable
}
from
'
./extHostTypes
'
;
import
{
IExtensionDescription
}
from
'
vs/platform/extensions/common/extensions
'
;
export
interface
IExtHostTerminalService
extends
ExtHostTerminalServiceShape
{
...
...
@@ -35,7 +36,8 @@ export interface IExtHostTerminalService extends ExtHostTerminalServiceShape {
attachPtyToTerminal
(
id
:
number
,
pty
:
vscode
.
Pseudoterminal
):
void
;
getDefaultShell
(
useAutomationShell
:
boolean
,
configProvider
:
ExtHostConfigProvider
):
string
;
getDefaultShellArgs
(
useAutomationShell
:
boolean
,
configProvider
:
ExtHostConfigProvider
):
string
[]
|
string
;
registerLinkHandler
(
handler
:
vscode
.
TerminalLinkHandler
):
vscode
.
Disposable
registerLinkHandler
(
handler
:
vscode
.
TerminalLinkHandler
):
vscode
.
Disposable
;
getEnvironmentVariableCollection
(
extension
:
IExtensionDescription
,
persistent
?:
boolean
):
vscode
.
EnvironmentVariableCollection
;
}
export
const
IExtHostTerminalService
=
createDecorator
<
IExtHostTerminalService
>
(
'
IExtHostTerminalService
'
);
...
...
@@ -333,6 +335,7 @@ export abstract class BaseExtHostTerminalService implements IExtHostTerminalServ
public
abstract
$getAvailableShells
():
Promise
<
IShellDefinitionDto
[]
>
;
public
abstract
$getDefaultShellAndArgs
(
useAutomationShell
:
boolean
):
Promise
<
IShellAndArgsDto
>
;
public
abstract
$acceptWorkspacePermissionsChanged
(
isAllowed
:
boolean
):
void
;
public
abstract
getEnvironmentVariableCollection
(
extension
:
IExtensionDescription
,
persistent
?:
boolean
):
vscode
.
EnvironmentVariableCollection
;
public
createExtensionTerminal
(
options
:
vscode
.
ExtensionTerminalOptions
):
vscode
.
Terminal
{
const
terminal
=
new
ExtHostTerminal
(
this
.
_proxy
,
options
,
options
.
name
);
...
...
@@ -669,4 +672,8 @@ export class WorkerExtHostTerminalService extends BaseExtHostTerminalService {
public
$acceptWorkspacePermissionsChanged
(
isAllowed
:
boolean
):
void
{
// No-op for web worker ext host as workspace permissions aren't used
}
public
getEnvironmentVariableCollection
(
extension
:
IExtensionDescription
,
persistent
?:
boolean
):
vscode
.
EnvironmentVariableCollection
{
throw
new
Error
(
'
Not implemented
'
);
}
}
src/vs/workbench/api/common/extHostTypes.ts
浏览文件 @
97eaa84d
...
...
@@ -483,6 +483,12 @@ export enum EndOfLine {
CRLF
=
2
}
export
enum
EnvironmentVariableMutatorType
{
Replace
=
1
,
Append
=
2
,
Prepend
=
3
}
@
es5ClassCompat
export
class
TextEdit
{
...
...
src/vs/workbench/api/node/extHostTerminalService.ts
浏览文件 @
97eaa84d
...
...
@@ -22,6 +22,7 @@ import { getSystemShell, detectAvailableShells } from 'vs/workbench/contrib/term
import
{
getMainProcessParentEnv
}
from
'
vs/workbench/contrib/terminal/node/terminalEnvironment
'
;
import
{
BaseExtHostTerminalService
,
ExtHostTerminal
}
from
'
vs/workbench/api/common/extHostTerminalService
'
;
import
{
IExtHostRpcService
}
from
'
vs/workbench/api/common/extHostRpcService
'
;
import
{
IExtensionDescription
}
from
'
vs/platform/extensions/common/extensions
'
;
export
class
ExtHostTerminalService
extends
BaseExtHostTerminalService
{
...
...
@@ -215,4 +216,8 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
public
$acceptWorkspacePermissionsChanged
(
isAllowed
:
boolean
):
void
{
this
.
_isWorkspaceShellAllowed
=
isAllowed
;
}
public
getEnvironmentVariableCollection
(
extension
:
IExtensionDescription
,
persistent
?:
boolean
):
vscode
.
EnvironmentVariableCollection
{
return
null
!
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录