Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
998ed03e
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,发现更多精彩内容 >>
提交
998ed03e
编写于
7月 17, 2017
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix #30838
上级
cfd06442
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
24 addition
and
2 deletion
+24
-2
src/vs/editor/standalone/browser/simpleServices.ts
src/vs/editor/standalone/browser/simpleServices.ts
+3
-0
src/vs/platform/workspace/common/workspace.ts
src/vs/platform/workspace/common/workspace.ts
+5
-0
src/vs/workbench/parts/files/browser/views/explorerView.ts
src/vs/workbench/parts/files/browser/views/explorerView.ts
+1
-1
src/vs/workbench/services/configuration/node/configuration.ts
...vs/workbench/services/configuration/node/configuration.ts
+10
-1
src/vs/workbench/test/workbenchTestServices.ts
src/vs/workbench/test/workbenchTestServices.ts
+5
-0
未找到文件。
src/vs/editor/standalone/browser/simpleServices.ts
浏览文件 @
998ed03e
...
...
@@ -521,6 +521,9 @@ export class SimpleWorkspaceContextService implements IWorkspaceContextService {
private
static
SCHEME
:
'
inmemory
'
;
private
readonly
_onDidChangeWorkspaceName
:
Emitter
<
void
>
=
new
Emitter
<
void
>
();
public
readonly
onDidChangeWorkspaceName
:
Event
<
void
>
=
this
.
_onDidChangeWorkspaceName
.
event
;
private
readonly
_onDidChangeWorkspaceRoots
:
Emitter
<
void
>
=
new
Emitter
<
void
>
();
public
readonly
onDidChangeWorkspaceRoots
:
Event
<
void
>
=
this
.
_onDidChangeWorkspaceRoots
.
event
;
...
...
src/vs/platform/workspace/common/workspace.ts
浏览文件 @
998ed03e
...
...
@@ -48,6 +48,11 @@ export interface IWorkspaceContextService {
*/
saveWorkspace
(
location
:
URI
):
TPromise
<
void
>
;
/**
* An event which fires on workspace name changes.
*/
onDidChangeWorkspaceName
:
Event
<
void
>
;
/**
* An event which fires on workspace roots change.
*/
...
...
src/vs/workbench/parts/files/browser/views/explorerView.ts
浏览文件 @
998ed03e
...
...
@@ -135,7 +135,7 @@ export class ExplorerView extends CollapsibleView {
const
title
=
workspace
.
roots
.
map
(
root
=>
labels
.
getPathLabel
(
root
.
fsPath
,
void
0
,
this
.
environmentService
)).
join
();
titleSpan
.
text
(
this
.
name
).
title
(
title
);
};
this
.
toDispose
.
push
(
this
.
contextService
.
onDidChangeWorkspace
Roots
(()
=>
setHeader
()));
this
.
toDispose
.
push
(
this
.
contextService
.
onDidChangeWorkspace
Name
(()
=>
setHeader
()));
setHeader
();
super
.
renderHeader
(
container
);
...
...
src/vs/workbench/services/configuration/node/configuration.ts
浏览文件 @
998ed03e
...
...
@@ -174,6 +174,9 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat
protected
readonly
_onDidChangeWorkspaceRoots
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
public
readonly
onDidChangeWorkspaceRoots
:
Event
<
void
>
=
this
.
_onDidChangeWorkspaceRoots
.
event
;
protected
readonly
_onDidChangeWorkspaceName
:
Emitter
<
void
>
=
this
.
_register
(
new
Emitter
<
void
>
());
public
readonly
onDidChangeWorkspaceName
:
Event
<
void
>
=
this
.
_onDidChangeWorkspaceName
.
event
;
constructor
()
{
super
();
this
.
_configuration
=
new
Configuration
(
new
BaseConfiguration
(
new
ConfigurationModel
<
any
>
(),
new
ConfigurationModel
<
any
>
()),
new
ConfigurationModel
<
any
>
(),
new
StrictResourceMap
<
FolderConfigurationModel
<
any
>>
(),
this
.
workspace
);
...
...
@@ -392,6 +395,7 @@ export class WorkspaceServiceImpl extends WorkspaceService {
}
private
onWorkspaceSaved
(
configPath
:
URI
):
TPromise
<
void
>
{
let
workspaceName
=
this
.
workspace
.
name
;
this
.
workspaceConfigPath
=
configPath
;
// Reset the workspace if current workspace is single folder
...
...
@@ -403,9 +407,14 @@ export class WorkspaceServiceImpl extends WorkspaceService {
// Update workspace configuration path with new path
else
{
this
.
workspace
.
configuration
=
configPath
;
this
.
workspace
.
name
=
getWorkspaceLabel
(
this
.
environmentService
,
{
id
:
this
.
workspace
.
id
,
configPath
:
this
.
workspace
.
configuration
.
fsPath
});
}
return
this
.
initialize
();
return
this
.
initialize
().
then
(()
=>
{
if
(
workspaceName
!==
this
.
workspace
.
name
)
{
this
.
_onDidChangeWorkspaceName
.
fire
();
}
});
}
private
initializeMulitFolderWorkspace
():
TPromise
<
void
>
{
...
...
src/vs/workbench/test/workbenchTestServices.ts
浏览文件 @
998ed03e
...
...
@@ -70,6 +70,7 @@ export class TestContextService implements IWorkspaceContextService {
private
id
:
string
;
private
options
:
any
;
private
_onDidChangeWorkspaceName
:
Emitter
<
void
>
;
private
_onDidChangeWorkspaceRoots
:
Emitter
<
void
>
;
constructor
(
workspace
:
any
=
TestWorkspace
,
options
:
any
=
null
)
{
...
...
@@ -79,6 +80,10 @@ export class TestContextService implements IWorkspaceContextService {
this
.
_onDidChangeWorkspaceRoots
=
new
Emitter
<
void
>
();
}
public
get
onDidChangeWorkspaceName
():
Event
<
void
>
{
return
this
.
_onDidChangeWorkspaceName
.
event
;
}
public
get
onDidChangeWorkspaceRoots
():
Event
<
void
>
{
return
this
.
_onDidChangeWorkspaceRoots
.
event
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录