Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
af15adf3
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,发现更多精彩内容 >>
提交
af15adf3
编写于
7月 21, 2020
作者:
J
João Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
move SubmenuAction to common
上级
18e9e7f3
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
12 addition
and
13 deletion
+12
-13
src/vs/base/browser/contextmenu.ts
src/vs/base/browser/contextmenu.ts
+1
-2
src/vs/base/browser/ui/menu/menu.ts
src/vs/base/browser/ui/menu/menu.ts
+1
-7
src/vs/base/browser/ui/menu/menubar.ts
src/vs/base/browser/ui/menu/menubar.ts
+2
-2
src/vs/base/common/actions.ts
src/vs/base/common/actions.ts
+6
-0
src/vs/workbench/browser/parts/titlebar/menubarControl.ts
src/vs/workbench/browser/parts/titlebar/menubarControl.ts
+2
-2
未找到文件。
src/vs/base/browser/contextmenu.ts
浏览文件 @
af15adf3
...
@@ -3,10 +3,9 @@
...
@@ -3,10 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
*--------------------------------------------------------------------------------------------*/
import
{
IAction
,
IActionRunner
}
from
'
vs/base/common/actions
'
;
import
{
IAction
,
IActionRunner
,
SubmenuAction
}
from
'
vs/base/common/actions
'
;
import
{
IActionViewItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
IActionViewItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ResolvedKeybinding
}
from
'
vs/base/common/keyCodes
'
;
import
{
ResolvedKeybinding
}
from
'
vs/base/common/keyCodes
'
;
import
{
SubmenuAction
}
from
'
vs/base/browser/ui/menu/menu
'
;
import
{
AnchorAlignment
}
from
'
vs/base/browser/ui/contextview/contextview
'
;
import
{
AnchorAlignment
}
from
'
vs/base/browser/ui/contextview/contextview
'
;
export
interface
IContextMenuEvent
{
export
interface
IContextMenuEvent
{
...
...
src/vs/base/browser/ui/menu/menu.ts
浏览文件 @
af15adf3
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
import
'
vs/css!./menu
'
;
import
'
vs/css!./menu
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
nls
from
'
vs/nls
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
*
as
strings
from
'
vs/base/common/strings
'
;
import
{
IActionRunner
,
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
{
IActionRunner
,
IAction
,
Submenu
Action
}
from
'
vs/base/common/actions
'
;
import
{
ActionBar
,
IActionViewItemProvider
,
ActionsOrientation
,
Separator
,
ActionViewItem
,
IActionViewItemOptions
,
BaseActionViewItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ActionBar
,
IActionViewItemProvider
,
ActionsOrientation
,
Separator
,
ActionViewItem
,
IActionViewItemOptions
,
BaseActionViewItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ResolvedKeybinding
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
ResolvedKeybinding
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
addClass
,
EventType
,
EventHelper
,
EventLike
,
removeTabIndexAndUpdateFocus
,
isAncestor
,
hasClass
,
addDisposableListener
,
removeClass
,
append
,
$
,
addClasses
,
removeClasses
,
clearNode
}
from
'
vs/base/browser/dom
'
;
import
{
addClass
,
EventType
,
EventHelper
,
EventLike
,
removeTabIndexAndUpdateFocus
,
isAncestor
,
hasClass
,
addDisposableListener
,
removeClass
,
append
,
$
,
addClasses
,
removeClasses
,
clearNode
}
from
'
vs/base/browser/dom
'
;
...
@@ -55,12 +55,6 @@ export interface IMenuStyles {
...
@@ -55,12 +55,6 @@ export interface IMenuStyles {
separatorColor
?:
Color
;
separatorColor
?:
Color
;
}
}
export
class
SubmenuAction
extends
Action
{
constructor
(
label
:
string
,
public
entries
:
ReadonlyArray
<
SubmenuAction
|
IAction
>
,
cssClass
?:
string
)
{
super
(
!!
cssClass
?
cssClass
:
'
submenu
'
,
label
,
''
,
true
);
}
}
interface
ISubMenuData
{
interface
ISubMenuData
{
parent
:
Menu
;
parent
:
Menu
;
submenu
?:
Menu
;
submenu
?:
Menu
;
...
...
src/vs/base/browser/ui/menu/menubar.ts
浏览文件 @
af15adf3
...
@@ -10,8 +10,8 @@ import * as nls from 'vs/nls';
...
@@ -10,8 +10,8 @@ import * as nls from 'vs/nls';
import
{
domEvent
}
from
'
vs/base/browser/event
'
;
import
{
domEvent
}
from
'
vs/base/browser/event
'
;
import
{
StandardKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
StandardKeyboardEvent
}
from
'
vs/base/browser/keyboardEvent
'
;
import
{
EventType
,
Gesture
,
GestureEvent
}
from
'
vs/base/browser/touch
'
;
import
{
EventType
,
Gesture
,
GestureEvent
}
from
'
vs/base/browser/touch
'
;
import
{
cleanMnemonic
,
IMenuOptions
,
Menu
,
MENU_ESCAPED_MNEMONIC_REGEX
,
MENU_MNEMONIC_REGEX
,
SubmenuAction
,
IMenuStyles
,
Direction
}
from
'
vs/base/browser/ui/menu/menu
'
;
import
{
cleanMnemonic
,
IMenuOptions
,
Menu
,
MENU_ESCAPED_MNEMONIC_REGEX
,
MENU_MNEMONIC_REGEX
,
IMenuStyles
,
Direction
}
from
'
vs/base/browser/ui/menu/menu
'
;
import
{
ActionRunner
,
IAction
,
IActionRunner
}
from
'
vs/base/common/actions
'
;
import
{
ActionRunner
,
IAction
,
IActionRunner
,
SubmenuAction
}
from
'
vs/base/common/actions
'
;
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
Event
,
Emitter
}
from
'
vs/base/common/event
'
;
import
{
KeyCode
,
ResolvedKeybinding
,
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
KeyCode
,
ResolvedKeybinding
,
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
...
...
src/vs/base/common/actions.ts
浏览文件 @
af15adf3
...
@@ -218,3 +218,9 @@ export class RadioGroup extends Disposable {
...
@@ -218,3 +218,9 @@ export class RadioGroup extends Disposable {
}
}
}
}
}
}
export
class
SubmenuAction
extends
Action
{
constructor
(
label
:
string
,
public
entries
:
ReadonlyArray
<
SubmenuAction
|
IAction
>
,
cssClass
?:
string
)
{
super
(
!!
cssClass
?
cssClass
:
'
submenu
'
,
label
,
''
,
true
);
}
}
src/vs/workbench/browser/parts/titlebar/menubarControl.ts
浏览文件 @
af15adf3
...
@@ -8,7 +8,7 @@ import { IMenuService, MenuId, IMenu, SubmenuItemAction, registerAction2, Action
...
@@ -8,7 +8,7 @@ import { IMenuService, MenuId, IMenu, SubmenuItemAction, registerAction2, Action
import
{
registerThemingParticipant
,
IColorTheme
,
ICssStyleCollector
,
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
registerThemingParticipant
,
IColorTheme
,
ICssStyleCollector
,
IThemeService
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
MenuBarVisibility
,
getTitleBarStyle
,
IWindowOpenable
,
getMenuBarVisibility
}
from
'
vs/platform/windows/common/windows
'
;
import
{
MenuBarVisibility
,
getTitleBarStyle
,
IWindowOpenable
,
getMenuBarVisibility
}
from
'
vs/platform/windows/common/windows
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
{
IAction
,
Action
,
SubmenuAction
}
from
'
vs/base/common/actions
'
;
import
{
Separator
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
Separator
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
*
as
DOM
from
'
vs/base/browser/dom
'
;
import
*
as
DOM
from
'
vs/base/browser/dom
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
...
@@ -27,7 +27,7 @@ import { INotificationService, Severity } from 'vs/platform/notification/common/
...
@@ -27,7 +27,7 @@ import { INotificationService, Severity } from 'vs/platform/notification/common/
import
{
IPreferencesService
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
IPreferencesService
}
from
'
vs/workbench/services/preferences/common/preferences
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
MenuBar
,
IMenuBarOptions
}
from
'
vs/base/browser/ui/menu/menubar
'
;
import
{
MenuBar
,
IMenuBarOptions
}
from
'
vs/base/browser/ui/menu/menubar
'
;
import
{
SubmenuAction
,
Direction
}
from
'
vs/base/browser/ui/menu/menu
'
;
import
{
Direction
}
from
'
vs/base/browser/ui/menu/menu
'
;
import
{
attachMenuStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
{
attachMenuStyler
}
from
'
vs/platform/theme/common/styler
'
;
import
{
mnemonicMenuLabel
,
unmnemonicLabel
}
from
'
vs/base/common/labels
'
;
import
{
mnemonicMenuLabel
,
unmnemonicLabel
}
from
'
vs/base/common/labels
'
;
import
{
IAccessibilityService
}
from
'
vs/platform/accessibility/common/accessibility
'
;
import
{
IAccessibilityService
}
from
'
vs/platform/accessibility/common/accessibility
'
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录