Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
638a50ac
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,发现更多精彩内容 >>
提交
638a50ac
编写于
9月 26, 2016
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
introduce workbench.panels.showInSidebar
上级
606b9ce2
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
2 deletion
+22
-2
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+14
-2
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+3
-0
src/vs/workbench/electron-browser/main.contribution.ts
src/vs/workbench/electron-browser/main.contribution.ts
+5
-0
未找到文件。
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
638a50ac
...
...
@@ -11,6 +11,7 @@ import {TPromise} from 'vs/base/common/winjs.base';
import
{
Builder
,
$
}
from
'
vs/base/browser/builder
'
;
import
{
Action
}
from
'
vs/base/common/actions
'
;
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
{
IWorkbenchEditorConfiguration
}
from
'
vs/workbench/common/editor
'
;
import
{
ActionsOrientation
,
ActionBar
,
IActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
IComposite
}
from
'
vs/workbench/common/composite
'
;
...
...
@@ -19,6 +20,7 @@ import {ViewletDescriptor, ViewletRegistry, Extensions as ViewletExtensions, Vie
import
{
CompositeDescriptor
}
from
'
vs/workbench/browser/composite
'
;
import
{
Panel
,
PanelRegistry
,
Extensions
as
PanelExtensions
,
PanelDescriptor
}
from
'
vs/workbench/browser/panel
'
;
import
{
Part
}
from
'
vs/workbench/browser/part
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
ActivityAction
,
ActivityActionItem
}
from
'
vs/workbench/browser/parts/activitybar/activityAction
'
;
import
{
TogglePanelAction
}
from
'
vs/workbench/browser/parts/panel/panelPart
'
;
import
{
IViewletService
}
from
'
vs/workbench/services/viewlet/common/viewletService
'
;
...
...
@@ -43,7 +45,8 @@ export class ActivitybarPart extends Part implements IActivityService {
@
IPanelService
private
panelService
:
IPanelService
,
@
IKeybindingService
private
keybindingService
:
IKeybindingService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IPartService
private
partService
:
IPartService
@
IPartService
private
partService
:
IPartService
,
@
IConfigurationService
protected
configurationService
:
IConfigurationService
)
{
super
(
id
);
...
...
@@ -62,6 +65,15 @@ export class ActivitybarPart extends Part implements IActivityService {
// Deactivate viewlet action on close
this
.
toUnbind
.
push
(
this
.
viewletService
.
onDidViewletClose
(
viewlet
=>
this
.
onCompositeClosed
(
viewlet
)));
this
.
toUnbind
.
push
(
this
.
panelService
.
onDidPanelClose
(
panel
=>
this
.
onPanelClosed
(
panel
)));
this
.
toUnbind
.
push
(
this
.
configurationService
.
onDidUpdateConfiguration
(
e
=>
this
.
onConfigurationUpdated
(
e
.
config
)));
}
private
onConfigurationUpdated
(
config
:
IWorkbenchEditorConfiguration
):
void
{
if
(
this
.
panelSwitcherBar
)
{
config
.
workbench
.
panels
.
showInSidebar
?
this
.
panelSwitcherBar
.
getContainer
().
show
()
:
this
.
panelSwitcherBar
.
getContainer
().
hide
();
}
}
private
onActiveCompositeChanged
(
composite
:
IComposite
):
void
{
...
...
@@ -135,7 +147,7 @@ export class ActivitybarPart extends Part implements IActivityService {
}
private
createPanelSwitcher
(
div
:
Builder
):
void
{
// Composite switcher is on top
this
.
panelSwitcherBar
=
new
ActionBar
(
div
,
{
actionItemProvider
:
(
action
:
Action
)
=>
this
.
activityActionItems
[
action
.
id
],
...
...
src/vs/workbench/common/editor.ts
浏览文件 @
638a50ac
...
...
@@ -884,6 +884,9 @@ export interface IWorkbenchEditorConfiguration {
enablePreview
:
boolean
;
enablePreviewFromQuickOpen
:
boolean
;
openPositioning
:
string
;
},
panels
:
{
showInSidebar
:
boolean
}
};
}
...
...
src/vs/workbench/electron-browser/main.contribution.ts
浏览文件 @
638a50ac
...
...
@@ -104,6 +104,11 @@ configurationRegistry.registerConfiguration({
'
type
'
:
'
boolean
'
,
'
description
'
:
nls
.
localize
(
'
openDefaultSettings
'
,
"
Controls if opening settings also opens an editor showing all default settings.
"
),
'
default
'
:
true
},
'
workbench.panels.showInSidebar
'
:
{
'
type
'
:
'
boolean
'
,
'
description
'
:
nls
.
localize
(
'
panelsShowInSidebar
'
,
"
Controls if panel icons are shown in the sidebar below the viewlet icons.
"
),
'
default
'
:
false
}
}
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录