Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
efe38fc1
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,发现更多精彩内容 >>
提交
efe38fc1
编写于
3月 12, 2019
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
strict null checks: terminalSupport
上级
630eb0ef
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
25 deletion
+10
-25
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+2
-17
src/vs/workbench/contrib/debug/electron-browser/terminalSupport.ts
...rkbench/contrib/debug/electron-browser/terminalSupport.ts
+8
-8
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
efe38fc1
...
...
@@ -33,6 +33,7 @@
"./vs/workbench/services/timer/**/*.ts"
,
"./vs/workbench/contrib/webview/**/*.ts"
,
"./vs/workbench/contrib/debug/common/**/*.ts"
,
"./vs/workbench/contrib/debug/browser/**/*.ts"
,
"./vs/workbench/contrib/debug/node/**/*.ts"
,
"./vs/workbench/contrib/preferences/common/**/*.ts"
,
"./vs/workbench/contrib/preferences/**/settings*.ts"
,
...
...
@@ -155,26 +156,10 @@
"./vs/workbench/contrib/comments/electron-browser/commentsTreeViewer.ts"
,
"./vs/workbench/contrib/comments/electron-browser/reactionsAction.ts"
,
"./vs/workbench/contrib/comments/electron-browser/simpleCommentEditor.ts"
,
"./vs/workbench/contrib/debug/browser/baseDebugView.ts"
,
"./vs/workbench/contrib/debug/browser/breakpointsView.ts"
,
"./vs/workbench/contrib/debug/browser/debugANSIHandling.ts"
,
"./vs/workbench/contrib/debug/browser/debugActionItems.ts"
,
"./vs/workbench/contrib/debug/browser/debugActions.ts"
,
"./vs/workbench/contrib/debug/browser/debugCommands.ts"
,
"./vs/workbench/contrib/debug/browser/debugContentProvider.ts"
,
"./vs/workbench/contrib/debug/browser/debugEditorActions.ts"
,
"./vs/workbench/contrib/debug/browser/debugEditorModelManager.ts"
,
"./vs/workbench/contrib/debug/browser/debugQuickOpen.ts"
,
"./vs/workbench/contrib/debug/browser/debugStatus.ts"
,
"./vs/workbench/contrib/debug/browser/debugToolbar.ts"
,
"./vs/workbench/contrib/debug/browser/debugViewlet.ts"
,
"./vs/workbench/contrib/debug/browser/exceptionWidget.ts"
,
"./vs/workbench/contrib/debug/browser/linkDetector.ts"
,
"./vs/workbench/contrib/debug/browser/loadedScriptsView.ts"
,
"./vs/workbench/contrib/debug/browser/statusbarColorProvider.ts"
,
"./vs/workbench/contrib/debug/electron-browser/breakpointWidget.ts"
,
"./vs/workbench/contrib/debug/electron-browser/debugEditorContribution.ts"
,
"./vs/workbench/contrib/debug/electron-browser/debugHover.ts"
,
"./vs/workbench/contrib/debug/electron-browser/terminalSupport.ts"
,
"./vs/workbench/contrib/debug/electron-browser/debugSession.ts"
,
"./vs/workbench/contrib/debug/electron-browser/electronDebugActions.ts"
,
"./vs/workbench/contrib/debug/electron-browser/rawDebugSession.ts"
,
...
...
src/vs/workbench/contrib/debug/electron-browser/terminalSupport.ts
浏览文件 @
efe38fc1
...
...
@@ -9,10 +9,11 @@ import { ITerminalService, ITerminalInstance } from 'vs/workbench/contrib/termin
import
{
IExternalTerminalService
}
from
'
vs/workbench/contrib/externalTerminal/common/externalTerminal
'
;
import
{
ITerminalLauncher
,
ITerminalSettings
}
from
'
vs/workbench/contrib/debug/common/debug
'
;
import
{
hasChildProcesses
,
prepareCommand
}
from
'
vs/workbench/contrib/debug/node/terminals
'
;
import
{
IProcessEnvironment
}
from
'
vs/base/common/platform
'
;
export
class
TerminalLauncher
implements
ITerminalLauncher
{
private
integratedTerminalInstance
:
ITerminalInstance
;
private
integratedTerminalInstance
:
ITerminalInstance
|
undefined
;
private
terminalDisposedListener
:
IDisposable
;
constructor
(
...
...
@@ -24,20 +25,20 @@ export class TerminalLauncher implements ITerminalLauncher {
runInTerminal
(
args
:
DebugProtocol
.
RunInTerminalRequestArguments
,
config
:
ITerminalSettings
):
Promise
<
number
|
undefined
>
{
if
(
args
.
kind
===
'
external
'
)
{
return
this
.
externalTerminalService
.
runInTerminal
(
args
.
title
,
args
.
cwd
,
args
.
args
,
args
.
env
||
{});
return
this
.
externalTerminalService
.
runInTerminal
(
args
.
title
||
''
,
args
.
cwd
,
args
.
args
,
<
IProcessEnvironment
>
args
.
env
||
{});
}
if
(
!
this
.
terminalDisposedListener
)
{
// React on terminal disposed and check if that is the debug terminal #12956
this
.
terminalDisposedListener
=
this
.
terminalService
.
onInstanceDisposed
(
terminal
=>
{
if
(
this
.
integratedTerminalInstance
&&
this
.
integratedTerminalInstance
.
id
===
terminal
.
id
)
{
this
.
integratedTerminalInstance
=
null
;
this
.
integratedTerminalInstance
=
undefined
;
}
});
}
let
t
=
this
.
integratedTerminalInstance
;
if
((
t
&&
hasChildProcesses
(
t
.
processId
))
||
!
t
)
{
if
((
t
&&
(
typeof
t
.
processId
===
'
number
'
)
&&
hasChildProcesses
(
t
.
processId
))
||
!
t
)
{
t
=
this
.
terminalService
.
createTerminal
({
name
:
args
.
title
||
nls
.
localize
(
'
debug.terminal.title
'
,
"
debuggee
"
)
});
this
.
integratedTerminalInstance
=
t
;
}
...
...
@@ -45,14 +46,13 @@ export class TerminalLauncher implements ITerminalLauncher {
this
.
terminalService
.
showPanel
(
true
);
return
new
Promise
<
number
|
undefined
>
((
resolve
,
error
)
=>
{
if
(
typeof
t
.
processId
===
'
number
'
)
{
if
(
t
&&
typeof
t
.
processId
===
'
number
'
)
{
// no need to wait
resolve
(
t
.
processId
);
}
// shell not ready: wait for ready event
const
toDispose
=
t
.
onProcessIdReady
(
t
=>
{
const
toDispose
=
t
!
.
onProcessIdReady
(
t
=>
{
toDispose
.
dispose
();
resolve
(
t
.
processId
);
});
...
...
@@ -65,7 +65,7 @@ export class TerminalLauncher implements ITerminalLauncher {
}).
then
(
shellProcessId
=>
{
const
command
=
prepareCommand
(
args
,
config
);
t
.
sendText
(
command
,
true
);
t
!
.
sendText
(
command
,
true
);
return
shellProcessId
;
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录