Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d8a39866
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,发现更多精彩内容 >>
提交
d8a39866
编写于
7月 03, 2018
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
avoid async and winjs.promise, #53442
上级
51afe35d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
11 deletion
+16
-11
src/vs/platform/windows/electron-main/windowsService.ts
src/vs/platform/windows/electron-main/windowsService.ts
+3
-2
src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts
...ts/extensions/electron-browser/runtimeExtensionsEditor.ts
+5
-1
src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts
...bench/parts/terminal/electron-browser/terminalInstance.ts
+2
-2
src/vs/workbench/services/extensions/electron-browser/extensionService.ts
.../services/extensions/electron-browser/extensionService.ts
+5
-5
src/vs/workbench/services/extensions/node/extensionPoints.ts
src/vs/workbench/services/extensions/node/extensionPoints.ts
+1
-1
未找到文件。
src/vs/platform/windows/electron-main/windowsService.ts
浏览文件 @
d8a39866
...
...
@@ -537,14 +537,15 @@ export class WindowsService implements IWindowsService, IURLHandler, IDisposable
return
TPromise
.
as
(
true
);
}
return
TPromise
.
as
(
false
);
return
TPromise
.
wrap
(
false
);
}
private
openFileForURI
(
uri
:
URI
):
void
{
private
openFileForURI
(
uri
:
URI
):
TPromise
<
boolean
>
{
const
cli
=
assign
(
Object
.
create
(
null
),
this
.
environmentService
.
args
,
{
goto
:
true
});
const
pathsToOpen
=
[
uri
.
fsPath
];
this
.
windowsMainService
.
open
({
context
:
OpenContext
.
API
,
cli
,
pathsToOpen
});
return
TPromise
.
wrap
(
true
);
}
dispose
():
void
{
...
...
src/vs/workbench/parts/extensions/electron-browser/runtimeExtensionsEditor.ts
浏览文件 @
d8a39866
...
...
@@ -573,7 +573,11 @@ class SaveExtensionHostProfileAction extends Action {
});
}
async
run
():
TPromise
<
any
>
{
run
():
TPromise
<
any
>
{
return
TPromise
.
wrap
(
this
.
_asyncRun
());
}
private
async
_asyncRun
():
Promise
<
any
>
{
let
picked
=
await
this
.
_windowService
.
showSaveDialog
({
title
:
'
Save Extension Host Profile
'
,
buttonLabel
:
'
Save
'
,
...
...
src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts
浏览文件 @
d8a39866
...
...
@@ -65,7 +65,7 @@ export class TerminalInstance implements ITerminalInstance {
private
_rows
:
number
;
private
_dimensionsOverride
:
ITerminalDimensions
;
private
_windowsShellHelper
:
WindowsShellHelper
;
private
_xtermReadyPromise
:
T
Promise
<
void
>
;
private
_xtermReadyPromise
:
Promise
<
void
>
;
private
_disposables
:
lifecycle
.
IDisposable
[];
private
_messageTitleDisposable
:
lifecycle
.
IDisposable
;
...
...
@@ -255,7 +255,7 @@ export class TerminalInstance implements ITerminalInstance {
/**
* Create xterm.js instance and attach data listeners.
*/
protected
async
_createXterm
():
T
Promise
<
void
>
{
protected
async
_createXterm
():
Promise
<
void
>
{
if
(
!
Terminal
)
{
Terminal
=
(
await
import
(
'
vscode-xterm
'
)).
Terminal
;
// Enable xterm.js addons
...
...
src/vs/workbench/services/extensions/electron-browser/extensionService.ts
浏览文件 @
d8a39866
...
...
@@ -649,7 +649,7 @@ export class ExtensionService extends Disposable implements IExtensionService {
}
}
private
static
async
_validateExtensionsCache
(
windowService
:
IWindowService
,
notificationService
:
INotificationService
,
environmentService
:
IEnvironmentService
,
cacheKey
:
string
,
input
:
ExtensionScannerInput
):
T
Promise
<
void
>
{
private
static
async
_validateExtensionsCache
(
windowService
:
IWindowService
,
notificationService
:
INotificationService
,
environmentService
:
IEnvironmentService
,
cacheKey
:
string
,
input
:
ExtensionScannerInput
):
Promise
<
void
>
{
const
cacheFolder
=
path
.
join
(
environmentService
.
userDataPath
,
MANIFEST_CACHE_FOLDER
);
const
cacheFile
=
path
.
join
(
cacheFolder
,
cacheKey
);
...
...
@@ -684,7 +684,7 @@ export class ExtensionService extends Disposable implements IExtensionService {
);
}
private
static
async
_readExtensionCache
(
environmentService
:
IEnvironmentService
,
cacheKey
:
string
):
T
Promise
<
IExtensionCacheData
>
{
private
static
async
_readExtensionCache
(
environmentService
:
IEnvironmentService
,
cacheKey
:
string
):
Promise
<
IExtensionCacheData
>
{
const
cacheFolder
=
path
.
join
(
environmentService
.
userDataPath
,
MANIFEST_CACHE_FOLDER
);
const
cacheFile
=
path
.
join
(
cacheFolder
,
cacheKey
);
...
...
@@ -698,7 +698,7 @@ export class ExtensionService extends Disposable implements IExtensionService {
return
null
;
}
private
static
async
_writeExtensionCache
(
environmentService
:
IEnvironmentService
,
cacheKey
:
string
,
cacheContents
:
IExtensionCacheData
):
T
Promise
<
void
>
{
private
static
async
_writeExtensionCache
(
environmentService
:
IEnvironmentService
,
cacheKey
:
string
,
cacheContents
:
IExtensionCacheData
):
Promise
<
void
>
{
const
cacheFolder
=
path
.
join
(
environmentService
.
userDataPath
,
MANIFEST_CACHE_FOLDER
);
const
cacheFile
=
path
.
join
(
cacheFolder
,
cacheKey
);
...
...
@@ -715,7 +715,7 @@ export class ExtensionService extends Disposable implements IExtensionService {
}
}
private
static
async
_scanExtensionsWithCache
(
windowService
:
IWindowService
,
notificationService
:
INotificationService
,
environmentService
:
IEnvironmentService
,
cacheKey
:
string
,
input
:
ExtensionScannerInput
,
log
:
ILog
):
T
Promise
<
IExtensionDescription
[]
>
{
private
static
async
_scanExtensionsWithCache
(
windowService
:
IWindowService
,
notificationService
:
INotificationService
,
environmentService
:
IEnvironmentService
,
cacheKey
:
string
,
input
:
ExtensionScannerInput
,
log
:
ILog
):
Promise
<
IExtensionDescription
[]
>
{
if
(
input
.
devMode
)
{
// Do not cache when running out of sources...
return
ExtensionScanner
.
scanExtensions
(
input
,
log
);
...
...
@@ -788,7 +788,7 @@ export class ExtensionService extends Disposable implements IExtensionService {
log
);
let
finalBuiltinExtensions
:
TPromise
<
IExtensionDescription
[]
>
=
builtinExtensions
;
let
finalBuiltinExtensions
:
TPromise
<
IExtensionDescription
[]
>
=
TPromise
.
wrap
(
builtinExtensions
)
;
if
(
devMode
)
{
const
builtInExtensionsFilePath
=
path
.
normalize
(
path
.
join
(
URI
.
parse
(
require
.
toUrl
(
''
)).
fsPath
,
'
..
'
,
'
build
'
,
'
builtInExtensions.json
'
));
...
...
src/vs/workbench/services/extensions/node/extensionPoints.ts
浏览文件 @
d8a39866
...
...
@@ -524,7 +524,7 @@ export class ExtensionScanner {
/**
* Scan a list of extensions defined in `absoluteFolderPath`
*/
public
static
async
scanExtensions
(
input
:
ExtensionScannerInput
,
log
:
ILog
,
resolver
:
IExtensionResolver
=
null
):
T
Promise
<
IExtensionDescription
[]
>
{
public
static
async
scanExtensions
(
input
:
ExtensionScannerInput
,
log
:
ILog
,
resolver
:
IExtensionResolver
=
null
):
Promise
<
IExtensionDescription
[]
>
{
const
absoluteFolderPath
=
input
.
absoluteFolderPath
;
const
isBuiltin
=
input
.
isBuiltin
;
const
isUnderDevelopment
=
input
.
isUnderDevelopment
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录