Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
e07de5b3
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
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,发现更多精彩内容 >>
提交
e07de5b3
编写于
4月 04, 2019
作者:
A
Andre Weinand
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support debuging more than one extension; fixes #71081
上级
0bce369f
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
173 addition
and
38 deletion
+173
-38
src/bootstrap-window.js
src/bootstrap-window.js
+10
-0
src/vs/code/electron-browser/workbench/workbench.js
src/vs/code/electron-browser/workbench/workbench.js
+8
-1
src/vs/code/electron-main/window.ts
src/vs/code/electron-main/window.ts
+4
-2
src/vs/code/electron-main/windows.ts
src/vs/code/electron-main/windows.ts
+25
-4
src/vs/code/node/windowsFinder.ts
src/vs/code/node/windowsFinder.ts
+25
-5
src/vs/platform/environment/common/environment.ts
src/vs/platform/environment/common/environment.ts
+2
-2
src/vs/platform/environment/node/environmentService.ts
src/vs/platform/environment/node/environmentService.ts
+9
-2
src/vs/platform/windows/electron-main/windows.ts
src/vs/platform/windows/electron-main/windows.ts
+1
-1
src/vs/workbench/api/common/extHost.protocol.ts
src/vs/workbench/api/common/extHost.protocol.ts
+1
-1
src/vs/workbench/browser/nodeless.simpleservices.ts
src/vs/workbench/browser/nodeless.simpleservices.ts
+1
-1
src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts
...sions/test/electron-browser/extensionsTipsService.test.ts
+1
-1
src/vs/workbench/services/extensions/common/extensionDevOptions.ts
...rkbench/services/extensions/common/extensionDevOptions.ts
+13
-2
src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
...ces/extensions/electron-browser/cachedExtensionScanner.ts
+24
-4
src/vs/workbench/services/extensions/electron-browser/extensionHost.ts
...nch/services/extensions/electron-browser/extensionHost.ts
+14
-2
src/vs/workbench/services/extensions/electron-browser/extensionService.ts
.../services/extensions/electron-browser/extensionService.ts
+20
-6
src/vs/workbench/services/remote/common/remoteAgentEnvironmentChannel.ts
...h/services/remote/common/remoteAgentEnvironmentChannel.ts
+2
-2
src/vs/workbench/services/themes/browser/workbenchThemeService.ts
...orkbench/services/themes/browser/workbenchThemeService.ts
+13
-2
未找到文件。
src/bootstrap-window.js
浏览文件 @
e07de5b3
...
...
@@ -30,6 +30,16 @@ exports.load = function (modulePaths, resultCallback, options) {
const
path
=
require
(
'
path
'
);
const
args
=
parseURLQueryArgs
();
/**
* // configuration: IWindowConfiguration
* @type {{
* zoomLevel?: number,
* extensionDevelopmentPath?: string | string[],
* extensionTestsPath?: string,
* userEnv?: { [key: string]: string | undefined },
* appRoot?: string,
* nodeCachedDataDir?: string
* }} */
const
configuration
=
JSON
.
parse
(
args
[
'
config
'
]
||
'
{}
'
)
||
{};
// Apply zoom level early to avoid glitches
...
...
src/vs/code/electron-browser/workbench/workbench.js
浏览文件 @
e07de5b3
...
...
@@ -49,7 +49,14 @@ bootstrapWindow.load([
});
/**
* @param {object} configuration
* // configuration: IWindowConfiguration
* @param {{
* partsSplashPath?: string,
* highContrast?: boolean,
* extensionDevelopmentPath?: string | string[],
* folderUri?: object,
* workspace?: object
* }} configuration
*/
function
showPartsSplash
(
configuration
)
{
perf
.
mark
(
'
willShowPartsSplash
'
);
...
...
src/vs/code/electron-main/window.ts
浏览文件 @
e07de5b3
...
...
@@ -30,7 +30,7 @@ import { endsWith } from 'vs/base/common/strings';
export
interface
IWindowCreationOptions
{
state
:
IWindowState
;
extensionDevelopmentPath
?:
string
;
extensionDevelopmentPath
?:
string
|
string
[]
;
isExtensionTestHost
?:
boolean
;
}
...
...
@@ -217,9 +217,11 @@ export class CodeWindow extends Disposable implements ICodeWindow {
return
!!
this
.
config
.
extensionTestsPath
;
}
get
extensionDevelopmentPath
():
string
|
undefined
{
/*
get extensionDevelopmentPaths(): string | string[] | undefined {
return this.config.extensionDevelopmentPath;
}
*/
get
config
():
IWindowConfiguration
{
return
this
.
currentConfig
;
...
...
src/vs/code/electron-main/windows.ts
浏览文件 @
e07de5b3
...
...
@@ -1153,7 +1153,7 @@ export class WindowsManager implements IWindowsMainService {
return
{
openFolderInNewWindow
:
!!
openFolderInNewWindow
,
openFilesInNewWindow
};
}
openExtensionDevelopmentHostWindow
(
extensionDevelopmentPath
:
string
,
openConfig
:
IOpenConfiguration
):
void
{
openExtensionDevelopmentHostWindow
(
extensionDevelopmentPath
:
string
|
string
[]
,
openConfig
:
IOpenConfiguration
):
void
{
// Reload an existing extension development host window on the same path
// We currently do not allow more than one extension development window
...
...
@@ -1207,9 +1207,30 @@ export class WindowsManager implements IWindowsMainService {
openConfig
.
cli
[
'
folder-uri
'
]
=
folderUris
;
openConfig
.
cli
[
'
file-uri
'
]
=
fileUris
;
const
match
=
extensionDevelopmentPath
.
match
(
/^vscode-remote:
\/\/([^\/]
+
)
/
);
if
(
match
)
{
openConfig
.
cli
[
'
remote
'
]
=
URI
.
parse
(
extensionDevelopmentPath
).
authority
;
if
(
Array
.
isArray
(
extensionDevelopmentPath
))
{
let
authority
:
string
|
undefined
=
undefined
;
for
(
let
p
of
extensionDevelopmentPath
)
{
const
match
=
p
.
match
(
/^vscode-remote:
\/\/([^\/]
+
)
/
);
if
(
match
)
{
const
auth
=
URI
.
parse
(
p
).
authority
;
if
(
authority
)
{
if
(
auth
!==
authority
)
{
console
.
log
(
'
more than one authority
'
);
}
}
else
{
authority
=
auth
;
}
}
}
if
(
authority
)
{
openConfig
.
cli
[
'
remote
'
]
=
authority
;
}
}
else
{
const
match
=
extensionDevelopmentPath
.
match
(
/^vscode-remote:
\/\/([^\/]
+
)
/
);
if
(
match
)
{
openConfig
.
cli
[
'
remote
'
]
=
URI
.
parse
(
extensionDevelopmentPath
).
authority
;
}
}
// Open it
...
...
src/vs/code/node/windowsFinder.ts
浏览文件 @
e07de5b3
...
...
@@ -14,7 +14,7 @@ export interface ISimpleWindow {
openedWorkspace
?:
IWorkspaceIdentifier
;
openedFolderUri
?:
URI
;
extensionDevelopmentPath
?:
string
;
extensionDevelopmentPath
?:
string
|
string
[]
;
lastFocusTime
:
number
;
}
...
...
@@ -95,13 +95,33 @@ export function findWindowOnWorkspace<W extends ISimpleWindow>(windows: W[], wor
return
null
;
}
export
function
findWindowOnExtensionDevelopmentPath
<
W
extends
ISimpleWindow
>
(
windows
:
W
[],
extensionDevelopmentPath
:
string
):
W
|
null
{
export
function
findWindowOnExtensionDevelopmentPath
<
W
extends
ISimpleWindow
>
(
windows
:
W
[],
extensionDevelopmentPath
:
string
|
string
[]):
W
|
null
{
const
matches
=
(
uriString
:
string
):
boolean
=>
{
if
(
Array
.
isArray
(
extensionDevelopmentPath
))
{
return
extensionDevelopmentPath
.
some
(
p
=>
extpath
.
isEqual
(
p
,
uriString
,
!
platform
.
isLinux
/* ignorecase */
));
}
else
if
(
extensionDevelopmentPath
)
{
return
extpath
.
isEqual
(
extensionDevelopmentPath
,
uriString
,
!
platform
.
isLinux
/* ignorecase */
);
}
return
false
;
};
for
(
const
window
of
windows
)
{
// match on extension development path. The path can be a path or uri string, using paths.isEqual is not 100% correct but good enough
if
(
window
.
extensionDevelopmentPath
&&
extpath
.
isEqual
(
window
.
extensionDevelopmentPath
,
extensionDevelopmentPath
,
!
platform
.
isLinux
/* ignorecase */
))
{
return
window
;
// match on extension development path. The path can be one or more paths or uri strings, using paths.isEqual is not 100% correct but good enough
if
(
window
.
extensionDevelopmentPath
)
{
if
(
Array
.
isArray
(
window
.
extensionDevelopmentPath
))
{
if
(
window
.
extensionDevelopmentPath
.
some
(
p
=>
matches
(
p
)))
{
return
window
;
}
}
else
if
(
window
.
extensionDevelopmentPath
)
{
if
(
matches
(
window
.
extensionDevelopmentPath
))
{
return
window
;
}
}
}
}
return
null
;
}
...
...
src/vs/platform/environment/common/environment.ts
浏览文件 @
e07de5b3
...
...
@@ -37,7 +37,7 @@ export interface ParsedArgs {
logExtensionHostCommunication
?:
boolean
;
'
extensions-dir
'
?:
string
;
'
builtin-extensions-dir
'
?:
string
;
extensionDevelopmentPath
?:
string
;
// either a local path or a URI
extensionDevelopmentPath
?:
string
|
string
[];
// one or more local paths or URIs
extensionTestsPath
?:
string
;
// either a local path or a URI
'
inspect-extensions
'
?:
string
;
'
inspect-brk-extensions
'
?:
string
;
...
...
@@ -116,7 +116,7 @@ export interface IEnvironmentService {
disableExtensions
:
boolean
|
string
[];
builtinExtensionsPath
:
string
;
extensionsPath
:
string
;
extensionDevelopmentLocationURI
?:
URI
;
extensionDevelopmentLocationURI
?:
URI
|
URI
[]
;
extensionTestsLocationURI
?:
URI
;
debugExtensionHost
:
IExtensionHostDebugParams
;
...
...
src/vs/platform/environment/node/environmentService.ts
浏览文件 @
e07de5b3
...
...
@@ -172,9 +172,16 @@ export class EnvironmentService implements IEnvironmentService {
}
@
memoize
get
extensionDevelopmentLocationURI
():
URI
|
undefined
{
get
extensionDevelopmentLocationURI
():
URI
|
URI
[]
|
undefined
{
const
s
=
this
.
_args
.
extensionDevelopmentPath
;
if
(
s
)
{
if
(
Array
.
isArray
(
s
))
{
return
s
.
map
(
p
=>
{
if
(
/^
[^
:
/
?#
]
+
?
:
\/\/
/
.
test
(
p
))
{
return
URI
.
parse
(
p
);
}
return
URI
.
file
(
path
.
normalize
(
p
));
});
}
else
if
(
s
)
{
if
(
/^
[^
:
/
?#
]
+
?
:
\/\/
/
.
test
(
s
))
{
return
URI
.
parse
(
s
);
}
...
...
src/vs/platform/windows/electron-main/windows.ts
浏览文件 @
e07de5b3
...
...
@@ -97,7 +97,7 @@ export interface IWindowsMainService {
enterWorkspace
(
win
:
ICodeWindow
,
path
:
URI
):
Promise
<
IEnterWorkspaceResult
|
undefined
>
;
closeWorkspace
(
win
:
ICodeWindow
):
void
;
open
(
openConfig
:
IOpenConfiguration
):
ICodeWindow
[];
openExtensionDevelopmentHostWindow
(
extensionDevelopmentPath
:
string
,
openConfig
:
IOpenConfiguration
):
void
;
openExtensionDevelopmentHostWindow
(
extensionDevelopmentPath
:
string
|
string
[]
,
openConfig
:
IOpenConfiguration
):
void
;
pickFileFolderAndOpen
(
options
:
INativeOpenDialogOptions
):
Promise
<
void
>
;
pickFolderAndOpen
(
options
:
INativeOpenDialogOptions
):
Promise
<
void
>
;
pickFileAndOpen
(
options
:
INativeOpenDialogOptions
):
Promise
<
void
>
;
...
...
src/vs/workbench/api/common/extHost.protocol.ts
浏览文件 @
e07de5b3
...
...
@@ -51,7 +51,7 @@ export interface IEnvironment {
isExtensionDevelopmentDebug
:
boolean
;
appRoot
?:
URI
;
appSettingsHome
?:
URI
;
extensionDevelopmentLocationURI
?:
URI
;
extensionDevelopmentLocationURI
?:
URI
|
URI
[]
;
extensionTestsLocationURI
?:
URI
;
globalStorageHome
:
URI
;
userHome
:
URI
;
...
...
src/vs/workbench/browser/nodeless.simpleservices.ts
浏览文件 @
e07de5b3
...
...
@@ -251,7 +251,7 @@ export class SimpleEnvironmentService implements IEnvironmentService {
disableExtensions
:
boolean
|
string
[];
builtinExtensionsPath
:
string
;
extensionsPath
:
string
;
extensionDevelopmentLocationURI
?:
URI
;
extensionDevelopmentLocationURI
?:
URI
|
URI
[]
;
extensionTestsPath
?:
string
;
debugExtensionHost
:
IExtensionHostDebugParams
;
debugSearch
:
IDebugParams
;
...
...
src/vs/workbench/contrib/extensions/test/electron-browser/extensionsTipsService.test.ts
浏览文件 @
e07de5b3
...
...
@@ -326,7 +326,7 @@ suite('ExtensionsTipsService Test', () => {
});
test
(
'
ExtensionTipsService: No Prompt for valid workspace recommendations during extension development
'
,
()
=>
{
instantiationService
.
stub
(
IEnvironmentService
,
{
extensionDevelopmentLocationURI
:
URI
.
file
(
'
/folder/file
'
)
});
instantiationService
.
stub
(
IEnvironmentService
,
{
extensionDevelopmentLocationURI
:
[
URI
.
file
(
'
/folder/file
'
)]
});
return
testNoPromptOrRecommendationsForValidRecommendations
(
mockTestData
.
validRecommendedExtensions
);
});
...
...
src/vs/workbench/services/extensions/common/extensionDevOptions.ts
浏览文件 @
e07de5b3
...
...
@@ -16,8 +16,19 @@ export interface IExtensionDevOptions {
export
function
parseExtensionDevOptions
(
environmentService
:
IEnvironmentService
):
IExtensionDevOptions
{
// handle extension host lifecycle a bit special when we know we are developing an extension that runs inside
let
isExtensionDevHost
=
environmentService
.
isExtensionDevelopment
;
const
extDevLoc
=
environmentService
.
extensionDevelopmentLocationURI
;
const
debugOk
=
!
extDevLoc
||
extDevLoc
.
scheme
===
Schemas
.
file
;
let
debugOk
=
true
;
let
extDevLoc
=
environmentService
.
extensionDevelopmentLocationURI
;
if
(
Array
.
isArray
(
extDevLoc
))
{
for
(
let
x
of
extDevLoc
)
{
if
(
x
.
scheme
!==
Schemas
.
file
)
{
debugOk
=
false
;
}
}
}
else
if
(
extDevLoc
&&
extDevLoc
.
scheme
!==
Schemas
.
file
)
{
debugOk
=
false
;
}
let
isExtensionDevDebug
=
debugOk
&&
typeof
environmentService
.
debugExtensionHost
.
port
===
'
number
'
;
let
isExtensionDevDebugBrk
=
debugOk
&&
!!
environmentService
.
debugExtensionHost
.
break
;
let
isExtensionDevTestFromCli
=
isExtensionDevHost
&&
!!
environmentService
.
extensionTestsLocationURI
&&
!
environmentService
.
debugExtensionHost
.
break
;
...
...
src/vs/workbench/services/extensions/electron-browser/cachedExtensionScanner.ts
浏览文件 @
e07de5b3
...
...
@@ -294,10 +294,30 @@ export class CachedExtensionScanner {
// Always load developed extensions while extensions development
let
developedExtensions
:
Promise
<
IExtensionDescription
[]
>
=
Promise
.
resolve
([]);
if
(
environmentService
.
isExtensionDevelopment
&&
environmentService
.
extensionDevelopmentLocationURI
&&
environmentService
.
extensionDevelopmentLocationURI
.
scheme
===
Schemas
.
file
)
{
developedExtensions
=
ExtensionScanner
.
scanOneOrMultipleExtensions
(
new
ExtensionScannerInput
(
version
,
commit
,
locale
,
devMode
,
originalFSPath
(
environmentService
.
extensionDevelopmentLocationURI
),
false
,
true
,
translations
),
log
);
if
(
environmentService
.
isExtensionDevelopment
)
{
if
(
Array
.
isArray
(
environmentService
.
extensionDevelopmentLocationURI
))
{
const
extDescsP
=
environmentService
.
extensionDevelopmentLocationURI
.
filter
(
extLoc
=>
extLoc
.
scheme
===
Schemas
.
file
).
map
(
extLoc
=>
{
return
ExtensionScanner
.
scanOneOrMultipleExtensions
(
new
ExtensionScannerInput
(
version
,
commit
,
locale
,
devMode
,
originalFSPath
(
extLoc
),
false
,
true
,
translations
),
log
);
});
developedExtensions
=
Promise
.
all
(
extDescsP
).
then
((
extDescArrays
:
IExtensionDescription
[][])
=>
{
let
extDesc
:
IExtensionDescription
[]
=
[];
for
(
let
eds
of
extDescArrays
)
{
extDesc
=
extDesc
.
concat
(
eds
);
}
return
extDesc
;
});
}
else
if
(
environmentService
.
extensionDevelopmentLocationURI
)
{
if
(
environmentService
.
extensionDevelopmentLocationURI
.
scheme
===
Schemas
.
file
)
{
developedExtensions
=
ExtensionScanner
.
scanOneOrMultipleExtensions
(
new
ExtensionScannerInput
(
version
,
commit
,
locale
,
devMode
,
originalFSPath
(
environmentService
.
extensionDevelopmentLocationURI
),
false
,
true
,
translations
),
log
);
}
}
}
return
Promise
.
all
([
finalBuiltinExtensions
,
userExtensions
,
developedExtensions
]).
then
((
extensionDescriptions
:
IExtensionDescription
[][])
=>
{
...
...
src/vs/workbench/services/extensions/electron-browser/extensionHost.ts
浏览文件 @
e07de5b3
...
...
@@ -102,12 +102,12 @@ export class ExtensionHostProcessWorker implements IExtensionHostStarter {
this
.
_toDispose
.
push
(
this
.
_lifecycleService
.
onWillShutdown
(
e
=>
this
.
_onWillShutdown
(
e
)));
this
.
_toDispose
.
push
(
this
.
_lifecycleService
.
onShutdown
(
reason
=>
this
.
terminate
()));
this
.
_toDispose
.
push
(
this
.
_extensionHostDebugService
.
onClose
(
resource
=>
{
if
(
this
.
_isExtensionDevHost
&&
isEqual
(
resource
,
this
.
_environmentService
.
extensionDevelopmentLocationURI
))
{
if
(
this
.
_isExtensionDevHost
&&
this
.
matchesExtDevLocations
(
resource
))
{
this
.
_windowService
.
closeWindow
();
}
}));
this
.
_toDispose
.
push
(
this
.
_extensionHostDebugService
.
onReload
(
resource
=>
{
if
(
this
.
_isExtensionDevHost
&&
isEqual
(
resource
,
this
.
_environmentService
.
extensionDevelopmentLocationURI
))
{
if
(
this
.
_isExtensionDevHost
&&
this
.
matchesExtDevLocations
(
resource
))
{
this
.
_windowService
.
reloadWindow
();
}
}));
...
...
@@ -119,6 +119,18 @@ export class ExtensionHostProcessWorker implements IExtensionHostStarter {
}));
}
// returns true if the given resource url matches one of the extension development paths passed to VS Code
private
matchesExtDevLocations
(
resource
:
URI
):
boolean
{
const
extDevLocs
=
this
.
_environmentService
.
extensionDevelopmentLocationURI
;
if
(
Array
.
isArray
(
extDevLocs
))
{
return
extDevLocs
.
some
(
extDevLoc
=>
isEqual
(
extDevLoc
,
resource
));
}
else
if
(
extDevLocs
)
{
return
isEqual
(
extDevLocs
,
resource
);
}
return
false
;
}
public
dispose
():
void
{
this
.
terminate
();
}
...
...
src/vs/workbench/services/extensions/electron-browser/extensionService.ts
浏览文件 @
e07de5b3
...
...
@@ -645,6 +645,23 @@ export class ExtensionService extends Disposable implements IExtensionService {
this
.
_onDidChangeExtensionsStatus
.
fire
(
this
.
_registry
.
getAllExtensionDescriptions
().
map
(
e
=>
e
.
identifier
));
}
private
isExtensionUnderDevelopment
(
extension
:
IExtensionDescription
):
boolean
{
if
(
this
.
_environmentService
.
isExtensionDevelopment
)
{
const
extDevLoc
=
this
.
_environmentService
.
extensionDevelopmentLocationURI
;
const
extLocation
=
extension
.
extensionLocation
;
if
(
Array
.
isArray
(
extDevLoc
))
{
for
(
let
p
of
extDevLoc
)
{
if
(
isEqualOrParent
(
extLocation
,
p
))
{
return
true
;
}
}
}
else
if
(
extDevLoc
)
{
return
isEqualOrParent
(
extLocation
,
extDevLoc
);
}
}
return
false
;
}
private
_getRuntimeExtensions
(
allExtensions
:
IExtensionDescription
[]):
Promise
<
IExtensionDescription
[]
>
{
return
this
.
_extensionEnablementService
.
getDisabledExtensions
()
.
then
(
disabledExtensions
=>
{
...
...
@@ -676,14 +693,11 @@ export class ExtensionService extends Disposable implements IExtensionService {
(
!!
this
.
_environmentService
.
extensionDevelopmentLocationURI
&&
product
.
nameLong
!==
'
Visual Studio Code
'
)
||
(
enableProposedApiFor
.
length
===
0
&&
'
enable-proposed-api
'
in
this
.
_environmentService
.
args
);
for
(
const
extension
of
allExtensions
)
{
const
isExtensionUnderDevelopment
=
(
this
.
_environmentService
.
isExtensionDevelopment
&&
this
.
_environmentService
.
extensionDevelopmentLocationURI
&&
isEqualOrParent
(
extension
.
extensionLocation
,
this
.
_environmentService
.
extensionDevelopmentLocationURI
)
);
// Do not disable extensions under development
if
(
!
isExtensionUnderDevelopment
)
{
if
(
!
this
.
isExtensionUnderDevelopment
(
extension
)
)
{
if
(
disabledExtensions
.
some
(
disabled
=>
areSameExtensions
(
disabled
,
{
id
:
extension
.
identifier
.
value
})))
{
continue
;
}
...
...
src/vs/workbench/services/remote/common/remoteAgentEnvironmentChannel.ts
浏览文件 @
e07de5b3
...
...
@@ -12,7 +12,7 @@ import { IRemoteAgentEnvironment } from 'vs/platform/remote/common/remoteAgentEn
export
interface
IGetEnvironmentDataArguments
{
language
:
string
;
remoteAuthority
:
string
;
extensionDevelopmentPath
:
UriComponents
|
undefined
;
extensionDevelopmentPath
:
UriComponents
|
UriComponents
[]
|
undefined
;
}
export
interface
IRemoteAgentEnvironmentDTO
{
...
...
@@ -34,7 +34,7 @@ export class RemoteExtensionEnvironmentChannelClient {
constructor
(
private
channel
:
IChannel
)
{
}
getEnvironmentData
(
remoteAuthority
:
string
,
extensionDevelopmentPath
?:
URI
):
Promise
<
IRemoteAgentEnvironment
>
{
getEnvironmentData
(
remoteAuthority
:
string
,
extensionDevelopmentPath
?:
URI
|
URI
[]
):
Promise
<
IRemoteAgentEnvironment
>
{
const
args
:
IGetEnvironmentDataArguments
=
{
language
:
platform
.
language
,
remoteAuthority
,
...
...
src/vs/workbench/services/themes/browser/workbenchThemeService.ts
浏览文件 @
e07de5b3
...
...
@@ -249,9 +249,20 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
let
iconThemeSetting
=
this
.
configurationService
.
getValue
<
string
|
null
>
(
ICON_THEME_SETTING
);
const
extDevLoc
=
this
.
environmentService
.
extensionDevelopmentLocationURI
;
let
uri
:
URI
|
undefined
;
if
(
Array
.
isArray
(
extDevLoc
))
{
// if there are more than one ext dev paths, use first
if
(
extDevLoc
.
length
>
0
)
{
uri
=
extDevLoc
[
0
];
}
}
else
{
uri
=
extDevLoc
;
}
return
Promise
.
all
([
this
.
colorThemeStore
.
findThemeDataBySettingsId
(
colorThemeSetting
,
DEFAULT_THEME_ID
).
then
(
theme
=>
{
return
this
.
colorThemeStore
.
findThemeDataByParentLocation
(
this
.
environmentService
.
extensionDevelopmentLocationURI
).
then
(
devThemes
=>
{
return
this
.
colorThemeStore
.
findThemeDataByParentLocation
(
uri
).
then
(
devThemes
=>
{
if
(
devThemes
.
length
)
{
return
this
.
setColorTheme
(
devThemes
[
0
].
id
,
ConfigurationTarget
.
MEMORY
);
}
else
{
...
...
@@ -260,7 +271,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
});
}),
this
.
iconThemeStore
.
findThemeBySettingsId
(
iconThemeSetting
).
then
(
theme
=>
{
return
this
.
iconThemeStore
.
findThemeDataByParentLocation
(
this
.
environmentService
.
extensionDevelopmentLocationURI
).
then
(
devThemes
=>
{
return
this
.
iconThemeStore
.
findThemeDataByParentLocation
(
uri
).
then
(
devThemes
=>
{
if
(
devThemes
.
length
)
{
return
this
.
setFileIconTheme
(
devThemes
[
0
].
id
,
ConfigurationTarget
.
MEMORY
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录