Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
旅途_2012
vscode
提交
e1ac9a24
V
vscode
项目概览
旅途_2012
/
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,发现更多精彩内容 >>
提交
e1ac9a24
编写于
6月 20, 2019
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add ExtensionKind and remoteName propsed APIs, #74188
上级
6326c5d6
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
92 addition
and
23 deletion
+92
-23
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+44
-4
src/vs/workbench/api/common/extHost.protocol.ts
src/vs/workbench/api/common/extHost.protocol.ts
+1
-1
src/vs/workbench/api/common/extHostExtensionActivator.ts
src/vs/workbench/api/common/extHostExtensionActivator.ts
+4
-1
src/vs/workbench/api/common/extHostMemento.ts
src/vs/workbench/api/common/extHostMemento.ts
+5
-5
src/vs/workbench/api/common/extHostTypes.ts
src/vs/workbench/api/common/extHostTypes.ts
+5
-0
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+17
-4
src/vs/workbench/api/node/extHostExtensionService.ts
src/vs/workbench/api/node/extHostExtensionService.ts
+6
-5
src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts
...h/services/extensions/common/remoteExtensionHostClient.ts
+4
-1
src/vs/workbench/services/extensions/electron-browser/extensionHost.ts
...nch/services/extensions/electron-browser/extensionHost.ts
+4
-0
src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts
...nch/services/extensions/node/extensionHostProcessSetup.ts
+2
-2
未找到文件。
src/vs/vscode.proposed.d.ts
浏览文件 @
e1ac9a24
...
@@ -17,18 +17,58 @@
...
@@ -17,18 +17,58 @@
declare
module
'
vscode
'
{
declare
module
'
vscode
'
{
//#region Joh - ExecutionContext
//#region Joh - ExecutionContext
// THIS is a deprecated proposal
export
enum
ExtensionExecutionContext
{
export
enum
ExtensionExecutionContext
{
Local
=
1
,
Local
=
1
,
Remote
=
2
Remote
=
2
}
}
export
interface
ExtensionContext
{
executionContext
:
ExtensionExecutionContext
;
}
//#endregion
//#region Joh - ExtensionKind, vscode.env.remoteKind
/**
* In a remote window the extension kind describes if an extension
* runs where the UI (window) runs or if an extension runs remotely.
*/
export
enum
ExtensionKind
{
/**
* Extension runs where the UI runs.
*/
UI
=
1
,
/**
* Extension runs where the remote extension host runs.
*/
Workspace
=
2
}
export
interface
ExtensionContext
{
export
interface
ExtensionContext
{
/**
/**
* Describes the context in which this extension is executed, e.g.
* The extension kind describes if an extension runs where the UI runs
* a Node.js-context on the same machine or on a remote machine
* or if an extension runs where the remote extension host runs. The extension kind
* if defined in the `package.json` file of extensions but can also be refined
* via the the `remote.extensionKind`-setting. When no remote extension host exists,
* the value is [`ExtensionKind.UI`](#ExtensionKind.UI).
*/
*/
executionContext
:
ExtensionExecutionContext
;
extensionKind
:
ExtensionKind
;
}
export
namespace
env
{
/**
* The name of a remote. Defined by extensions, popular samples are `wsl` for the Windows
* Subsystem for Linux or `ssh` for remotes using a secure shell.
*
* *Note* that the value is `undefined` when there is no remote extension host but that the
* value is defined in all extension hosts (local and remote) in case a remote extension host
* exists. Use [`ExtensionContext#extensionKind`](#ExtensionContext.extensionKind) to know if
* a specific extension runs remote or not.
*/
export
const
remoteName
:
string
|
undefined
;
}
}
//#endregion
//#endregion
...
...
src/vs/workbench/api/common/extHost.protocol.ts
浏览文件 @
e1ac9a24
...
@@ -85,7 +85,7 @@ export interface IInitData {
...
@@ -85,7 +85,7 @@ export interface IInitData {
logLevel
:
LogLevel
;
logLevel
:
LogLevel
;
logsLocation
:
URI
;
logsLocation
:
URI
;
autoStart
:
boolean
;
autoStart
:
boolean
;
remote
Authority
?:
string
|
null
;
remote
:
{
isRemote
:
boolean
;
authority
:
string
|
undefined
;
}
;
}
}
export
interface
IConfigurationInitData
extends
IConfigurationData
{
export
interface
IConfigurationInitData
extends
IConfigurationData
{
...
...
src/vs/workbench/api/common/extHostExtensionActivator.ts
浏览文件 @
e1ac9a24
...
@@ -8,12 +8,14 @@ import { IDisposable } from 'vs/base/common/lifecycle';
...
@@ -8,12 +8,14 @@ import { IDisposable } from 'vs/base/common/lifecycle';
import
{
ExtensionDescriptionRegistry
}
from
'
vs/workbench/services/extensions/common/extensionDescriptionRegistry
'
;
import
{
ExtensionDescriptionRegistry
}
from
'
vs/workbench/services/extensions/common/extensionDescriptionRegistry
'
;
import
{
ExtensionIdentifier
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
ExtensionIdentifier
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
ExtensionActivationError
,
MissingDependencyError
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
ExtensionActivationError
,
MissingDependencyError
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
import
{
ExtensionKind
}
from
'
vs/workbench/api/common/extHostTypes
'
;
const
NO_OP_VOID_PROMISE
=
Promise
.
resolve
<
void
>
(
undefined
);
const
NO_OP_VOID_PROMISE
=
Promise
.
resolve
<
void
>
(
undefined
);
export
interface
IExtensionMemento
{
export
interface
IExtensionMemento
{
get
<
T
>
(
key
:
string
):
T
|
undefined
;
get
<
T
>
(
key
:
string
,
defaultValue
:
T
):
T
;
get
<
T
>
(
key
:
string
,
defaultValue
:
T
):
T
;
update
(
key
:
string
,
value
:
any
):
Promise
<
boolean
>
;
update
(
key
:
string
,
value
:
any
):
Promise
<
void
>
;
}
}
export
interface
IExtensionContext
{
export
interface
IExtensionContext
{
...
@@ -26,6 +28,7 @@ export interface IExtensionContext {
...
@@ -26,6 +28,7 @@ export interface IExtensionContext {
asAbsolutePath
(
relativePath
:
string
):
string
;
asAbsolutePath
(
relativePath
:
string
):
string
;
readonly
logPath
:
string
;
readonly
logPath
:
string
;
executionContext
:
number
;
executionContext
:
number
;
extensionKind
:
ExtensionKind
;
}
}
/**
/**
...
...
src/vs/workbench/api/common/extHostMemento.ts
浏览文件 @
e1ac9a24
...
@@ -38,7 +38,9 @@ export class ExtensionMemento implements IExtensionMemento {
...
@@ -38,7 +38,9 @@ export class ExtensionMemento implements IExtensionMemento {
return
this
.
_init
;
return
this
.
_init
;
}
}
get
<
T
>
(
key
:
string
,
defaultValue
:
T
):
T
{
get
<
T
>
(
key
:
string
):
T
|
undefined
;
get
<
T
>
(
key
:
string
,
defaultValue
:
T
):
T
;
get
<
T
>
(
key
:
string
,
defaultValue
?:
T
):
T
{
let
value
=
this
.
_value
[
key
];
let
value
=
this
.
_value
[
key
];
if
(
typeof
value
===
'
undefined
'
)
{
if
(
typeof
value
===
'
undefined
'
)
{
value
=
defaultValue
;
value
=
defaultValue
;
...
@@ -46,11 +48,9 @@ export class ExtensionMemento implements IExtensionMemento {
...
@@ -46,11 +48,9 @@ export class ExtensionMemento implements IExtensionMemento {
return
value
;
return
value
;
}
}
update
(
key
:
string
,
value
:
any
):
Promise
<
boolean
>
{
update
(
key
:
string
,
value
:
any
):
Promise
<
void
>
{
this
.
_value
[
key
]
=
value
;
this
.
_value
[
key
]
=
value
;
return
this
.
_storage
return
this
.
_storage
.
setValue
(
this
.
_shared
,
this
.
_id
,
this
.
_value
);
.
setValue
(
this
.
_shared
,
this
.
_id
,
this
.
_value
)
.
then
(()
=>
true
);
}
}
dispose
():
void
{
dispose
():
void
{
...
...
src/vs/workbench/api/common/extHostTypes.ts
浏览文件 @
e1ac9a24
...
@@ -2319,3 +2319,8 @@ export enum ExtensionExecutionContext {
...
@@ -2319,3 +2319,8 @@ export enum ExtensionExecutionContext {
Local
=
1
,
Local
=
1
,
Remote
=
2
Remote
=
2
}
}
export
enum
ExtensionKind
{
UI
=
1
,
Workspace
=
2
}
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
e1ac9a24
...
@@ -125,10 +125,10 @@ export function createApiFactory(
...
@@ -125,10 +125,10 @@ export function createApiFactory(
const
extHostProgress
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostProgress
,
new
ExtHostProgress
(
rpcProtocol
.
getProxy
(
MainContext
.
MainThreadProgress
)));
const
extHostProgress
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostProgress
,
new
ExtHostProgress
(
rpcProtocol
.
getProxy
(
MainContext
.
MainThreadProgress
)));
const
extHostOutputService
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostOutputService
,
new
ExtHostOutputService
(
LogOutputChannelFactory
,
initData
.
logsLocation
,
rpcProtocol
));
const
extHostOutputService
=
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostOutputService
,
new
ExtHostOutputService
(
LogOutputChannelFactory
,
initData
.
logsLocation
,
rpcProtocol
));
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostStorage
,
extHostStorage
);
rpcProtocol
.
set
(
ExtHostContext
.
ExtHostStorage
,
extHostStorage
);
if
(
initData
.
remote
A
uthority
)
{
if
(
initData
.
remote
.
a
uthority
)
{
extHostTask
.
registerTaskSystem
(
Schemas
.
vscodeRemote
,
{
extHostTask
.
registerTaskSystem
(
Schemas
.
vscodeRemote
,
{
scheme
:
Schemas
.
vscodeRemote
,
scheme
:
Schemas
.
vscodeRemote
,
authority
:
initData
.
remote
A
uthority
,
authority
:
initData
.
remote
.
a
uthority
,
platform
:
process
.
platform
platform
:
process
.
platform
});
});
...
@@ -150,7 +150,7 @@ export function createApiFactory(
...
@@ -150,7 +150,7 @@ export function createApiFactory(
const
extHostLanguages
=
new
ExtHostLanguages
(
rpcProtocol
,
extHostDocuments
);
const
extHostLanguages
=
new
ExtHostLanguages
(
rpcProtocol
,
extHostDocuments
);
// Register an output channel for exthost log
// Register an output channel for exthost log
const
outputChannelName
=
initData
.
remote
Authority
?
nls
.
localize
(
'
remote extension host Log
'
,
"
Remote Extension Host
"
)
:
nls
.
localize
(
'
extension host Log
'
,
"
Extension Host
"
);
const
outputChannelName
=
initData
.
remote
.
isRemote
?
nls
.
localize
(
'
remote extension host Log
'
,
"
Remote Extension Host
"
)
:
nls
.
localize
(
'
extension host Log
'
,
"
Extension Host
"
);
extHostOutputService
.
createOutputChannelFromLogFile
(
outputChannelName
,
extHostLogService
.
logFile
);
extHostOutputService
.
createOutputChannelFromLogFile
(
outputChannelName
,
extHostLogService
.
logFile
);
// Register API-ish commands
// Register API-ish commands
...
@@ -258,12 +258,24 @@ export function createApiFactory(
...
@@ -258,12 +258,24 @@ export function createApiFactory(
return
extHostTerminalService
.
getDefaultShell
(
configProvider
);
return
extHostTerminalService
.
getDefaultShell
(
configProvider
);
},
},
openExternal
(
uri
:
URI
)
{
openExternal
(
uri
:
URI
)
{
return
extHostWindow
.
openUri
(
uri
,
{
allowTunneling
:
!!
initData
.
remote
Authority
});
return
extHostWindow
.
openUri
(
uri
,
{
allowTunneling
:
!!
initData
.
remote
.
isRemote
});
},
},
get
webviewResourceRoot
()
{
get
webviewResourceRoot
()
{
checkProposedApiEnabled
(
extension
);
checkProposedApiEnabled
(
extension
);
return
initData
.
environment
.
webviewResourceRoot
;
return
initData
.
environment
.
webviewResourceRoot
;
},
},
get
remoteName
()
{
checkProposedApiEnabled
(
extension
);
if
(
!
initData
.
remote
.
authority
)
{
return
undefined
;
}
const
pos
=
initData
.
remote
.
authority
.
indexOf
(
'
+
'
);
if
(
pos
<
0
)
{
// funky? bad authority?
return
initData
.
remote
.
authority
;
}
return
initData
.
remote
.
authority
.
substr
(
0
,
pos
);
}
};
};
if
(
!
initData
.
environment
.
extensionTestsLocationURI
)
{
if
(
!
initData
.
environment
.
extensionTestsLocationURI
)
{
// allow to patch env-function when running tests
// allow to patch env-function when running tests
...
@@ -824,6 +836,7 @@ export function createApiFactory(
...
@@ -824,6 +836,7 @@ export function createApiFactory(
EndOfLine
:
extHostTypes
.
EndOfLine
,
EndOfLine
:
extHostTypes
.
EndOfLine
,
EventEmitter
:
Emitter
,
EventEmitter
:
Emitter
,
ExtensionExecutionContext
:
extHostTypes
.
ExtensionExecutionContext
,
ExtensionExecutionContext
:
extHostTypes
.
ExtensionExecutionContext
,
ExtensionKind
:
extHostTypes
.
ExtensionKind
,
CustomExecution
:
extHostTypes
.
CustomExecution
,
CustomExecution
:
extHostTypes
.
CustomExecution
,
FileChangeType
:
extHostTypes
.
FileChangeType
,
FileChangeType
:
extHostTypes
.
FileChangeType
,
FileSystemError
:
extHostTypes
.
FileSystemError
,
FileSystemError
:
extHostTypes
.
FileSystemError
,
...
...
src/vs/workbench/api/node/extHostExtensionService.ts
浏览文件 @
e1ac9a24
...
@@ -32,7 +32,7 @@ import { withNullAsUndefined } from 'vs/base/common/types';
...
@@ -32,7 +32,7 @@ import { withNullAsUndefined } from 'vs/base/common/types';
import
{
VSBuffer
}
from
'
vs/base/common/buffer
'
;
import
{
VSBuffer
}
from
'
vs/base/common/buffer
'
;
import
{
ExtensionMemento
}
from
'
vs/workbench/api/common/extHostMemento
'
;
import
{
ExtensionMemento
}
from
'
vs/workbench/api/common/extHostMemento
'
;
import
{
ExtensionStoragePaths
}
from
'
vs/workbench/api/node/extHostStoragePaths
'
;
import
{
ExtensionStoragePaths
}
from
'
vs/workbench/api/node/extHostStoragePaths
'
;
import
{
RemoteAuthorityResolverError
,
ExtensionExecutionContext
}
from
'
vs/workbench/api/common/extHostTypes
'
;
import
{
RemoteAuthorityResolverError
,
ExtensionExecutionContext
,
ExtensionKind
}
from
'
vs/workbench/api/common/extHostTypes
'
;
import
{
IURITransformer
}
from
'
vs/base/common/uriIpc
'
;
import
{
IURITransformer
}
from
'
vs/base/common/uriIpc
'
;
interface
ITestRunner
{
interface
ITestRunner
{
...
@@ -153,7 +153,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
...
@@ -153,7 +153,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
const
extensionPaths
=
await
this
.
getExtensionPathIndex
();
const
extensionPaths
=
await
this
.
getExtensionPathIndex
();
NodeModuleRequireInterceptor
.
INSTANCE
.
register
(
new
VSCodeNodeModuleFactory
(
this
.
_extensionApiFactory
,
extensionPaths
,
this
.
_registry
,
configProvider
));
NodeModuleRequireInterceptor
.
INSTANCE
.
register
(
new
VSCodeNodeModuleFactory
(
this
.
_extensionApiFactory
,
extensionPaths
,
this
.
_registry
,
configProvider
));
NodeModuleRequireInterceptor
.
INSTANCE
.
register
(
new
KeytarNodeModuleFactory
(
this
.
_extHostContext
.
getProxy
(
MainContext
.
MainThreadKeytar
),
this
.
_environment
));
NodeModuleRequireInterceptor
.
INSTANCE
.
register
(
new
KeytarNodeModuleFactory
(
this
.
_extHostContext
.
getProxy
(
MainContext
.
MainThreadKeytar
),
this
.
_environment
));
if
(
this
.
_initData
.
remote
Authority
)
{
if
(
this
.
_initData
.
remote
.
isRemote
)
{
NodeModuleRequireInterceptor
.
INSTANCE
.
register
(
new
OpenNodeModuleFactory
(
NodeModuleRequireInterceptor
.
INSTANCE
.
register
(
new
OpenNodeModuleFactory
(
this
.
_extHostContext
.
getProxy
(
MainContext
.
MainThreadWindow
),
this
.
_extHostContext
.
getProxy
(
MainContext
.
MainThreadWindow
),
this
.
_extHostContext
.
getProxy
(
MainContext
.
MainThreadTelemetry
),
this
.
_extHostContext
.
getProxy
(
MainContext
.
MainThreadTelemetry
),
...
@@ -340,7 +340,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
...
@@ -340,7 +340,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
});
});
}
}
private
_loadExtensionContext
(
extensionDescription
:
IExtensionDescription
):
Promise
<
I
ExtensionContext
>
{
private
_loadExtensionContext
(
extensionDescription
:
IExtensionDescription
):
Promise
<
vscode
.
ExtensionContext
>
{
const
globalState
=
new
ExtensionMemento
(
extensionDescription
.
identifier
.
value
,
true
,
this
.
_storage
);
const
globalState
=
new
ExtensionMemento
(
extensionDescription
.
identifier
.
value
,
true
,
this
.
_storage
);
const
workspaceState
=
new
ExtensionMemento
(
extensionDescription
.
identifier
.
value
,
false
,
this
.
_storage
);
const
workspaceState
=
new
ExtensionMemento
(
extensionDescription
.
identifier
.
value
,
false
,
this
.
_storage
);
...
@@ -361,7 +361,8 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
...
@@ -361,7 +361,8 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
globalStoragePath
:
this
.
_storagePath
.
globalValue
(
extensionDescription
),
globalStoragePath
:
this
.
_storagePath
.
globalValue
(
extensionDescription
),
asAbsolutePath
:
(
relativePath
:
string
)
=>
{
return
path
.
join
(
extensionDescription
.
extensionLocation
.
fsPath
,
relativePath
);
},
asAbsolutePath
:
(
relativePath
:
string
)
=>
{
return
path
.
join
(
extensionDescription
.
extensionLocation
.
fsPath
,
relativePath
);
},
logPath
:
that
.
_extHostLogService
.
getLogDirectory
(
extensionDescription
.
identifier
),
logPath
:
that
.
_extHostLogService
.
getLogDirectory
(
extensionDescription
.
identifier
),
executionContext
:
this
.
_initData
.
remoteAuthority
?
ExtensionExecutionContext
.
Remote
:
ExtensionExecutionContext
.
Local
executionContext
:
this
.
_initData
.
remote
.
isRemote
?
ExtensionExecutionContext
.
Remote
:
ExtensionExecutionContext
.
Local
,
extensionKind
:
this
.
_initData
.
remote
.
isRemote
?
ExtensionKind
.
Workspace
:
ExtensionKind
.
UI
});
});
});
});
}
}
...
@@ -562,7 +563,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
...
@@ -562,7 +563,7 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
// messages to the main process, we delay the exit() by some time
// messages to the main process, we delay the exit() by some time
setTimeout
(()
=>
{
setTimeout
(()
=>
{
// If extension tests are running, give the exit code to the renderer
// If extension tests are running, give the exit code to the renderer
if
(
this
.
_initData
.
remote
Authority
&&
!!
this
.
_initData
.
environment
.
extensionTestsLocationURI
)
{
if
(
this
.
_initData
.
remote
.
isRemote
&&
!!
this
.
_initData
.
environment
.
extensionTestsLocationURI
)
{
this
.
_mainThreadExtensionsProxy
.
$onExtensionHostExit
(
code
);
this
.
_mainThreadExtensionsProxy
.
$onExtensionHostExit
(
code
);
return
;
return
;
}
}
...
...
src/vs/workbench/services/extensions/common/remoteExtensionHostClient.ts
浏览文件 @
e1ac9a24
...
@@ -197,6 +197,10 @@ export class RemoteExtensionHostClient extends Disposable implements IExtensionH
...
@@ -197,6 +197,10 @@ export class RemoteExtensionHostClient extends Disposable implements IExtensionH
id
:
workspace
.
id
,
id
:
workspace
.
id
,
name
:
this
.
_labelService
.
getWorkspaceLabel
(
workspace
)
name
:
this
.
_labelService
.
getWorkspaceLabel
(
workspace
)
},
},
remote
:
{
isRemote
:
true
,
authority
:
this
.
_initDataProvider
.
remoteAuthority
},
resolvedExtensions
:
resolvedExtensions
,
resolvedExtensions
:
resolvedExtensions
,
hostExtensions
:
hostExtensions
,
hostExtensions
:
hostExtensions
,
extensions
:
remoteExtensionHostData
.
extensions
,
extensions
:
remoteExtensionHostData
.
extensions
,
...
@@ -204,7 +208,6 @@ export class RemoteExtensionHostClient extends Disposable implements IExtensionH
...
@@ -204,7 +208,6 @@ export class RemoteExtensionHostClient extends Disposable implements IExtensionH
logLevel
:
this
.
_logService
.
getLevel
(),
logLevel
:
this
.
_logService
.
getLevel
(),
logsLocation
:
remoteExtensionHostData
.
extensionHostLogsPath
,
logsLocation
:
remoteExtensionHostData
.
extensionHostLogsPath
,
autoStart
:
true
,
autoStart
:
true
,
remoteAuthority
:
this
.
_initDataProvider
.
remoteAuthority
,
};
};
return
r
;
return
r
;
});
});
...
...
src/vs/workbench/services/extensions/electron-browser/extensionHost.ts
浏览文件 @
e1ac9a24
...
@@ -403,6 +403,10 @@ export class ExtensionHostProcessWorker implements IExtensionHostStarter {
...
@@ -403,6 +403,10 @@ export class ExtensionHostProcessWorker implements IExtensionHostStarter {
name
:
this
.
_labelService
.
getWorkspaceLabel
(
workspace
),
name
:
this
.
_labelService
.
getWorkspaceLabel
(
workspace
),
isUntitled
:
workspace
.
configuration
?
isEqualOrParent
(
workspace
.
configuration
,
this
.
_environmentService
.
untitledWorkspacesHome
)
:
false
isUntitled
:
workspace
.
configuration
?
isEqualOrParent
(
workspace
.
configuration
,
this
.
_environmentService
.
untitledWorkspacesHome
)
:
false
},
},
remote
:
{
authority
:
this
.
_environmentService
.
configuration
.
remoteAuthority
,
isRemote
:
false
},
resolvedExtensions
:
[],
resolvedExtensions
:
[],
hostExtensions
:
[],
hostExtensions
:
[],
extensions
:
extensionDescriptions
,
extensions
:
extensionDescriptions
,
...
...
src/vs/workbench/services/extensions/node/extensionHostProcessSetup.ts
浏览文件 @
e1ac9a24
...
@@ -319,10 +319,10 @@ export async function startExtensionHostProcess(): Promise<void> {
...
@@ -319,10 +319,10 @@ export async function startExtensionHostProcess(): Promise<void> {
// Attempt to load uri transformer
// Attempt to load uri transformer
let
uriTransformer
:
IURITransformer
|
null
=
null
;
let
uriTransformer
:
IURITransformer
|
null
=
null
;
if
(
initData
.
remote
A
uthority
&&
args
.
uriTransformerPath
)
{
if
(
initData
.
remote
.
a
uthority
&&
args
.
uriTransformerPath
)
{
try
{
try
{
const
rawURITransformerFactory
=
<
any
>
require
.
__$__nodeRequire
(
args
.
uriTransformerPath
);
const
rawURITransformerFactory
=
<
any
>
require
.
__$__nodeRequire
(
args
.
uriTransformerPath
);
const
rawURITransformer
=
<
IRawURITransformer
>
rawURITransformerFactory
(
initData
.
remote
A
uthority
);
const
rawURITransformer
=
<
IRawURITransformer
>
rawURITransformerFactory
(
initData
.
remote
.
a
uthority
);
uriTransformer
=
new
URITransformer
(
rawURITransformer
);
uriTransformer
=
new
URITransformer
(
rawURITransformer
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
);
console
.
error
(
e
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录