Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
5a53b4db
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,发现更多精彩内容 >>
提交
5a53b4db
编写于
3月 11, 2020
作者:
S
Sandeep Somavarapu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
minimize changes
上级
5bb4f250
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
17 addition
and
16 deletion
+17
-16
src/vs/platform/actions/browser/menuEntryActionViewItem.ts
src/vs/platform/actions/browser/menuEntryActionViewItem.ts
+6
-6
src/vs/platform/actions/common/actions.ts
src/vs/platform/actions/common/actions.ts
+7
-6
src/vs/workbench/contrib/quickopen/browser/commandsHandler.ts
...vs/workbench/contrib/quickopen/browser/commandsHandler.ts
+1
-1
src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts
...ch/contrib/remote/electron-browser/remote.contribution.ts
+1
-1
src/vs/workbench/electron-browser/window.ts
src/vs/workbench/electron-browser/window.ts
+2
-2
未找到文件。
src/vs/platform/actions/browser/menuEntryActionViewItem.ts
浏览文件 @
5a53b4db
...
...
@@ -12,7 +12,7 @@ import { IdGenerator } from 'vs/base/common/idGenerator';
import
{
IDisposable
,
toDisposable
,
MutableDisposable
,
DisposableStore
}
from
'
vs/base/common/lifecycle
'
;
import
{
isLinux
,
isWindows
}
from
'
vs/base/common/platform
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
IMenu
,
IMenuActionOptions
,
MenuItemAction
,
SubmenuItemAction
,
Icon
}
from
'
vs/platform/actions/common/actions
'
;
import
{
I
CommandAction
,
I
Menu
,
IMenuActionOptions
,
MenuItemAction
,
SubmenuItemAction
,
Icon
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
...
...
@@ -171,7 +171,7 @@ export class MenuEntryActionViewItem extends ActionViewItem {
render
(
container
:
HTMLElement
):
void
{
super
.
render
(
container
);
this
.
_updateItemClass
(
this
.
_action
);
this
.
_updateItemClass
(
this
.
_action
.
item
);
let
mouseOver
=
false
;
...
...
@@ -227,18 +227,18 @@ export class MenuEntryActionViewItem extends ActionViewItem {
if
(
this
.
options
.
icon
)
{
if
(
this
.
_commandAction
!==
this
.
_action
)
{
if
(
this
.
_action
.
alt
)
{
this
.
_updateItemClass
(
this
.
_action
.
alt
);
this
.
_updateItemClass
(
this
.
_action
.
alt
.
item
);
}
}
else
if
((
<
MenuItemAction
>
this
.
_action
).
alt
)
{
this
.
_updateItemClass
(
this
.
_action
);
this
.
_updateItemClass
(
this
.
_action
.
item
);
}
}
}
_updateItemClass
(
item
:
MenuItem
Action
):
void
{
_updateItemClass
(
item
:
ICommand
Action
):
void
{
this
.
_itemClassDispose
.
value
=
undefined
;
const
icon
=
item
.
checked
&&
(
item
.
item
.
toggled
as
{
icon
?:
Icon
})?.
icon
?
(
item
.
item
.
toggled
as
{
icon
:
Icon
}).
icon
:
item
.
item
.
icon
;
const
icon
=
this
.
_commandAction
.
checked
&&
(
item
.
toggled
as
{
icon
?:
Icon
})?.
icon
?
(
item
.
toggled
as
{
icon
:
Icon
}).
icon
:
item
.
icon
;
if
(
ThemeIcon
.
isThemeIcon
(
icon
))
{
// theme icons
...
...
src/vs/platform/actions/common/actions.ts
浏览文件 @
5a53b4db
...
...
@@ -277,14 +277,14 @@ export class MenuItemAction extends ExecuteCommandAction {
@
IContextKeyService
contextKeyService
:
IContextKeyService
,
@
ICommandService
commandService
:
ICommandService
)
{
super
(
item
.
id
,
typeof
item
.
title
===
'
string
'
?
item
.
title
:
item
.
title
.
value
,
commandService
);
this
.
item
=
item
;
typeof
item
.
title
===
'
string
'
?
super
(
item
.
id
,
item
.
title
,
commandService
)
:
super
(
item
.
id
,
item
.
title
.
value
,
commandService
);
this
.
_cssClass
=
undefined
;
this
.
_enabled
=
!
this
.
item
.
precondition
||
contextKeyService
.
contextMatchesRules
(
this
.
item
.
precondition
);
this
.
_tooltip
=
this
.
item
.
tooltip
?
typeof
this
.
item
.
tooltip
===
'
string
'
?
this
.
item
.
tooltip
:
this
.
item
.
tooltip
.
value
:
undefined
;
this
.
_enabled
=
!
item
.
precondition
||
contextKeyService
.
contextMatchesRules
(
item
.
precondition
);
this
.
_tooltip
=
item
.
tooltip
?
typeof
item
.
tooltip
===
'
string
'
?
item
.
tooltip
:
item
.
tooltip
.
value
:
undefined
;
if
(
this
.
item
.
toggled
)
{
const
toggled
=
((
this
.
item
.
toggled
as
{
condition
:
ContextKeyExpression
}).
condition
?
this
.
item
.
toggled
:
{
condition
:
this
.
item
.
toggled
})
as
{
if
(
item
.
toggled
)
{
const
toggled
=
((
item
.
toggled
as
{
condition
:
ContextKeyExpression
}).
condition
?
item
.
toggled
:
{
condition
:
item
.
toggled
})
as
{
condition
:
ContextKeyExpression
,
icon
?:
Icon
,
tooltip
?:
string
|
ILocalizedString
};
this
.
_checked
=
contextKeyService
.
contextMatchesRules
(
toggled
.
condition
);
...
...
@@ -295,6 +295,7 @@ export class MenuItemAction extends ExecuteCommandAction {
this
.
_options
=
options
||
{};
this
.
item
=
item
;
this
.
alt
=
alt
?
new
MenuItemAction
(
alt
,
undefined
,
this
.
_options
,
contextKeyService
,
commandService
)
:
undefined
;
}
...
...
src/vs/workbench/contrib/quickopen/browser/commandsHandler.ts
浏览文件 @
5a53b4db
...
...
@@ -591,7 +591,7 @@ export class CommandsHandler extends QuickOpenHandler implements IDisposable {
const
aliasHighlights
=
alias
?
wordFilter
(
searchValue
,
alias
)
:
null
;
if
(
labelHighlights
||
aliasHighlights
)
{
entries
.
push
(
this
.
instantiationService
.
createInstance
(
ActionCommandEntry
,
action
.
id
,
this
.
keybindingService
.
lookupKeybinding
(
action
.
id
),
label
,
alias
,
{
label
:
labelHighlights
,
alias
:
aliasHighlights
},
action
,
(
id
:
string
)
=>
this
.
onBeforeRunCommand
(
id
)));
entries
.
push
(
this
.
instantiationService
.
createInstance
(
ActionCommandEntry
,
action
.
i
tem
.
i
d
,
this
.
keybindingService
.
lookupKeybinding
(
action
.
id
),
label
,
alias
,
{
label
:
labelHighlights
,
alias
:
aliasHighlights
},
action
,
(
id
:
string
)
=>
this
.
onBeforeRunCommand
(
id
)));
}
}
}
...
...
src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts
浏览文件 @
5a53b4db
...
...
@@ -207,7 +207,7 @@ export class RemoteWindowActiveIndicator extends Disposable implements IWorkbenc
}
items
.
push
({
type
:
'
item
'
,
id
:
action
.
id
,
id
:
action
.
i
tem
.
i
d
,
label
});
}
...
...
src/vs/workbench/electron-browser/window.ts
浏览文件 @
5a53b4db
...
...
@@ -23,7 +23,7 @@ import { IResourceEditorInput } from 'vs/platform/editor/common/editor';
import
{
KeyboardMapperFactory
}
from
'
vs/workbench/services/keybinding/electron-browser/nativeKeymapService
'
;
import
{
ipcRenderer
as
ipc
,
webFrame
,
crashReporter
,
CrashReporterStartOptions
,
Event
as
IpcEvent
}
from
'
electron
'
;
import
{
IWorkspaceEditingService
}
from
'
vs/workbench/services/workspaces/common/workspaceEditing
'
;
import
{
IMenuService
,
MenuId
,
IMenu
,
MenuItemAction
,
SubmenuItemAction
,
MenuRegistry
,
ICommandAction
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IMenuService
,
MenuId
,
IMenu
,
MenuItemAction
,
ICommandAction
,
SubmenuItemAction
,
MenuRegistry
}
from
'
vs/platform/actions/common/actions
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
createAndFillInActionBarActions
}
from
'
vs/platform/actions/browser/menuEntryActionViewItem
'
;
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
...
...
@@ -511,7 +511,7 @@ export class NativeWindow extends Disposable {
// Command
if
(
action
instanceof
MenuItemAction
)
{
if
(
ignoredItems
.
indexOf
(
action
.
id
)
>=
0
)
{
if
(
ignoredItems
.
indexOf
(
action
.
i
tem
.
i
d
)
>=
0
)
{
continue
;
// ignored
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录