Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
3ca69614
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,发现更多精彩内容 >>
提交
3ca69614
编写于
10月 07, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debt - deprecate access to configuration from environment service
上级
95efc296
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
39 deletion
+21
-39
src/vs/workbench/browser/layout.ts
src/vs/workbench/browser/layout.ts
+1
-1
src/vs/workbench/electron-sandbox/sandbox.simpleservices.ts
src/vs/workbench/electron-sandbox/sandbox.simpleservices.ts
+0
-5
src/vs/workbench/electron-sandbox/window.ts
src/vs/workbench/electron-sandbox/window.ts
+2
-2
src/vs/workbench/services/environment/browser/environmentService.ts
...kbench/services/environment/browser/environmentService.ts
+0
-6
src/vs/workbench/services/environment/common/environmentService.ts
...rkbench/services/environment/common/environmentService.ts
+8
-4
src/vs/workbench/services/environment/electron-browser/environmentService.ts
...rvices/environment/electron-browser/environmentService.ts
+0
-13
src/vs/workbench/services/environment/electron-sandbox/environmentService.ts
...rvices/environment/electron-sandbox/environmentService.ts
+10
-8
未找到文件。
src/vs/workbench/browser/layout.ts
浏览文件 @
3ca69614
...
...
@@ -810,7 +810,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
};
}
const
{
filesToOpenOrCreate
,
filesToDiff
}
=
this
.
environmentService
;
const
{
filesToOpenOrCreate
,
filesToDiff
}
=
this
.
environmentService
.
configuration
;
if
(
filesToOpenOrCreate
||
filesToDiff
)
{
return
{
filesToOpenOrCreate
,
filesToDiff
};
}
...
...
src/vs/workbench/electron-sandbox/sandbox.simpleservices.ts
浏览文件 @
3ca69614
...
...
@@ -95,11 +95,6 @@ export class SimpleNativeWorkbenchEnvironmentService implements INativeWorkbench
machineId
=
this
.
configuration
.
machineId
;
remoteAuthority
=
this
.
configuration
.
remoteAuthority
;
filesToDiff
=
this
.
configuration
.
filesToDiff
;
filesToOpenOrCreate
=
this
.
configuration
.
filesToOpenOrCreate
;
filesToWait
=
this
.
configuration
.
filesToWait
;
windowMaximizedInitially
=
this
.
configuration
.
maximized
;
options
?:
IWorkbenchConstructionOptions
|
undefined
;
logExtensionHostCommunication
?:
boolean
|
undefined
;
extensionEnabledProposedApi
?:
string
[]
|
undefined
;
...
...
src/vs/workbench/electron-sandbox/window.ts
浏览文件 @
3ca69614
...
...
@@ -218,7 +218,7 @@ export class NativeWindow extends Disposable {
this
.
_register
(
this
.
editorService
.
onDidVisibleEditorsChange
(()
=>
this
.
onDidVisibleEditorsChange
()));
// Listen to editor closing (if we run with --wait)
const
filesToWait
=
this
.
environmentService
.
filesToWait
;
const
filesToWait
=
this
.
environmentService
.
configuration
.
filesToWait
;
if
(
filesToWait
)
{
this
.
trackClosedWaitFiles
(
filesToWait
.
waitMarkerFileUri
,
coalesce
(
filesToWait
.
paths
.
map
(
path
=>
path
.
fileUri
)));
}
...
...
@@ -265,7 +265,7 @@ export class NativeWindow extends Disposable {
Event
.
map
(
Event
.
filter
(
this
.
nativeHostService
.
onWindowUnmaximize
,
id
=>
id
===
this
.
nativeHostService
.
windowId
),
()
=>
false
)
)(
e
=>
this
.
onDidChangeMaximized
(
e
)));
this
.
onDidChangeMaximized
(
this
.
environmentService
.
windowMaximizedInitially
??
false
);
this
.
onDidChangeMaximized
(
this
.
environmentService
.
configuration
.
maximized
??
false
);
// Detect panel position to determine minimum width
this
.
_register
(
this
.
layoutService
.
onPanelPositionChange
(
pos
=>
{
...
...
src/vs/workbench/services/environment/browser/environmentService.ts
浏览文件 @
3ca69614
...
...
@@ -229,12 +229,6 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
return
`
${
uri
.
scheme
}
://
${
uri
.
authority
}
`
;
}
@
memoize
get
filesToDiff
():
IPath
[]
|
undefined
{
return
this
.
configuration
.
filesToDiff
;
}
@
memoize
get
filesToOpenOrCreate
():
IPath
[]
|
undefined
{
return
this
.
configuration
.
filesToOpenOrCreate
;
}
get
disableTelemetry
():
boolean
{
return
false
;
}
get
verbose
():
boolean
{
return
this
.
payload
?.
get
(
'
verbose
'
)
===
'
true
'
;
}
...
...
src/vs/workbench/services/environment/common/environmentService.ts
浏览文件 @
3ca69614
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
I
Path
,
I
WindowConfiguration
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IWindowConfiguration
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
type
{
IWorkbenchConstructionOptions
as
IWorkbenchOptions
}
from
'
vs/workbench/workbench.web.api
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
...
...
@@ -26,6 +26,13 @@ export interface IWorkbenchEnvironmentService extends IEnvironmentService {
readonly
_serviceBrand
:
undefined
;
/**
* @deprecated this property will go away eventually as it
* duplicates many properties of the environment service
*
* Please consider using the environment service directly
* if you can.
*/
readonly
configuration
:
IWorkbenchConfiguration
;
readonly
options
?:
IWorkbenchOptions
;
...
...
@@ -34,9 +41,6 @@ export interface IWorkbenchEnvironmentService extends IEnvironmentService {
readonly
sessionId
:
string
;
readonly
filesToOpenOrCreate
?:
IPath
[];
readonly
filesToDiff
?:
IPath
[];
readonly
logFile
:
URI
;
readonly
backupWorkspaceHome
?:
URI
;
...
...
src/vs/workbench/services/environment/electron-browser/environmentService.ts
浏览文件 @
3ca69614
...
...
@@ -10,7 +10,6 @@ import { URI } from 'vs/base/common/uri';
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
join
}
from
'
vs/base/common/path
'
;
import
{
IProductService
}
from
'
vs/platform/product/common/productService
'
;
import
{
IPath
,
IPathsToWaitFor
}
from
'
vs/platform/windows/common/windows
'
;
export
class
NativeWorkbenchEnvironmentService
extends
NativeEnvironmentService
implements
INativeWorkbenchEnvironmentService
{
...
...
@@ -64,18 +63,6 @@ export class NativeWorkbenchEnvironmentService extends NativeEnvironmentService
@
memoize
get
webviewCspSource
():
string
{
return
`
${
Schemas
.
vscodeWebviewResource
}
:`
;
}
@
memoize
get
filesToDiff
():
IPath
[]
|
undefined
{
return
this
.
configuration
.
filesToDiff
;
}
@
memoize
get
filesToOpenOrCreate
():
IPath
[]
|
undefined
{
return
this
.
configuration
.
filesToOpenOrCreate
;
}
@
memoize
get
filesToWait
():
IPathsToWaitFor
|
undefined
{
return
this
.
configuration
.
filesToWait
;
}
@
memoize
get
windowMaximizedInitially
():
boolean
|
undefined
{
return
this
.
configuration
.
maximized
;
}
@
memoize
get
skipReleaseNotes
():
boolean
{
return
!!
this
.
args
[
'
skip-release-notes
'
];
}
...
...
src/vs/workbench/services/environment/electron-sandbox/environmentService.ts
浏览文件 @
3ca69614
...
...
@@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import
{
IWorkbenchConfiguration
,
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
INativeWindowConfiguration
,
IPathsToWaitFor
}
from
'
vs/platform/windows/common/windows
'
;
import
{
INativeWindowConfiguration
}
from
'
vs/platform/windows/common/windows
'
;
import
{
INativeEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
...
...
@@ -19,12 +19,8 @@ export interface INativeWorkbenchConfiguration extends IWorkbenchConfiguration,
*/
export
interface
INativeWorkbenchEnvironmentService
extends
IWorkbenchEnvironmentService
,
INativeEnvironmentService
{
readonly
configuration
:
INativeWorkbenchConfiguration
;
readonly
machineId
:
string
;
readonly
filesToWait
?:
IPathsToWaitFor
;
readonly
crashReporterDirectory
?:
string
;
readonly
crashReporterId
?:
string
;
...
...
@@ -33,9 +29,15 @@ export interface INativeWorkbenchEnvironmentService extends IWorkbenchEnvironmen
readonly
log
?:
string
;
readonly
extHostLogsPath
:
URI
;
// TODO@sbatten TODO@ben this should be retrieved somehow differently
readonly
windowMaximizedInitially
?:
boolean
;
// TODO@ben this is a bit ugly
updateBackupPath
(
newPath
:
string
|
undefined
):
void
;
/**
* @deprecated this property will go away eventually as it
* duplicates many properties of the environment service
*
* Please consider using the environment service directly
* if you can.
*/
readonly
configuration
:
INativeWorkbenchConfiguration
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录