Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
d6f0a591
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,发现更多精彩内容 >>
提交
d6f0a591
编写于
2月 23, 2018
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
panel and viewlet enablement rename
上级
5cccdbbc
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
14 addition
and
14 deletion
+14
-14
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+1
-1
src/vs/workbench/browser/parts/panel/panelPart.ts
src/vs/workbench/browser/parts/panel/panelPart.ts
+1
-1
src/vs/workbench/parts/search/browser/replaceService.ts
src/vs/workbench/parts/search/browser/replaceService.ts
+4
-4
src/vs/workbench/services/panel/common/panelService.ts
src/vs/workbench/services/panel/common/panelService.ts
+1
-1
src/vs/workbench/services/progress/test/progressService.test.ts
.../workbench/services/progress/test/progressService.test.ts
+3
-3
src/vs/workbench/services/viewlet/browser/viewlet.ts
src/vs/workbench/services/viewlet/browser/viewlet.ts
+2
-2
src/vs/workbench/services/viewlet/browser/viewletService.ts
src/vs/workbench/services/viewlet/browser/viewletService.ts
+2
-2
未找到文件。
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
d6f0a591
...
@@ -86,7 +86,7 @@ export class ActivitybarPart extends Part {
...
@@ -86,7 +86,7 @@ export class ActivitybarPart extends Part {
// Deactivate viewlet action on close
// Deactivate viewlet action on close
this
.
toUnbind
.
push
(
this
.
viewletService
.
onDidViewletClose
(
viewlet
=>
this
.
compositeBar
.
deactivateComposite
(
viewlet
.
getId
())));
this
.
toUnbind
.
push
(
this
.
viewletService
.
onDidViewletClose
(
viewlet
=>
this
.
compositeBar
.
deactivateComposite
(
viewlet
.
getId
())));
this
.
toUnbind
.
push
(
this
.
compositeBar
.
onDidContextMenu
(
e
=>
this
.
showContextMenu
(
e
)));
this
.
toUnbind
.
push
(
this
.
compositeBar
.
onDidContextMenu
(
e
=>
this
.
showContextMenu
(
e
)));
this
.
toUnbind
.
push
(
this
.
viewletService
.
onDidViewletEnable
(({
id
,
enabled
})
=>
{
this
.
toUnbind
.
push
(
this
.
viewletService
.
onDidViewletEnable
mentChange
(({
id
,
enabled
})
=>
{
if
(
enabled
)
{
if
(
enabled
)
{
this
.
compositeBar
.
addComposite
(
this
.
viewletService
.
getViewlet
(
id
));
this
.
compositeBar
.
addComposite
(
this
.
viewletService
.
getViewlet
(
id
));
}
else
{
}
else
{
...
...
src/vs/workbench/browser/parts/panel/panelPart.ts
浏览文件 @
d6f0a591
...
@@ -175,7 +175,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
...
@@ -175,7 +175,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
.
sort
((
v1
,
v2
)
=>
v1
.
order
-
v2
.
order
);
.
sort
((
v1
,
v2
)
=>
v1
.
order
-
v2
.
order
);
}
}
public
enablePanel
(
id
:
string
,
enabled
:
boolean
):
void
{
public
setPanelEnablement
(
id
:
string
,
enabled
:
boolean
):
void
{
const
descriptor
=
Registry
.
as
<
PanelRegistry
>
(
PanelExtensions
.
Panels
).
getPanels
().
filter
(
p
=>
p
.
id
===
id
).
pop
();
const
descriptor
=
Registry
.
as
<
PanelRegistry
>
(
PanelExtensions
.
Panels
).
getPanels
().
filter
(
p
=>
p
.
id
===
id
).
pop
();
if
(
descriptor
&&
descriptor
.
enabled
!==
enabled
)
{
if
(
descriptor
&&
descriptor
.
enabled
!==
enabled
)
{
descriptor
.
enabled
=
enabled
;
descriptor
.
enabled
=
enabled
;
...
...
src/vs/workbench/parts/search/browser/replaceService.ts
浏览文件 @
d6f0a591
...
@@ -109,12 +109,12 @@ export class ReplaceService implements IReplaceService {
...
@@ -109,12 +109,12 @@ export class ReplaceService implements IReplaceService {
const
updateSearchViewLocation
=
()
=>
{
const
updateSearchViewLocation
=
()
=>
{
const
config
=
configurationService
.
getValue
<
ISearchConfiguration
>
();
const
config
=
configurationService
.
getValue
<
ISearchConfiguration
>
();
if
(
config
.
search
.
location
===
'
panel
'
)
{
if
(
config
.
search
.
location
===
'
panel
'
)
{
viewletService
.
enableViewle
t
(
VIEW_ID
,
false
);
viewletService
.
setViewletEnablemen
t
(
VIEW_ID
,
false
);
panelService
.
enablePanel
(
VIEW_ID
,
true
);
panelService
.
setPanelEnablement
(
VIEW_ID
,
true
);
}
}
if
(
config
.
search
.
location
===
'
sidebar
'
)
{
if
(
config
.
search
.
location
===
'
sidebar
'
)
{
panelService
.
enablePanel
(
VIEW_ID
,
false
);
panelService
.
setPanelEnablement
(
VIEW_ID
,
false
);
viewletService
.
enableViewle
t
(
VIEW_ID
,
true
);
viewletService
.
setViewletEnablemen
t
(
VIEW_ID
,
true
);
}
}
};
};
configurationService
.
onDidChangeConfiguration
(
e
=>
{
configurationService
.
onDidChangeConfiguration
(
e
=>
{
...
...
src/vs/workbench/services/panel/common/panelService.ts
浏览文件 @
d6f0a591
...
@@ -42,5 +42,5 @@ export interface IPanelService {
...
@@ -42,5 +42,5 @@ export interface IPanelService {
* Enables or disables a panel. Disabled panels are completly hidden from UI.
* Enables or disables a panel. Disabled panels are completly hidden from UI.
* By default all panels are enabled.
* By default all panels are enabled.
*/
*/
enablePanel
(
id
:
string
,
enabled
:
boolean
):
void
;
setPanelEnablement
(
id
:
string
,
enabled
:
boolean
):
void
;
}
}
src/vs/workbench/services/progress/test/progressService.test.ts
浏览文件 @
d6f0a591
...
@@ -28,7 +28,7 @@ class TestViewletService implements IViewletService {
...
@@ -28,7 +28,7 @@ class TestViewletService implements IViewletService {
onDidViewletOpen
=
this
.
onDidViewletOpenEmitter
.
event
;
onDidViewletOpen
=
this
.
onDidViewletOpenEmitter
.
event
;
onDidViewletClose
=
this
.
onDidViewletCloseEmitter
.
event
;
onDidViewletClose
=
this
.
onDidViewletCloseEmitter
.
event
;
onDidViewletEnable
=
this
.
onDidViewletEnableEmitter
.
event
;
onDidViewletEnable
mentChange
=
this
.
onDidViewletEnableEmitter
.
event
;
public
openViewlet
(
id
:
string
,
focus
?:
boolean
):
TPromise
<
IViewlet
>
{
public
openViewlet
(
id
:
string
,
focus
?:
boolean
):
TPromise
<
IViewlet
>
{
return
TPromise
.
as
(
null
);
return
TPromise
.
as
(
null
);
...
@@ -41,7 +41,7 @@ class TestViewletService implements IViewletService {
...
@@ -41,7 +41,7 @@ class TestViewletService implements IViewletService {
public
getActiveViewlet
():
IViewlet
{
public
getActiveViewlet
():
IViewlet
{
return
activeViewlet
;
return
activeViewlet
;
}
}
public
enableViewle
t
(
id
:
string
,
enabled
:
boolean
):
void
{
}
public
setViewletEnablemen
t
(
id
:
string
,
enabled
:
boolean
):
void
{
}
public
dispose
()
{
public
dispose
()
{
}
}
...
@@ -77,7 +77,7 @@ class TestPanelService implements IPanelService {
...
@@ -77,7 +77,7 @@ class TestPanelService implements IPanelService {
return
activeViewlet
;
return
activeViewlet
;
}
}
public
enablePanel
(
id
:
string
,
enabled
:
boolean
):
void
{
}
public
setPanelEnablement
(
id
:
string
,
enabled
:
boolean
):
void
{
}
public
dispose
()
{
public
dispose
()
{
}
}
...
...
src/vs/workbench/services/viewlet/browser/viewlet.ts
浏览文件 @
d6f0a591
...
@@ -18,7 +18,7 @@ export interface IViewletService {
...
@@ -18,7 +18,7 @@ export interface IViewletService {
onDidViewletOpen
:
Event
<
IViewlet
>
;
onDidViewletOpen
:
Event
<
IViewlet
>
;
onDidViewletClose
:
Event
<
IViewlet
>
;
onDidViewletClose
:
Event
<
IViewlet
>
;
onDidViewletEnable
:
Event
<
{
id
:
string
,
enabled
:
boolean
}
>
;
onDidViewletEnable
mentChange
:
Event
<
{
id
:
string
,
enabled
:
boolean
}
>
;
/**
/**
* Opens a viewlet with the given identifier and pass keyboard focus to it if specified.
* Opens a viewlet with the given identifier and pass keyboard focus to it if specified.
...
@@ -49,7 +49,7 @@ export interface IViewletService {
...
@@ -49,7 +49,7 @@ export interface IViewletService {
* Enables or disables a viewlet. Disabled viewlets are completly hidden from UI.
* Enables or disables a viewlet. Disabled viewlets are completly hidden from UI.
* By default all viewlets are enabled.
* By default all viewlets are enabled.
*/
*/
enableViewle
t
(
id
:
string
,
enabled
:
boolean
):
void
;
setViewletEnablemen
t
(
id
:
string
,
enabled
:
boolean
):
void
;
/**
/**
*
*
...
...
src/vs/workbench/services/viewlet/browser/viewletService.ts
浏览文件 @
d6f0a591
...
@@ -35,7 +35,7 @@ export class ViewletService implements IViewletService {
...
@@ -35,7 +35,7 @@ export class ViewletService implements IViewletService {
public
get
onDidViewletOpen
():
Event
<
IViewlet
>
{
return
this
.
sidebarPart
.
onDidViewletOpen
;
}
public
get
onDidViewletOpen
():
Event
<
IViewlet
>
{
return
this
.
sidebarPart
.
onDidViewletOpen
;
}
public
get
onDidViewletClose
():
Event
<
IViewlet
>
{
return
this
.
sidebarPart
.
onDidViewletClose
;
}
public
get
onDidViewletClose
():
Event
<
IViewlet
>
{
return
this
.
sidebarPart
.
onDidViewletClose
;
}
public
get
onDidViewletEnable
():
Event
<
{
id
:
string
,
enabled
:
boolean
}
>
{
return
this
.
_onDidViewletEnable
.
event
;
}
public
get
onDidViewletEnable
mentChange
():
Event
<
{
id
:
string
,
enabled
:
boolean
}
>
{
return
this
.
_onDidViewletEnable
.
event
;
}
constructor
(
constructor
(
sidebarPart
:
SidebarPart
,
sidebarPart
:
SidebarPart
,
...
@@ -84,7 +84,7 @@ export class ViewletService implements IViewletService {
...
@@ -84,7 +84,7 @@ export class ViewletService implements IViewletService {
});
});
}
}
public
enableViewle
t
(
id
:
string
,
enabled
:
boolean
):
void
{
public
setViewletEnablemen
t
(
id
:
string
,
enabled
:
boolean
):
void
{
const
descriptor
=
this
.
getBuiltInViewlets
().
filter
(
desc
=>
desc
.
id
===
id
).
pop
();
const
descriptor
=
this
.
getBuiltInViewlets
().
filter
(
desc
=>
desc
.
id
===
id
).
pop
();
if
(
descriptor
&&
descriptor
.
enabled
!==
enabled
)
{
if
(
descriptor
&&
descriptor
.
enabled
!==
enabled
)
{
descriptor
.
enabled
=
enabled
;
descriptor
.
enabled
=
enabled
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录