Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
e734a013
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,发现更多精彩内容 >>
提交
e734a013
编写于
5月 09, 2018
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Composite bar: Save state on change and do not save on shutdown
上级
1c0f3a3c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
4 addition
and
19 deletion
+4
-19
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+0
-1
src/vs/workbench/browser/parts/compositebar/compositeBar.ts
src/vs/workbench/browser/parts/compositebar/compositeBar.ts
+4
-13
src/vs/workbench/browser/parts/panel/panelPart.ts
src/vs/workbench/browser/parts/panel/panelPart.ts
+0
-5
未找到文件。
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
e734a013
...
...
@@ -326,7 +326,6 @@ export class ActivitybarPart extends Part {
public
shutdown
():
void
{
const
state
=
this
.
viewletService
.
getViewlets
().
filter
(
viewlet
=>
this
.
hasRegisteredViews
(
viewlet
)).
map
(
viewlet
=>
({
id
:
viewlet
.
id
,
iconUrl
:
viewlet
.
iconUrl
}));
this
.
storageService
.
store
(
ActivitybarPart
.
PLACEHOLDER_VIEWLETS
,
JSON
.
stringify
(
state
),
StorageScope
.
GLOBAL
);
this
.
compositeBar
.
shutdown
();
super
.
shutdown
();
}
...
...
src/vs/workbench/browser/parts/compositebar/compositeBar.ts
浏览文件 @
e734a013
...
...
@@ -196,8 +196,6 @@ export class CompositeBar extends Widget implements ICompositeBar {
public
pin
(
compositeId
:
string
,
open
?:
boolean
):
void
{
if
(
this
.
model
.
setPinned
(
compositeId
,
true
))
{
this
.
updateCompositeSwitcher
();
// Persist
this
.
saveCompositeItems
();
if
(
open
)
{
this
.
options
.
openComposite
(
compositeId
)
...
...
@@ -210,8 +208,6 @@ export class CompositeBar extends Widget implements ICompositeBar {
if
(
this
.
model
.
setPinned
(
compositeId
,
false
))
{
this
.
updateCompositeSwitcher
();
// Persist
this
.
saveCompositeItems
();
const
defaultCompositeId
=
this
.
options
.
getDefaultCompositeId
();
...
...
@@ -254,11 +250,7 @@ export class CompositeBar extends Widget implements ICompositeBar {
public
move
(
compositeId
:
string
,
toCompositeId
:
string
):
void
{
if
(
this
.
model
.
move
(
compositeId
,
toCompositeId
))
{
// timeout helps to prevent artifacts from showing up
setTimeout
(()
=>
{
this
.
updateCompositeSwitcher
();
// Persist
this
.
saveCompositeItems
();
},
0
);
setTimeout
(()
=>
this
.
updateCompositeSwitcher
(),
0
);
}
}
...
...
@@ -399,6 +391,9 @@ export class CompositeBar extends Widget implements ICompositeBar {
this
.
compositeSwitcherBar
.
push
(
this
.
compositeOverflowAction
,
{
label
:
false
,
icon
:
true
});
}
// Persist
this
.
saveCompositeItems
();
}
private
getOverflowingComposites
():
{
id
:
string
,
name
:
string
}[]
{
...
...
@@ -452,10 +447,6 @@ export class CompositeBar extends Widget implements ICompositeBar {
this
.
storedState
=
this
.
model
.
toJSON
();
this
.
storageService
.
store
(
this
.
options
.
storageId
,
JSON
.
stringify
(
this
.
storedState
),
StorageScope
.
GLOBAL
);
}
public
shutdown
():
void
{
this
.
saveCompositeItems
();
}
}
interface
ISerializedCompositeBarItem
{
...
...
src/vs/workbench/browser/parts/panel/panelPart.ts
浏览文件 @
e734a013
...
...
@@ -237,11 +237,6 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
return
sizes
;
}
public
shutdown
():
void
{
this
.
compositeBar
.
shutdown
();
super
.
shutdown
();
}
private
layoutCompositeBar
():
void
{
if
(
this
.
dimension
)
{
let
availableWidth
=
this
.
dimension
.
width
-
40
;
// take padding into account
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录