Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fb79a326
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,发现更多精彩内容 >>
提交
fb79a326
编写于
5月 21, 2019
作者:
S
SteVen Batten
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
renaming some menu entries, cleanup and checks for panels
上级
0bc1d724
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
74 addition
and
63 deletion
+74
-63
src/vs/workbench/browser/actions/layoutActions.ts
src/vs/workbench/browser/actions/layoutActions.ts
+49
-5
src/vs/workbench/browser/parts/panel/panelActions.ts
src/vs/workbench/browser/parts/panel/panelActions.ts
+13
-3
src/vs/workbench/browser/parts/titlebar/menubarControl.ts
src/vs/workbench/browser/parts/titlebar/menubarControl.ts
+0
-51
src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts
...ench/contrib/debug/electron-browser/debug.contribution.ts
+3
-1
src/vs/workbench/contrib/markers/browser/markers.contribution.ts
...workbench/contrib/markers/browser/markers.contribution.ts
+2
-1
src/vs/workbench/contrib/output/browser/output.contribution.ts
...s/workbench/contrib/output/browser/output.contribution.ts
+3
-1
src/vs/workbench/contrib/terminal/common/terminalMenu.ts
src/vs/workbench/contrib/terminal/common/terminalMenu.ts
+4
-1
未找到文件。
src/vs/workbench/browser/actions/layoutActions.ts
浏览文件 @
fb79a326
...
...
@@ -23,6 +23,7 @@ import { IsMacContext } from 'vs/workbench/browser/contextkeys';
import
{
KeybindingsRegistry
,
KeybindingWeight
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
InEditorZenModeContext
,
IsCenteredLayoutContext
}
from
'
vs/workbench/common/editor
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
SideBarVisibleContext
}
from
'
vs/workbench/common/viewlet
'
;
const
registry
=
Registry
.
as
<
IWorkbenchActionRegistry
>
(
Extensions
.
WorkbenchActions
);
const
viewCategory
=
nls
.
localize
(
'
view
'
,
"
View
"
);
...
...
@@ -61,8 +62,19 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
ToggleActivityBarVisibilityAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
mi
ToggleActivityBar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggl
e &&Activity Bar
"
)
title
:
nls
.
localize
({
key
:
'
mi
HideActivityBar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Hid
e &&Activity Bar
"
)
},
when
:
ContextKeyExpr
.
equals
(
'
config.workbench.activityBar.visible
'
,
true
),
order
:
4
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarAppearanceMenu
,
{
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
ToggleActivityBarVisibilityAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miShowActivityBar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Show &&Activity Bar
"
)
},
when
:
ContextKeyExpr
.
equals
(
'
config.workbench.activityBar.visible
'
,
false
),
order
:
4
});
...
...
@@ -207,8 +219,19 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
ToggleSidebarPositionAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miMoveSidebarLeftRight
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Move Side Bar Left/Right
"
)
title
:
nls
.
localize
({
key
:
'
miMoveSidebarRight
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Move Side Bar Right
"
)
},
when
:
ContextKeyExpr
.
notEquals
(
'
config.workbench.sideBar.location
'
,
'
right
'
),
order
:
2
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarAppearanceMenu
,
{
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
ToggleSidebarPositionAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miMoveSidebarLeft
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Move Side Bar Left
"
)
},
when
:
ContextKeyExpr
.
equals
(
'
config.workbench.sideBar.location
'
,
'
right
'
),
order
:
2
});
...
...
@@ -267,9 +290,19 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
ToggleSidebarVisibilityAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miToggleSidebar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Toggle Side Bar
"
),
toggled
:
ContextKeyExpr
.
has
(
'
sidebarVisible
'
)
title
:
nls
.
localize
({
key
:
'
miHideSidebar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Hide Side Bar
"
),
},
when
:
SideBarVisibleContext
,
order
:
1
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarAppearanceMenu
,
{
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
ToggleSidebarVisibilityAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miShowSidebar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Show Side Bar
"
),
},
when
:
SideBarVisibleContext
.
toNegated
(),
order
:
1
});
...
...
@@ -307,8 +340,19 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
ToggleStatusbarVisibilityAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miToggleStatusbar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Toggle Status Bar
"
)
title
:
nls
.
localize
({
key
:
'
miHideStatusbar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Hide Status Bar
"
)
},
when
:
ContextKeyExpr
.
equals
(
'
config.workbench.statusBar.visible
'
,
true
),
order
:
3
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarAppearanceMenu
,
{
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
ToggleStatusbarVisibilityAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miShowStatusbar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Show Status Bar
"
)
},
when
:
ContextKeyExpr
.
equals
(
'
config.workbench.statusBar.visible
'
,
false
),
order
:
3
});
...
...
src/vs/workbench/browser/parts/panel/panelActions.ts
浏览文件 @
fb79a326
...
...
@@ -15,8 +15,8 @@ import { IPanelService } from 'vs/workbench/services/panel/common/panelService';
import
{
IWorkbenchLayoutService
,
Parts
,
Position
}
from
'
vs/workbench/services/layout/browser/layoutService
'
;
import
{
ActivityAction
}
from
'
vs/workbench/browser/parts/compositeBarActions
'
;
import
{
IActivity
}
from
'
vs/workbench/common/activity
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
ActivePanelContext
}
from
'
vs/workbench/common/panel
'
;
export
class
ClosePanelAction
extends
Action
{
...
...
@@ -272,9 +272,19 @@ MenuRegistry.appendMenuItem(MenuId.MenubarAppearanceMenu, {
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
TogglePanelAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miTogglePanel
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Toggle &&Panel
"
),
toggled
:
ContextKeyExpr
.
has
(
'
activePanel
'
)
title
:
nls
.
localize
({
key
:
'
miShowPanel
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Show &&Panel
"
),
},
when
:
ActivePanelContext
.
toNegated
(),
order
:
5
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
MenubarAppearanceMenu
,
{
group
:
'
2_workbench_layout
'
,
command
:
{
id
:
TogglePanelAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miHidePanel
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Hide &&Panel
"
),
},
when
:
ActivePanelContext
,
order
:
5
});
...
...
src/vs/workbench/browser/parts/titlebar/menubarControl.ts
浏览文件 @
fb79a326
...
...
@@ -38,12 +38,7 @@ import { withNullAsUndefined } from 'vs/base/common/types';
export
class
MenubarControl
extends
Disposable
{
private
keys
=
[
'
files.autoSave
'
,
'
window.menuBarVisibility
'
,
'
editor.multiCursorModifier
'
,
'
workbench.sideBar.location
'
,
'
workbench.statusBar.visible
'
,
'
workbench.activityBar.visible
'
,
'
window.enableMenuBarMnemonics
'
,
'
window.nativeTabs
'
];
...
...
@@ -156,28 +151,6 @@ export class MenubarControl extends Disposable {
return
enableMenuBarMnemonics
;
}
private
get
currentSidebarPosition
():
string
{
return
this
.
configurationService
.
getValue
<
string
>
(
'
workbench.sideBar.location
'
);
}
private
get
currentStatusBarVisibility
():
boolean
{
let
setting
=
this
.
configurationService
.
getValue
<
boolean
>
(
'
workbench.statusBar.visible
'
);
if
(
typeof
setting
!==
'
boolean
'
)
{
setting
=
true
;
}
return
setting
;
}
private
get
currentActivityBarVisibility
():
boolean
{
let
setting
=
this
.
configurationService
.
getValue
<
boolean
>
(
'
workbench.activityBar.visible
'
);
if
(
typeof
setting
!==
'
boolean
'
)
{
setting
=
true
;
}
return
setting
;
}
private
get
currentMenubarVisibility
():
MenuBarVisibility
{
return
this
.
configurationService
.
getValue
<
MenuBarVisibility
>
(
'
window.menuBarVisibility
'
);
}
...
...
@@ -319,30 +292,6 @@ export class MenubarControl extends Disposable {
private
calculateActionLabel
(
action
:
IAction
|
IMenubarMenuItemAction
):
string
{
let
label
=
action
.
label
;
switch
(
action
.
id
)
{
case
'
workbench.action.toggleSidebarPosition
'
:
if
(
this
.
currentSidebarPosition
!==
'
right
'
)
{
label
=
nls
.
localize
({
key
:
'
miMoveSidebarRight
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Move Side Bar Right
"
);
}
else
{
label
=
nls
.
localize
({
key
:
'
miMoveSidebarLeft
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Move Side Bar Left
"
);
}
break
;
case
'
workbench.action.toggleStatusbarVisibility
'
:
if
(
this
.
currentStatusBarVisibility
)
{
label
=
nls
.
localize
({
key
:
'
miHideStatusbar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Hide Status Bar
"
);
}
else
{
label
=
nls
.
localize
({
key
:
'
miShowStatusbar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Show Status Bar
"
);
}
break
;
case
'
workbench.action.toggleActivityBarVisibility
'
:
if
(
this
.
currentActivityBarVisibility
)
{
label
=
nls
.
localize
({
key
:
'
miHideActivityBar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Hide &&Activity Bar
"
);
}
else
{
label
=
nls
.
localize
({
key
:
'
miShowActivityBar
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
Show &&Activity Bar
"
);
}
break
;
default
:
break
;
}
...
...
src/vs/workbench/contrib/debug/electron-browser/debug.contribution.ts
浏览文件 @
fb79a326
...
...
@@ -50,6 +50,7 @@ import { WatchExpressionsView } from 'vs/workbench/contrib/debug/browser/watchEx
import
{
VariablesView
}
from
'
vs/workbench/contrib/debug/browser/variablesView
'
;
import
{
ClearReplAction
,
Repl
}
from
'
vs/workbench/contrib/debug/browser/repl
'
;
import
{
DebugContentProvider
}
from
'
vs/workbench/contrib/debug/common/debugContentProvider
'
;
import
{
ActivePanelContext
}
from
'
vs/workbench/common/panel
'
;
class
OpenDebugViewletAction
extends
ShowViewletAction
{
public
static
readonly
ID
=
VIEWLET_ID
;
...
...
@@ -330,7 +331,8 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
group
:
'
4_panels
'
,
command
:
{
id
:
OpenDebugPanelAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miToggleDebugConsole
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
De&&bug Console
"
)
title
:
nls
.
localize
({
key
:
'
miToggleDebugConsole
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
De&&bug Console
"
),
toggled
:
ActivePanelContext
.
isEqualTo
(
REPL_ID
)
},
order
:
2
});
...
...
src/vs/workbench/contrib/markers/browser/markers.contribution.ts
浏览文件 @
fb79a326
...
...
@@ -249,7 +249,8 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
group
:
'
4_panels
'
,
command
:
{
id
:
ToggleMarkersPanelAction
.
ID
,
title
:
localize
({
key
:
'
miMarker
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Problems
"
)
title
:
localize
({
key
:
'
miMarker
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Problems
"
),
toggled
:
ActivePanelContext
.
isEqualTo
(
Constants
.
MARKERS_PANEL_ID
)
},
order
:
4
});
src/vs/workbench/contrib/output/browser/output.contribution.ts
浏览文件 @
fb79a326
...
...
@@ -22,6 +22,7 @@ import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions, IWo
import
{
LifecyclePhase
}
from
'
vs/platform/lifecycle/common/lifecycle
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
ITextModelService
}
from
'
vs/editor/common/services/resolverService
'
;
import
{
ActivePanelContext
}
from
'
vs/workbench/common/panel
'
;
// Register Service
registerSingleton
(
IOutputService
,
OutputService
);
...
...
@@ -120,7 +121,8 @@ MenuRegistry.appendMenuItem(MenuId.MenubarViewMenu, {
group
:
'
4_panels
'
,
command
:
{
id
:
ToggleOutputAction
.
ID
,
title
:
nls
.
localize
({
key
:
'
miToggleOutput
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Output
"
)
title
:
nls
.
localize
({
key
:
'
miToggleOutput
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Output
"
),
toggled
:
ActivePanelContext
.
isEqualTo
(
OUTPUT_PANEL_ID
)
},
order
:
1
});
src/vs/workbench/contrib/terminal/common/terminalMenu.ts
浏览文件 @
fb79a326
...
...
@@ -7,6 +7,8 @@ import * as nls from 'vs/nls';
import
{
MenuRegistry
,
MenuId
}
from
'
vs/platform/actions/common/actions
'
;
import
{
TERMINAL_COMMAND_ID
}
from
'
vs/workbench/contrib/terminal/common/terminalCommands
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ActivePanelContext
}
from
'
vs/workbench/common/panel
'
;
import
{
TERMINAL_PANEL_ID
}
from
'
vs/workbench/contrib/terminal/common/terminal
'
;
export
function
setupTerminalMenu
()
{
...
...
@@ -16,7 +18,8 @@ export function setupTerminalMenu() {
group
:
'
4_panels
'
,
command
:
{
id
:
TERMINAL_COMMAND_ID
.
TOGGLE
,
title
:
nls
.
localize
({
key
:
'
miToggleIntegratedTerminal
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Terminal
"
)
title
:
nls
.
localize
({
key
:
'
miToggleIntegratedTerminal
'
,
comment
:
[
'
&& denotes a mnemonic
'
]
},
"
&&Terminal
"
),
toggled
:
ActivePanelContext
.
isEqualTo
(
TERMINAL_PANEL_ID
)
},
order
:
3
});
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录