Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
bfc9b536
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,发现更多精彩内容 >>
提交
bfc9b536
编写于
8月 17, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
align more stuff
上级
dffbeac1
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
22 deletion
+12
-22
src/vs/code/electron-main/window.ts
src/vs/code/electron-main/window.ts
+6
-7
src/vs/code/electron-main/windows.ts
src/vs/code/electron-main/windows.ts
+0
-5
src/vs/platform/workspace/common/workspace.ts
src/vs/platform/workspace/common/workspace.ts
+0
-6
src/vs/workbench/electron-browser/bootstrap/index.js
src/vs/workbench/electron-browser/bootstrap/index.js
+2
-2
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+4
-2
未找到文件。
src/vs/code/electron-main/window.ts
浏览文件 @
bfc9b536
...
...
@@ -90,21 +90,20 @@ export interface IPath {
export
interface
IWindowConfiguration
extends
ICommandLineArguments
{
version
:
string
;
appName
:
string
;
applicationName
:
string
;
appSettingsHome
:
string
;
appSettingsPath
:
string
;
appKeybindingsPath
:
string
;
userExtensionsHome
:
string
;
appRoot
:
string
;
isBuilt
:
boolean
;
// Used to configure the workbench when opening
workspacePath
?:
string
;
recentFiles
:
string
[];
recentFolders
:
string
[];
workspacePath
?:
string
;
filesToOpen
?:
IPath
[];
filesToCreate
?:
IPath
[];
filesToDiff
?:
IPath
[];
extensionsToInstall
:
string
[];
// Used to send the main process environment over to the renderer
userEnv
:
IProcessEnvironment
;
}
...
...
@@ -359,7 +358,7 @@ export class VSCodeWindow {
this
.
_win
.
loadURL
(
this
.
getUrl
(
config
));
// Make window visible if it did not open in N seconds because this indicates an error
if
(
!
config
.
isBuilt
)
{
if
(
!
this
.
envService
.
isBuilt
)
{
this
.
showTimeoutHandle
=
setTimeout
(()
=>
{
if
(
this
.
_win
&&
!
this
.
_win
.
isVisible
()
&&
!
this
.
_win
.
isMinimized
())
{
this
.
_win
.
show
();
...
...
src/vs/code/electron-main/windows.ts
浏览文件 @
bfc9b536
...
...
@@ -732,15 +732,10 @@ export class WindowsManager implements IWindowsService {
configuration
.
filesToCreate
=
filesToCreate
;
configuration
.
filesToDiff
=
filesToDiff
;
configuration
.
extensionsToInstall
=
extensionsToInstall
;
configuration
.
appName
=
this
.
envService
.
product
.
nameLong
;
configuration
.
applicationName
=
this
.
envService
.
product
.
applicationName
;
configuration
.
appRoot
=
this
.
envService
.
appRoot
;
configuration
.
version
=
pkg
.
version
;
configuration
.
appSettingsHome
=
this
.
envService
.
appSettingsHome
;
configuration
.
appSettingsPath
=
this
.
envService
.
appSettingsPath
;
configuration
.
appKeybindingsPath
=
this
.
envService
.
appKeybindingsPath
;
configuration
.
userExtensionsHome
=
this
.
envService
.
userExtensionsHome
;
configuration
.
isBuilt
=
this
.
envService
.
isBuilt
;
configuration
.
userEnv
=
userEnv
;
const
recents
=
this
.
getRecentlyOpenedPaths
(
workspacePath
,
filesToOpen
);
...
...
src/vs/platform/workspace/common/workspace.ts
浏览文件 @
bfc9b536
...
...
@@ -85,17 +85,11 @@ export interface IConfiguration {
}
export
interface
IEnvironment
{
appName
:
string
;
appRoot
:
string
;
isBuilt
:
boolean
;
applicationName
:
string
;
version
:
string
;
appSettingsHome
:
string
;
appSettingsPath
:
string
;
appKeybindingsPath
:
string
;
disableExtensions
:
boolean
;
...
...
src/vs/workbench/electron-browser/bootstrap/index.js
浏览文件 @
bfc9b536
...
...
@@ -104,7 +104,7 @@ function main() {
const
webFrame
=
require
(
'
electron
'
).
webFrame
;
const
args
=
parseURLQueryArgs
();
const
configuration
=
JSON
.
parse
(
args
[
'
config
'
]
||
'
{}
'
)
||
{};
const
enableDeveloperTools
=
!
configuration
.
isBuilt
||
!!
configuration
.
extensionDevelopmentPath
;
const
enableDeveloperTools
=
process
.
env
[
'
VSCODE_DEV
'
]
||
!!
configuration
.
extensionDevelopmentPath
;
// Correctly inherit the parent's environment
assign
(
process
.
env
,
configuration
.
userEnv
);
...
...
@@ -167,7 +167,7 @@ function main() {
}
window
.
MonacoEnvironment
=
{};
const
timers
=
window
.
MonacoEnvironment
.
timers
=
{
start
:
new
Date
()
};
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
bfc9b536
...
...
@@ -68,6 +68,7 @@ import {IStatusbarService} from 'vs/platform/statusbar/common/statusbar';
import
{
IMenuService
}
from
'
vs/platform/actions/common/actions
'
;
import
{
MenuService
}
from
'
vs/platform/actions/common/menuService
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IEnvironmentService
}
from
'
vs/platform/environment/common/environment
'
;
export
const
MessagesVisibleContext
=
new
RawContextKey
<
boolean
>
(
'
globalMessageVisible
'
,
false
);
export
const
EditorsVisibleContext
=
new
RawContextKey
<
boolean
>
(
'
editorIsOpen
'
,
false
);
...
...
@@ -140,7 +141,8 @@ export class Workbench implements IPartService {
@
IStorageService
private
storageService
:
IStorageService
,
@
ILifecycleService
private
lifecycleService
:
ILifecycleService
,
@
IMessageService
private
messageService
:
IMessageService
,
@
IThreadService
private
threadService
:
IThreadService
@
IThreadService
private
threadService
:
IThreadService
,
@
IEnvironmentService
private
environmentService
:
IEnvironmentService
)
{
// Validate params
...
...
@@ -229,7 +231,7 @@ export class Workbench implements IPartService {
// Load Viewlet
const
viewletRegistry
=
(
<
ViewletRegistry
>
Registry
.
as
(
ViewletExtensions
.
Viewlets
));
let
viewletId
=
viewletRegistry
.
getDefaultViewletId
();
if
(
!
this
.
workbenchParams
.
configuration
.
env
.
isBuilt
)
{
if
(
!
this
.
environmentService
.
isBuilt
)
{
viewletId
=
this
.
storageService
.
get
(
SidebarPart
.
activeViewletSettingsKey
,
StorageScope
.
WORKSPACE
,
viewletRegistry
.
getDefaultViewletId
());
// help developers and restore last view
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录