Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
4c3f4a5e
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,体验更适合开发者的 AI 搜索 >>
提交
4c3f4a5e
编写于
9月 03, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sandbox - some workbench environment cleanup
上级
b67ed348
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
27 deletion
+27
-27
src/vs/platform/windows/node/window.ts
src/vs/platform/windows/node/window.ts
+0
-1
src/vs/workbench/contrib/tags/electron-browser/workspaceTagsService.ts
...nch/contrib/tags/electron-browser/workspaceTagsService.ts
+9
-8
src/vs/workbench/services/environment/browser/environmentService.ts
...kbench/services/environment/browser/environmentService.ts
+9
-9
src/vs/workbench/services/environment/common/environmentService.ts
...rkbench/services/environment/common/environmentService.ts
+4
-4
src/vs/workbench/services/environment/electron-browser/environmentService.ts
...rvices/environment/electron-browser/environmentService.ts
+4
-4
src/vs/workbench/services/extensionManagement/common/webExtensionsScannerService.ts
...extensionManagement/common/webExtensionsScannerService.ts
+1
-1
未找到文件。
src/vs/platform/windows/node/window.ts
浏览文件 @
4c3f4a5e
...
...
@@ -75,7 +75,6 @@ export interface IBestWindowOrFolderOptions<W extends IWindowContext> {
newWindow
:
boolean
;
context
:
OpenContext
;
fileUri
?:
URI
;
userHome
?:
string
;
codeSettingsFolder
?:
string
;
localWorkspaceResolver
:
(
workspace
:
IWorkspaceIdentifier
)
=>
IResolvedWorkspace
|
null
;
}
...
...
src/vs/workbench/contrib/tags/electron-browser/workspaceTagsService.ts
浏览文件 @
4c3f4a5e
...
...
@@ -6,7 +6,7 @@
import
*
as
crypto
from
'
crypto
'
;
import
{
IFileService
,
IResolveFileResult
,
IFileStat
}
from
'
vs/platform/files/common/files
'
;
import
{
IWorkspaceContextService
,
WorkbenchState
,
IWorkspace
}
from
'
vs/platform/workspace/common/workspace
'
;
import
{
IWorkbenchEnvironmentService
,
IEnvironmentConfiguration
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IHostService
}
from
'
vs/workbench/services/host/browser/host
'
;
import
{
INotificationService
,
NeverShowAgainScope
,
INeverShowAgainOptions
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IQuickInputService
,
IQuickPickItem
}
from
'
vs/platform/quickinput/common/quickInput
'
;
...
...
@@ -139,7 +139,7 @@ export class WorkspaceTagsService implements IWorkspaceTagsService {
async
getTags
():
Promise
<
Tags
>
{
if
(
!
this
.
_tags
)
{
this
.
_tags
=
await
this
.
resolveWorkspaceTags
(
this
.
environmentService
.
configuration
,
rootFiles
=>
this
.
handleWorkspaceFiles
(
rootFiles
));
this
.
_tags
=
await
this
.
resolveWorkspaceTags
(
rootFiles
=>
this
.
handleWorkspaceFiles
(
rootFiles
));
}
return
this
.
_tags
;
...
...
@@ -297,7 +297,7 @@ export class WorkspaceTagsService implements IWorkspaceTagsService {
"workspace.py.playwright" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true }
}
*/
private
resolveWorkspaceTags
(
configuration
:
IEnvironmentConfiguration
,
participant
?:
(
rootFiles
:
string
[])
=>
void
):
Promise
<
Tags
>
{
private
resolveWorkspaceTags
(
participant
?:
(
rootFiles
:
string
[])
=>
void
):
Promise
<
Tags
>
{
const
tags
:
Tags
=
Object
.
create
(
null
);
const
state
=
this
.
contextService
.
getWorkbenchState
();
...
...
@@ -305,7 +305,7 @@ export class WorkspaceTagsService implements IWorkspaceTagsService {
tags
[
'
workspace.id
'
]
=
this
.
getTelemetryWorkspaceId
(
workspace
,
state
);
const
{
filesToOpenOrCreate
,
filesToDiff
}
=
configuration
;
const
{
filesToOpenOrCreate
,
filesToDiff
}
=
this
.
environmentService
.
configuration
;
tags
[
'
workbench.filesToOpenOrCreate
'
]
=
filesToOpenOrCreate
&&
filesToOpenOrCreate
.
length
||
0
;
tags
[
'
workbench.filesToDiff
'
]
=
filesToDiff
&&
filesToDiff
.
length
||
0
;
...
...
@@ -313,7 +313,7 @@ export class WorkspaceTagsService implements IWorkspaceTagsService {
tags
[
'
workspace.roots
'
]
=
isEmpty
?
0
:
workspace
.
folders
.
length
;
tags
[
'
workspace.empty
'
]
=
isEmpty
;
const
folders
=
!
isEmpty
?
workspace
.
folders
.
map
(
folder
=>
folder
.
uri
)
:
this
.
productService
.
quality
!==
'
stable
'
&&
this
.
findFolders
(
configuration
);
const
folders
=
!
isEmpty
?
workspace
.
folders
.
map
(
folder
=>
folder
.
uri
)
:
this
.
productService
.
quality
!==
'
stable
'
&&
this
.
findFolders
();
if
(
!
folders
||
!
folders
.
length
||
!
this
.
fileService
)
{
return
Promise
.
resolve
(
tags
);
}
...
...
@@ -524,12 +524,13 @@ export class WorkspaceTagsService implements IWorkspaceTagsService {
}
}
private
findFolders
(
configuration
:
IEnvironmentConfiguration
):
URI
[]
|
undefined
{
const
folder
=
this
.
findFolder
(
configuration
);
private
findFolders
():
URI
[]
|
undefined
{
const
folder
=
this
.
findFolder
();
return
folder
&&
[
folder
];
}
private
findFolder
({
filesToOpenOrCreate
,
filesToDiff
}:
IEnvironmentConfiguration
):
URI
|
undefined
{
private
findFolder
():
URI
|
undefined
{
const
{
filesToOpenOrCreate
,
filesToDiff
}
=
this
.
environmentService
.
configuration
;
if
(
filesToOpenOrCreate
&&
filesToOpenOrCreate
.
length
)
{
return
this
.
parentURI
(
filesToOpenOrCreate
[
0
].
fileUri
);
}
else
if
(
filesToDiff
&&
filesToDiff
.
length
)
{
...
...
src/vs/workbench/services/environment/browser/environmentService.ts
浏览文件 @
4c3f4a5e
...
...
@@ -9,17 +9,17 @@ import { URI } from 'vs/base/common/uri';
import
{
generateUuid
}
from
'
vs/base/common/uuid
'
;
import
{
BACKUPS
,
IExtensionHostDebugParams
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IPath
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWorkbenchEnvironmentService
,
I
Environment
Configuration
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IWorkbenchConstructionOptions
}
from
'
vs/workbench/workbench.web.api
'
;
import
{
IWorkbenchEnvironmentService
,
I
Workbench
Configuration
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IWorkbenchConstructionOptions
as
IWorkbenchOptions
}
from
'
vs/workbench/workbench.web.api
'
;
import
product
from
'
vs/platform/product/common/product
'
;
import
{
memoize
}
from
'
vs/base/common/decorators
'
;
import
{
onUnexpectedError
}
from
'
vs/base/common/errors
'
;
import
{
parseLineAndColumnAware
}
from
'
vs/base/common/extpath
'
;
export
class
BrowserEnvironmentConfiguration
implements
IEnvironment
Configuration
{
class
BrowserWorkbenchConfiguration
implements
IWorkbench
Configuration
{
constructor
(
private
readonly
options
:
IBrowserWorkbench
EnvironmentConstruction
Options
,
private
readonly
options
:
IBrowserWorkbenchOptions
,
private
readonly
payload
:
Map
<
string
,
string
>
|
undefined
,
private
readonly
backupHome
:
URI
)
{
}
...
...
@@ -79,7 +79,7 @@ export class BrowserEnvironmentConfiguration implements IEnvironmentConfiguratio
}
}
interface
IBrowserWorkbench
EnvironmentConstructionOptions
extends
IWorkbenchConstruction
Options
{
interface
IBrowserWorkbench
Options
extends
IWorkbench
Options
{
workspaceId
:
string
;
logsPath
:
URI
;
}
...
...
@@ -96,10 +96,10 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
declare
readonly
_serviceBrand
:
undefined
;
private
_configuration
:
I
Environment
Configuration
|
undefined
=
undefined
;
get
configuration
():
I
Environment
Configuration
{
private
_configuration
:
I
Workbench
Configuration
|
undefined
=
undefined
;
get
configuration
():
I
Workbench
Configuration
{
if
(
!
this
.
_configuration
)
{
this
.
_configuration
=
new
Browser
Environment
Configuration
(
this
.
options
,
this
.
payload
,
this
.
backupHome
);
this
.
_configuration
=
new
Browser
Workbench
Configuration
(
this
.
options
,
this
.
payload
,
this
.
backupHome
);
}
return
this
.
_configuration
;
...
...
@@ -237,7 +237,7 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
private
payload
:
Map
<
string
,
string
>
|
undefined
;
constructor
(
readonly
options
:
IBrowserWorkbench
EnvironmentConstruction
Options
)
{
constructor
(
readonly
options
:
IBrowserWorkbenchOptions
)
{
if
(
options
.
workspaceProvider
&&
Array
.
isArray
(
options
.
workspaceProvider
.
payload
))
{
try
{
this
.
payload
=
new
Map
(
options
.
workspaceProvider
.
payload
);
...
...
src/vs/workbench/services/environment/common/environmentService.ts
浏览文件 @
4c3f4a5e
...
...
@@ -6,12 +6,12 @@
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IWindowConfiguration
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IWorkbenchConstruction
Options
}
from
'
vs/workbench/workbench.web.api
'
;
import
type
{
IWorkbenchConstructionOptions
as
IWorkbench
Options
}
from
'
vs/workbench/workbench.web.api
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
export
const
IWorkbenchEnvironmentService
=
createDecorator
<
IWorkbenchEnvironmentService
>
(
'
environmentService
'
);
export
interface
I
Environment
Configuration
extends
IWindowConfiguration
{
export
interface
I
Workbench
Configuration
extends
IWindowConfiguration
{
backupWorkspaceResource
?:
URI
;
}
...
...
@@ -19,9 +19,9 @@ export interface IWorkbenchEnvironmentService extends IEnvironmentService {
readonly
_serviceBrand
:
undefined
;
readonly
configuration
:
I
Environment
Configuration
;
readonly
configuration
:
I
Workbench
Configuration
;
readonly
options
?:
IWorkbench
Construction
Options
;
readonly
options
?:
IWorkbenchOptions
;
readonly
logFile
:
URI
;
...
...
src/vs/workbench/services/environment/electron-browser/environmentService.ts
浏览文件 @
4c3f4a5e
...
...
@@ -5,7 +5,7 @@
import
{
EnvironmentService
}
from
'
vs/platform/environment/node/environmentService
'
;
import
{
INativeEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
IWorkbenchEnvironmentService
,
I
Environment
Configuration
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IWorkbenchEnvironmentService
,
I
Workbench
Configuration
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
memoize
}
from
'
vs/base/common/decorators
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
...
...
@@ -17,7 +17,7 @@ import { isLinux, isWindows } from 'vs/base/common/platform';
export
interface
INativeWorkbenchEnvironmentService
extends
IWorkbenchEnvironmentService
,
INativeEnvironmentService
{
readonly
configuration
:
INative
Environment
Configuration
;
readonly
configuration
:
INative
Workbench
Configuration
;
readonly
crashReporterDirectory
?:
string
;
readonly
crashReporterId
?:
string
;
...
...
@@ -29,7 +29,7 @@ export interface INativeWorkbenchEnvironmentService extends IWorkbenchEnvironmen
readonly
extHostLogsPath
:
URI
;
}
export
interface
INative
EnvironmentConfiguration
extends
IEnvironment
Configuration
,
INativeWindowConfiguration
{
}
export
interface
INative
WorkbenchConfiguration
extends
IWorkbench
Configuration
,
INativeWindowConfiguration
{
}
export
class
NativeWorkbenchEnvironmentService
extends
EnvironmentService
implements
INativeWorkbenchEnvironmentService
{
...
...
@@ -79,7 +79,7 @@ export class NativeWorkbenchEnvironmentService extends EnvironmentService implem
get
cliPath
():
string
{
return
this
.
doGetCLIPath
();
}
constructor
(
readonly
configuration
:
INative
Environment
Configuration
,
readonly
configuration
:
INative
Workbench
Configuration
,
readonly
execPath
:
string
)
{
super
(
configuration
);
...
...
src/vs/workbench/services/extensionManagement/common/webExtensionsScannerService.ts
浏览文件 @
4c3f4a5e
...
...
@@ -19,7 +19,7 @@ import { CancellationToken } from 'vs/base/common/cancellation';
import
{
IGalleryExtension
,
INSTALL_ERROR_NOT_SUPPORTED
}
from
'
vs/platform/extensionManagement/common/extensionManagement
'
;
import
{
groupByExtension
,
areSameExtensions
,
getGalleryExtensionId
}
from
'
vs/platform/extensionManagement/common/extensionManagementUtil
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IStaticExtension
}
from
'
vs/workbench/workbench.web.api
'
;
import
type
{
IStaticExtension
}
from
'
vs/workbench/workbench.web.api
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
Event
}
from
'
vs/base/common/event
'
;
import
{
localizeManifest
}
from
'
vs/platform/extensionManagement/common/extensionNls
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录