Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ef14938a
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,发现更多精彩内容 >>
提交
ef14938a
编写于
5月 07, 2020
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
F6 and shift+F6 also focus on activity bar
上级
9d68bd29
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
5 deletion
+25
-5
src/vs/workbench/browser/actions/navigationActions.ts
src/vs/workbench/browser/actions/navigationActions.ts
+5
-4
src/vs/workbench/browser/layout.ts
src/vs/workbench/browser/layout.ts
+5
-1
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
...vs/workbench/browser/parts/activitybar/activitybarPart.ts
+4
-0
src/vs/workbench/browser/parts/compositeBar.ts
src/vs/workbench/browser/parts/compositeBar.ts
+6
-0
src/vs/workbench/services/activityBar/browser/activityBarService.ts
...kbench/services/activityBar/browser/activityBarService.ts
+5
-0
未找到文件。
src/vs/workbench/browser/actions/navigationActions.ts
浏览文件 @
ef14938a
...
@@ -202,8 +202,9 @@ class NavigateDownAction extends BaseNavigationAction {
...
@@ -202,8 +202,9 @@ class NavigateDownAction extends BaseNavigationAction {
}
}
function
findVisibleNeighbour
(
layoutService
:
IWorkbenchLayoutService
,
part
:
Parts
,
next
:
boolean
):
Parts
{
function
findVisibleNeighbour
(
layoutService
:
IWorkbenchLayoutService
,
part
:
Parts
,
next
:
boolean
):
Parts
{
const
neighbour
=
part
===
Parts
.
EDITOR_PART
?
(
next
?
Parts
.
STATUSBAR_PART
:
Parts
.
PANEL_PART
)
:
part
===
Parts
.
STATUSBAR_PART
?
(
next
?
Parts
.
SIDEBAR_PART
:
Parts
.
EDITOR_PART
)
:
const
neighbour
=
part
===
Parts
.
EDITOR_PART
?
(
next
?
Parts
.
STATUSBAR_PART
:
Parts
.
PANEL_PART
)
:
part
===
Parts
.
STATUSBAR_PART
?
(
next
?
Parts
.
ACTIVITYBAR_PART
:
Parts
.
EDITOR_PART
)
:
part
===
Parts
.
SIDEBAR_PART
?
(
next
?
Parts
.
PANEL_PART
:
Parts
.
STATUSBAR_PART
)
:
part
===
Parts
.
PANEL_PART
?
(
next
?
Parts
.
EDITOR_PART
:
Parts
.
SIDEBAR_PART
)
:
Parts
.
EDITOR_PART
;
part
===
Parts
.
ACTIVITYBAR_PART
?
(
next
?
Parts
.
SIDEBAR_PART
:
Parts
.
STATUSBAR_PART
)
:
part
===
Parts
.
SIDEBAR_PART
?
(
next
?
Parts
.
PANEL_PART
:
Parts
.
ACTIVITYBAR_PART
)
:
part
===
Parts
.
PANEL_PART
?
(
next
?
Parts
.
EDITOR_PART
:
Parts
.
SIDEBAR_PART
)
:
Parts
.
EDITOR_PART
;
if
(
layoutService
.
isVisible
(
neighbour
)
||
neighbour
===
Parts
.
EDITOR_PART
)
{
if
(
layoutService
.
isVisible
(
neighbour
)
||
neighbour
===
Parts
.
EDITOR_PART
)
{
return
neighbour
;
return
neighbour
;
}
}
...
@@ -212,8 +213,8 @@ function findVisibleNeighbour(layoutService: IWorkbenchLayoutService, part: Part
...
@@ -212,8 +213,8 @@ function findVisibleNeighbour(layoutService: IWorkbenchLayoutService, part: Part
}
}
function
focusNextOrPreviousPart
(
layoutService
:
IWorkbenchLayoutService
,
next
:
boolean
):
void
{
function
focusNextOrPreviousPart
(
layoutService
:
IWorkbenchLayoutService
,
next
:
boolean
):
void
{
const
currentlyFocusedPart
=
layoutService
.
hasFocus
(
Parts
.
EDITOR_PART
)
?
Parts
.
EDITOR_PART
:
layoutService
.
hasFocus
(
Parts
.
STATUSBAR_PART
)
?
Parts
.
STATUS
BAR_PART
:
const
currentlyFocusedPart
=
layoutService
.
hasFocus
(
Parts
.
EDITOR_PART
)
?
Parts
.
EDITOR_PART
:
layoutService
.
hasFocus
(
Parts
.
ACTIVITYBAR_PART
)
?
Parts
.
ACTIVITY
BAR_PART
:
layoutService
.
hasFocus
(
Parts
.
SIDEBAR_PART
)
?
Parts
.
SIDEBAR_PART
:
layoutService
.
hasFocus
(
Parts
.
PANEL_PART
)
?
Parts
.
PANEL_PART
:
undefined
;
layoutService
.
hasFocus
(
Parts
.
S
TATUSBAR_PART
)
?
Parts
.
STATUSBAR_PART
:
layoutService
.
hasFocus
(
Parts
.
S
IDEBAR_PART
)
?
Parts
.
SIDEBAR_PART
:
layoutService
.
hasFocus
(
Parts
.
PANEL_PART
)
?
Parts
.
PANEL_PART
:
undefined
;
let
partToFocus
=
Parts
.
EDITOR_PART
;
let
partToFocus
=
Parts
.
EDITOR_PART
;
if
(
currentlyFocusedPart
)
{
if
(
currentlyFocusedPart
)
{
partToFocus
=
findVisibleNeighbour
(
layoutService
,
currentlyFocusedPart
,
next
);
partToFocus
=
findVisibleNeighbour
(
layoutService
,
currentlyFocusedPart
,
next
);
...
...
src/vs/workbench/browser/layout.ts
浏览文件 @
ef14938a
...
@@ -177,6 +177,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
...
@@ -177,6 +177,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
private
backupFileService
!
:
IBackupFileService
;
private
backupFileService
!
:
IBackupFileService
;
private
notificationService
!
:
INotificationService
;
private
notificationService
!
:
INotificationService
;
private
themeService
!
:
IThemeService
;
private
themeService
!
:
IThemeService
;
private
activityBarService
!
:
IActivityBarService
;
protected
readonly
state
=
{
protected
readonly
state
=
{
fullscreen
:
false
,
fullscreen
:
false
,
...
@@ -260,8 +261,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
...
@@ -260,8 +261,8 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
this
.
viewDescriptorService
=
accessor
.
get
(
IViewDescriptorService
);
this
.
viewDescriptorService
=
accessor
.
get
(
IViewDescriptorService
);
this
.
titleService
=
accessor
.
get
(
ITitleService
);
this
.
titleService
=
accessor
.
get
(
ITitleService
);
this
.
notificationService
=
accessor
.
get
(
INotificationService
);
this
.
notificationService
=
accessor
.
get
(
INotificationService
);
this
.
activityBarService
=
accessor
.
get
(
IActivityBarService
);
accessor
.
get
(
IStatusbarService
);
// not used, but called to ensure instantiated
accessor
.
get
(
IStatusbarService
);
// not used, but called to ensure instantiated
accessor
.
get
(
IActivityBarService
);
// not used, but called to ensure instantiated
// Listeners
// Listeners
this
.
registerLayoutListeners
();
this
.
registerLayoutListeners
();
...
@@ -846,6 +847,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
...
@@ -846,6 +847,9 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
activeViewlet
.
focus
();
activeViewlet
.
focus
();
}
}
break
;
break
;
case
Parts
.
ACTIVITYBAR_PART
:
this
.
activityBarService
.
focusActivityBar
();
break
;
default
:
default
:
// Status Bar, Activity Bar and Title Bar simply pass focus to container
// Status Bar, Activity Bar and Title Bar simply pass focus to container
const
container
=
this
.
getContainer
(
part
);
const
container
=
this
.
getContainer
(
part
);
...
...
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
浏览文件 @
ef14938a
...
@@ -168,6 +168,10 @@ export class ActivitybarPart extends Part implements IActivityBarService {
...
@@ -168,6 +168,10 @@ export class ActivitybarPart extends Part implements IActivityBarService {
this
.
registerListeners
();
this
.
registerListeners
();
}
}
focusActivityBar
():
void
{
this
.
compositeBar
.
focus
();
}
private
registerListeners
():
void
{
private
registerListeners
():
void
{
// View Container Changes
// View Container Changes
...
...
src/vs/workbench/browser/parts/compositeBar.ts
浏览文件 @
ef14938a
...
@@ -253,6 +253,12 @@ export class CompositeBar extends Widget implements ICompositeBar {
...
@@ -253,6 +253,12 @@ export class CompositeBar extends Widget implements ICompositeBar {
return
actionBarDiv
;
return
actionBarDiv
;
}
}
focus
():
void
{
if
(
this
.
compositeSwitcherBar
)
{
this
.
compositeSwitcherBar
.
focus
();
}
}
layout
(
dimension
:
Dimension
):
void
{
layout
(
dimension
:
Dimension
):
void
{
this
.
dimension
=
dimension
;
this
.
dimension
=
dimension
;
if
(
dimension
.
height
===
0
||
dimension
.
width
===
0
)
{
if
(
dimension
.
height
===
0
||
dimension
.
width
===
0
)
{
...
...
src/vs/workbench/services/activityBar/browser/activityBarService.ts
浏览文件 @
ef14938a
...
@@ -26,4 +26,9 @@ export interface IActivityBarService {
...
@@ -26,4 +26,9 @@ export interface IActivityBarService {
* Returns id of visible viewlets following the visual order.
* Returns id of visible viewlets following the visual order.
*/
*/
getVisibleViewContainerIds
():
string
[];
getVisibleViewContainerIds
():
string
[];
/**
* Focuses the activity bar.
*/
focusActivityBar
():
void
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录