Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
51f0436d
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
51f0436d
编写于
6月 23, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename editor/primary to editor/title, remove editor/secondary
上级
1aa20274
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
17 addition
and
19 deletion
+17
-19
extensions/markdown/package.json
extensions/markdown/package.json
+1
-1
src/vs/platform/actions/common/actions.ts
src/vs/platform/actions/common/actions.ts
+6
-8
src/vs/platform/actions/common/menusExtensionPoint.ts
src/vs/platform/actions/common/menusExtensionPoint.ts
+1
-1
src/vs/platform/actions/common/menusService.ts
src/vs/platform/actions/common/menusService.ts
+5
-5
src/vs/platform/actions/workbench/actionBarContributor.ts
src/vs/platform/actions/workbench/actionBarContributor.ts
+2
-2
src/vs/workbench/browser/parts/editor/titleControl.ts
src/vs/workbench/browser/parts/editor/titleControl.ts
+2
-2
未找到文件。
extensions/markdown/package.json
浏览文件 @
51f0436d
...
...
@@ -70,7 +70,7 @@
}
],
"menus"
:
{
"editor/
primary
"
:
[
"editor/
title
"
:
[
{
"when"
:
"resourceLangId == markdown"
,
"command"
:
"markdown.showPreview"
,
...
...
src/vs/platform/actions/common/actions.ts
浏览文件 @
51f0436d
...
...
@@ -28,16 +28,14 @@ export interface MenuItem {
when
?:
KbExpr
;
}
export
enum
MenuLocation
{
EditorPrimary
=
1
,
EditorSecondary
=
2
export
enum
Menus
{
EditorTitle
=
1
,
}
export
namespace
Menu
Location
{
export
function
parse
(
value
:
string
):
Menu
Location
{
export
namespace
Menu
s
{
export
function
parse
(
value
:
string
):
Menu
s
{
switch
(
value
)
{
case
'
editor/primary
'
:
return
MenuLocation
.
EditorPrimary
;
case
'
editor/secondary
'
:
return
MenuLocation
.
EditorSecondary
;
case
'
editor/title
'
:
return
Menus
.
EditorTitle
;
}
}
}
...
...
@@ -48,7 +46,7 @@ export interface IMenuService {
serviceId
:
any
;
getMenuItems
(
loc
:
Menu
Location
):
MenuItem
[];
getMenuItems
(
loc
:
Menu
s
):
MenuItem
[];
getCommandActions
():
CommandAction
[];
}
...
...
src/vs/platform/actions/common/menusExtensionPoint.ts
浏览文件 @
51f0436d
...
...
@@ -61,7 +61,7 @@ namespace schema {
description
:
localize
(
'
vscode.extension.contributes.menus
'
,
"
Contributes menu items to predefined locations
"
),
type
:
'
object
'
,
properties
:
{
'
editor/
primary
'
:
{
'
editor/
title
'
:
{
type
:
'
array
'
,
items
:
menuItem
}
...
...
src/vs/platform/actions/common/menusService.ts
浏览文件 @
51f0436d
...
...
@@ -7,9 +7,9 @@
import
{
values
}
from
'
vs/base/common/collections
'
;
import
{
KbExpr
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
{
Menu
Location
,
CommandAction
,
MenuItem
,
IMenuService
}
from
'
./actions
'
;
import
{
Menu
s
,
CommandAction
,
MenuItem
,
IMenuService
}
from
'
./actions
'
;
export
type
IUserFriendlyMenuLocation
=
'
editor/
primary
'
|
'
editor/secondary
'
;
export
type
IUserFriendlyMenuLocation
=
'
editor/
title
'
;
export
interface
IUserFriendlyMenuItem
{
command
:
string
;
...
...
@@ -53,7 +53,7 @@ const _registry = new class {
}
registerMenuItems
(
location
:
IUserFriendlyMenuLocation
,
items
:
IUserFriendlyMenuItem
[]):
boolean
{
const
loc
=
Menu
Location
.
parse
(
location
);
const
loc
=
Menu
s
.
parse
(
location
);
if
(
loc
)
{
let
array
=
this
.
_menuItems
[
loc
];
if
(
!
array
)
{
...
...
@@ -65,7 +65,7 @@ const _registry = new class {
}
}
getMenuItems
(
loc
:
Menu
Location
):
MenuItem
[]
{
getMenuItems
(
loc
:
Menu
s
):
MenuItem
[]
{
const
menuItems
=
this
.
_menuItems
[
loc
];
if
(
menuItems
)
{
return
menuItems
.
map
(
item
=>
{
...
...
@@ -88,7 +88,7 @@ export class MenuService implements IMenuService {
serviceId
;
getMenuItems
(
loc
:
Menu
Location
):
MenuItem
[]
{
getMenuItems
(
loc
:
Menu
s
):
MenuItem
[]
{
return
_registry
.
getMenuItems
(
loc
);
}
...
...
src/vs/platform/actions/workbench/actionBarContributor.ts
浏览文件 @
51f0436d
...
...
@@ -12,7 +12,7 @@ import Event, {Emitter} from 'vs/base/common/event';
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybindingService
'
;
import
{
IExtensionService
}
from
'
vs/platform/extensions/common/extensions
'
;
import
{
Menu
Location
,
MenuItem
,
IMenuService
}
from
'
vs/platform/actions/common/actions
'
;
import
{
Menu
s
,
MenuItem
,
IMenuService
}
from
'
vs/platform/actions/common/actions
'
;
import
{
ResourceContextKey
}
from
'
vs/platform/actions/common/resourceContextKey
'
;
import
{
Action
,
IAction
}
from
'
vs/base/common/actions
'
;
import
{
BaseActionItem
,
ActionItem
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
...
...
@@ -29,7 +29,7 @@ export class ActionBarContributor {
constructor
(
scope
:
HTMLElement
,
location
:
Menu
Location
,
location
:
Menu
s
,
@
IMenuService
private
_menuService
:
IMenuService
,
@
IKeybindingService
private
_keybindingService
:
IKeybindingService
,
@
IExtensionService
private
_extensionService
:
IExtensionService
,
...
...
src/vs/workbench/browser/parts/editor/titleControl.ts
浏览文件 @
51f0436d
...
...
@@ -32,7 +32,7 @@ import {IKeybindingService} from 'vs/platform/keybinding/common/keybindingServic
import
{
CloseEditorsInGroupAction
,
MoveGroupLeftAction
,
MoveGroupRightAction
,
SplitEditorAction
,
CloseEditorAction
,
KeepEditorAction
,
CloseOtherEditorsInGroupAction
,
CloseRightEditorsInGroupAction
,
ShowEditorsInGroupAction
}
from
'
vs/workbench/browser/parts/editor/editorActions
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
ActionBarContributor
}
from
'
vs/platform/actions/workbench/actionBarContributor
'
;
import
{
Menu
Location
}
from
'
vs/platform/actions/common/actions
'
;
import
{
Menu
s
}
from
'
vs/platform/actions/common/actions
'
;
import
{
ResourceContextKey
}
from
'
vs/platform/actions/common/resourceContextKey
'
;
export
interface
IToolbarActions
{
...
...
@@ -177,7 +177,7 @@ export abstract class TitleControl implements ITitleAreaControl {
}
public
create
(
parent
:
HTMLElement
):
void
{
this
.
titleActionBarContributor
=
this
.
instantiationService
.
createInstance
(
ActionBarContributor
,
parent
,
Menu
Location
.
EditorPrimary
);
this
.
titleActionBarContributor
=
this
.
instantiationService
.
createInstance
(
ActionBarContributor
,
parent
,
Menu
s
.
EditorTitle
);
this
.
toDispose
.
push
(
this
.
titleActionBarContributor
.
onDidUpdate
(
e
=>
this
.
refresh
()));
this
.
toDispose
.
push
(
this
.
titleActionBarContributor
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录