Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fabd8a57
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,发现更多精彩内容 >>
提交
fabd8a57
编写于
1月 24, 2018
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove custom marshaller in tasks extension host communication (#40169)
上级
2cb843bc
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
18 deletion
+13
-18
src/vs/workbench/api/electron-browser/mainThreadTask.ts
src/vs/workbench/api/electron-browser/mainThreadTask.ts
+3
-2
src/vs/workbench/api/node/extHost.protocol.ts
src/vs/workbench/api/node/extHost.protocol.ts
+5
-11
src/vs/workbench/api/node/extHostTask.ts
src/vs/workbench/api/node/extHostTask.ts
+3
-3
src/vs/workbench/parts/tasks/common/tasks.ts
src/vs/workbench/parts/tasks/common/tasks.ts
+2
-2
未找到文件。
src/vs/workbench/api/electron-browser/mainThreadTask.ts
浏览文件 @
fabd8a57
...
@@ -13,6 +13,7 @@ import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService';
...
@@ -13,6 +13,7 @@ import { ITaskService } from 'vs/workbench/parts/tasks/common/taskService';
import
{
ExtHostContext
,
MainThreadTaskShape
,
ExtHostTaskShape
,
MainContext
,
IExtHostContext
}
from
'
../node/extHost.protocol
'
;
import
{
ExtHostContext
,
MainThreadTaskShape
,
ExtHostTaskShape
,
MainContext
,
IExtHostContext
}
from
'
../node/extHost.protocol
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/electron-browser/extHostCustomers
'
;
import
{
extHostNamedCustomer
}
from
'
vs/workbench/api/electron-browser/extHostCustomers
'
;
import
URI
from
'
vs/base/common/uri
'
;
@
extHostNamedCustomer
(
MainContext
.
MainThreadTask
)
@
extHostNamedCustomer
(
MainContext
.
MainThreadTask
)
export
class
MainThreadTask
implements
MainThreadTaskShape
{
export
class
MainThreadTask
implements
MainThreadTaskShape
{
...
@@ -45,7 +46,7 @@ export class MainThreadTask implements MainThreadTaskShape {
...
@@ -45,7 +46,7 @@ export class MainThreadTask implements MainThreadTaskShape {
let
uri
=
(
task
.
_source
as
any
as
ExtensionTaskSourceTransfer
).
__workspaceFolder
;
let
uri
=
(
task
.
_source
as
any
as
ExtensionTaskSourceTransfer
).
__workspaceFolder
;
if
(
uri
)
{
if
(
uri
)
{
delete
(
task
.
_source
as
any
as
ExtensionTaskSourceTransfer
).
__workspaceFolder
;
delete
(
task
.
_source
as
any
as
ExtensionTaskSourceTransfer
).
__workspaceFolder
;
(
task
.
_source
as
any
).
workspaceFolder
=
this
.
_workspaceContextServer
.
getWorkspaceFolder
(
uri
);
(
task
.
_source
as
any
).
workspaceFolder
=
this
.
_workspaceContextServer
.
getWorkspaceFolder
(
URI
.
revive
(
uri
)
);
}
}
}
}
}
}
...
@@ -57,7 +58,7 @@ export class MainThreadTask implements MainThreadTaskShape {
...
@@ -57,7 +58,7 @@ export class MainThreadTask implements MainThreadTaskShape {
return
TPromise
.
wrap
<
void
>
(
undefined
);
return
TPromise
.
wrap
<
void
>
(
undefined
);
}
}
public
$unregisterTaskProvider
(
handle
:
number
):
TPromise
<
any
>
{
public
$unregisterTaskProvider
(
handle
:
number
):
TPromise
<
void
>
{
this
.
_taskService
.
unregisterTaskProvider
(
handle
);
this
.
_taskService
.
unregisterTaskProvider
(
handle
);
delete
this
.
_activeHandles
[
handle
];
delete
this
.
_activeHandles
[
handle
];
return
TPromise
.
wrap
<
void
>
(
undefined
);
return
TPromise
.
wrap
<
void
>
(
undefined
);
...
...
src/vs/workbench/api/node/extHost.protocol.ts
浏览文件 @
fabd8a57
...
@@ -4,13 +4,7 @@
...
@@ -4,13 +4,7 @@
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
'
use strict
'
;
import
{
import
{
createMainContextProxyIdentifier
as
createMainId
,
createExtHostContextProxyIdentifier
as
createExtId
,
ProxyIdentifier
,
IRPCProtocol
}
from
'
vs/workbench/services/extensions/node/proxyIdentifier
'
;
createMainContextProxyIdentifier
as
createMainId
,
createExtHostContextProxyIdentifier
as
createExtId
,
ProxyIdentifier
,
IRPCProtocol
,
ProxyType
}
from
'
vs/workbench/services/extensions/node/proxyIdentifier
'
;
import
*
as
vscode
from
'
vscode
'
;
import
*
as
vscode
from
'
vscode
'
;
...
@@ -374,8 +368,8 @@ export interface MainThreadFileSystemShape extends IDisposable {
...
@@ -374,8 +368,8 @@ export interface MainThreadFileSystemShape extends IDisposable {
}
}
export
interface
MainThreadTaskShape
extends
IDisposable
{
export
interface
MainThreadTaskShape
extends
IDisposable
{
$registerTaskProvider
(
handle
:
number
):
TPromise
<
any
>
;
$registerTaskProvider
(
handle
:
number
):
TPromise
<
void
>
;
$unregisterTaskProvider
(
handle
:
number
):
TPromise
<
any
>
;
$unregisterTaskProvider
(
handle
:
number
):
TPromise
<
void
>
;
}
}
export
interface
MainThreadExtensionServiceShape
extends
IDisposable
{
export
interface
MainThreadExtensionServiceShape
extends
IDisposable
{
...
@@ -788,7 +782,7 @@ export const MainContext = {
...
@@ -788,7 +782,7 @@ export const MainContext = {
MainThreadFileSystem
:
createMainId
<
MainThreadFileSystemShape
>
(
'
MainThreadFileSystem
'
),
MainThreadFileSystem
:
createMainId
<
MainThreadFileSystemShape
>
(
'
MainThreadFileSystem
'
),
MainThreadExtensionService
:
createMainId
<
MainThreadExtensionServiceShape
>
(
'
MainThreadExtensionService
'
),
MainThreadExtensionService
:
createMainId
<
MainThreadExtensionServiceShape
>
(
'
MainThreadExtensionService
'
),
MainThreadSCM
:
createMainId
<
MainThreadSCMShape
>
(
'
MainThreadSCM
'
),
MainThreadSCM
:
createMainId
<
MainThreadSCMShape
>
(
'
MainThreadSCM
'
),
MainThreadTask
:
createMainId
<
MainThreadTaskShape
>
(
'
MainThreadTask
'
,
ProxyType
.
CustomMarshaller
),
MainThreadTask
:
createMainId
<
MainThreadTaskShape
>
(
'
MainThreadTask
'
),
MainThreadWindow
:
createMainId
<
MainThreadWindowShape
>
(
'
MainThreadWindow
'
),
MainThreadWindow
:
createMainId
<
MainThreadWindowShape
>
(
'
MainThreadWindow
'
),
};
};
...
@@ -813,7 +807,7 @@ export const ExtHostContext = {
...
@@ -813,7 +807,7 @@ export const ExtHostContext = {
ExtHostLogService
:
createExtId
<
ExtHostLogServiceShape
>
(
'
ExtHostLogService
'
),
ExtHostLogService
:
createExtId
<
ExtHostLogServiceShape
>
(
'
ExtHostLogService
'
),
ExtHostTerminalService
:
createExtId
<
ExtHostTerminalServiceShape
>
(
'
ExtHostTerminalService
'
),
ExtHostTerminalService
:
createExtId
<
ExtHostTerminalServiceShape
>
(
'
ExtHostTerminalService
'
),
ExtHostSCM
:
createExtId
<
ExtHostSCMShape
>
(
'
ExtHostSCM
'
),
ExtHostSCM
:
createExtId
<
ExtHostSCMShape
>
(
'
ExtHostSCM
'
),
ExtHostTask
:
createExtId
<
ExtHostTaskShape
>
(
'
ExtHostTask
'
,
ProxyType
.
CustomMarshaller
),
ExtHostTask
:
createExtId
<
ExtHostTaskShape
>
(
'
ExtHostTask
'
),
ExtHostWorkspace
:
createExtId
<
ExtHostWorkspaceShape
>
(
'
ExtHostWorkspace
'
),
ExtHostWorkspace
:
createExtId
<
ExtHostWorkspaceShape
>
(
'
ExtHostWorkspace
'
),
ExtHostWindow
:
createExtId
<
ExtHostWindowShape
>
(
'
ExtHostWindow
'
),
ExtHostWindow
:
createExtId
<
ExtHostWindowShape
>
(
'
ExtHostWindow
'
),
};
};
src/vs/workbench/api/node/extHostTask.ts
浏览文件 @
fabd8a57
...
@@ -294,11 +294,11 @@ namespace ShellConfiguration {
...
@@ -294,11 +294,11 @@ namespace ShellConfiguration {
namespace
Tasks
{
namespace
Tasks
{
export
function
from
(
tasks
:
vscode
.
Task
[],
rootFolder
:
vscode
.
WorkspaceFolder
,
extension
:
IExtensionDescription
):
TaskSystem
.
Task
[]
{
export
function
from
(
tasks
:
vscode
.
Task
[],
rootFolder
:
vscode
.
WorkspaceFolder
,
extension
:
IExtensionDescription
):
TaskSystem
.
Contributed
Task
[]
{
if
(
tasks
===
void
0
||
tasks
===
null
)
{
if
(
tasks
===
void
0
||
tasks
===
null
)
{
return
[];
return
[];
}
}
let
result
:
TaskSystem
.
Task
[]
=
[];
let
result
:
TaskSystem
.
Contributed
Task
[]
=
[];
for
(
let
task
of
tasks
)
{
for
(
let
task
of
tasks
)
{
let
converted
=
fromSingle
(
task
,
rootFolder
,
extension
);
let
converted
=
fromSingle
(
task
,
rootFolder
,
extension
);
if
(
converted
)
{
if
(
converted
)
{
...
@@ -351,7 +351,7 @@ namespace Tasks {
...
@@ -351,7 +351,7 @@ namespace Tasks {
// We can't transfer a workspace folder object from the extension host to main since they differ
// We can't transfer a workspace folder object from the extension host to main since they differ
// in shape and we don't have backwards converting function. So transfer the URI and resolve the
// in shape and we don't have backwards converting function. So transfer the URI and resolve the
// workspace folder on the main side.
// workspace folder on the main side.
(
source
as
any
).
__workspaceFolder
=
workspaceFolder
?
workspaceFolder
.
uri
as
URI
:
undefined
;
(
source
as
any
as
TaskSystem
.
ExtensionTaskSourceTransfer
).
__workspaceFolder
=
workspaceFolder
?
workspaceFolder
.
uri
as
URI
:
undefined
;
let
label
=
nls
.
localize
(
'
task.label
'
,
'
{0}: {1}
'
,
source
.
label
,
task
.
name
);
let
label
=
nls
.
localize
(
'
task.label
'
,
'
{0}: {1}
'
,
source
.
label
,
task
.
name
);
let
key
=
(
task
as
types
.
Task
).
definitionKey
;
let
key
=
(
task
as
types
.
Task
).
definitionKey
;
let
kind
=
(
task
as
types
.
Task
).
definition
;
let
kind
=
(
task
as
types
.
Task
).
definition
;
...
...
src/vs/workbench/parts/tasks/common/tasks.ts
浏览文件 @
fabd8a57
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
'
use strict
'
;
import
URI
from
'
vs/base/common/uri
'
;
import
{
UriComponents
}
from
'
vs/base/common/uri
'
;
import
*
as
Types
from
'
vs/base/common/types
'
;
import
*
as
Types
from
'
vs/base/common/types
'
;
import
{
IJSONSchemaMap
}
from
'
vs/base/common/jsonSchema
'
;
import
{
IJSONSchemaMap
}
from
'
vs/base/common/jsonSchema
'
;
import
*
as
Objects
from
'
vs/base/common/objects
'
;
import
*
as
Objects
from
'
vs/base/common/objects
'
;
...
@@ -246,7 +246,7 @@ export interface ExtensionTaskSource {
...
@@ -246,7 +246,7 @@ export interface ExtensionTaskSource {
}
}
export
interface
ExtensionTaskSourceTransfer
{
export
interface
ExtensionTaskSourceTransfer
{
__workspaceFolder
:
U
RI
;
__workspaceFolder
:
U
riComponents
;
}
}
export
interface
InMemoryTaskSource
{
export
interface
InMemoryTaskSource
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录