Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
7e51cbe4
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,发现更多精彩内容 >>
提交
7e51cbe4
编写于
10月 06, 2016
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rename EditorTabContext -> EditorTitleContext
上级
855bcc50
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
42 addition
and
42 deletion
+42
-42
src/vs/platform/actions/browser/menusExtensionPoint.ts
src/vs/platform/actions/browser/menusExtensionPoint.ts
+11
-11
src/vs/platform/actions/common/actions.ts
src/vs/platform/actions/common/actions.ts
+3
-3
src/vs/workbench/browser/parts/editor/titleControl.ts
src/vs/workbench/browser/parts/editor/titleControl.ts
+28
-28
未找到文件。
src/vs/platform/actions/browser/menusExtensionPoint.ts
浏览文件 @
7e51cbe4
...
...
@@ -4,15 +4,15 @@
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
createCSSRule
}
from
'
vs/base/browser/dom
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
join
}
from
'
vs/base/common/paths
'
;
import
{
IdGenerator
}
from
'
vs/base/common/idGenerator
'
;
import
{
IJSONSchema
}
from
'
vs/base/common/jsonSchema
'
;
import
{
forEach
}
from
'
vs/base/common/collections
'
;
import
{
IExtensionPointUser
,
IExtensionMessageCollector
,
ExtensionsRegistry
}
from
'
vs/platform/extensions/common/extensionsRegistry
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
MenuId
,
MenuRegistry
}
from
'
vs/platform/actions/common/actions
'
;
import
{
createCSSRule
}
from
'
vs/base/browser/dom
'
;
import
{
localize
}
from
'
vs/nls
'
;
import
{
join
}
from
'
vs/base/common/paths
'
;
import
{
IdGenerator
}
from
'
vs/base/common/idGenerator
'
;
import
{
IJSONSchema
}
from
'
vs/base/common/jsonSchema
'
;
import
{
forEach
}
from
'
vs/base/common/collections
'
;
import
{
IExtensionPointUser
,
IExtensionMessageCollector
,
ExtensionsRegistry
}
from
'
vs/platform/extensions/common/extensionsRegistry
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
MenuId
,
MenuRegistry
}
from
'
vs/platform/actions/common/actions
'
;
namespace
schema
{
...
...
@@ -30,7 +30,7 @@ namespace schema {
case
'
editor/title
'
:
return
MenuId
.
EditorTitle
;
case
'
editor/context
'
:
return
MenuId
.
EditorContext
;
case
'
explorer/context
'
:
return
MenuId
.
ExplorerContext
;
case
'
editor/title/context
'
:
return
MenuId
.
EditorT
ab
Context
;
case
'
editor/title/context
'
:
return
MenuId
.
EditorT
itle
Context
;
}
}
...
...
@@ -211,7 +211,7 @@ ExtensionsRegistry.registerExtensionPoint<schema.IUserFriendlyCommand | schema.I
const
ids
=
new
IdGenerator
(
'
contrib-cmd-icon-
'
);
function
handleCommand
(
userFriendlyCommand
:
schema
.
IUserFriendlyCommand
,
extension
:
IExtensionPointUser
<
any
>
)
{
function
handleCommand
(
userFriendlyCommand
:
schema
.
IUserFriendlyCommand
,
extension
:
IExtensionPointUser
<
any
>
)
{
if
(
!
schema
.
isValidCommand
(
userFriendlyCommand
,
extension
.
collector
))
{
return
;
...
...
src/vs/platform/actions/common/actions.ts
浏览文件 @
7e51cbe4
...
...
@@ -38,9 +38,9 @@ export interface IMenuItem {
export
enum
MenuId
{
EditorTitle
=
1
,
EditorContext
=
2
,
E
xplore
rContext
=
3
,
E
ditorTab
Context
=
4
,
Editor
Title
Context
=
2
,
E
dito
rContext
=
3
,
E
xplorer
Context
=
4
,
ProblemsPanelContext
=
5
}
...
...
src/vs/workbench/browser/parts/editor/titleControl.ts
浏览文件 @
7e51cbe4
...
...
@@ -7,36 +7,36 @@
import
'
vs/css!./media/titlecontrol
'
;
import
nls
=
require
(
'
vs/nls
'
);
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
Scope
,
IActionBarRegistry
,
Extensions
,
prepareActions
}
from
'
vs/workbench/browser/actionBarRegistry
'
;
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
Scope
,
IActionBarRegistry
,
Extensions
,
prepareActions
}
from
'
vs/workbench/browser/actionBarRegistry
'
;
import
{
IAction
,
Action
}
from
'
vs/base/common/actions
'
;
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
DOM
=
require
(
'
vs/base/browser/dom
'
);
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
BaseEditor
,
IEditorInputActionContext
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
import
{
isCommonCodeEditor
,
isCommonDiffEditor
}
from
'
vs/editor/common/editorCommon
'
;
import
{
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
BaseEditor
,
IEditorInputActionContext
}
from
'
vs/workbench/browser/parts/editor/baseEditor
'
;
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
import
{
isCommonCodeEditor
,
isCommonDiffEditor
}
from
'
vs/editor/common/editorCommon
'
;
import
arrays
=
require
(
'
vs/base/common/arrays
'
);
import
{
IEditorStacksModel
,
IEditorGroup
,
IEditorIdentifier
,
EditorInput
,
IWorkbenchEditorConfiguration
,
IStacksModelChangeEvent
,
getResource
}
from
'
vs/workbench/common/editor
'
;
import
{
EventType
as
BaseEventType
}
from
'
vs/base/common/events
'
;
import
{
IActionItem
,
ActionsOrientation
,
Separator
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ToolBar
}
from
'
vs/base/browser/ui/toolbar/toolbar
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IMessageService
,
Severity
}
from
'
vs/platform/message/common/message
'
;
import
{
StandardMouseEvent
}
from
'
vs/base/browser/mouseEvent
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
CloseEditorsInGroupAction
,
SplitEditorAction
,
CloseEditorAction
,
KeepEditorAction
,
CloseOtherEditorsInGroupAction
,
CloseRightEditorsInGroupAction
,
ShowEditorsInGroupAction
}
from
'
vs/workbench/browser/parts/editor/editorActions
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
createActionItem
,
fillInActions
}
from
'
vs/platform/actions/browser/menuItemActionItem
'
;
import
{
IMenuService
,
MenuId
,
IMenu
}
from
'
vs/platform/actions/common/actions
'
;
import
{
ResourceContextKey
}
from
'
vs/platform/actions/common/resourceContextKey
'
;
import
{
IEditorStacksModel
,
IEditorGroup
,
IEditorIdentifier
,
EditorInput
,
IWorkbenchEditorConfiguration
,
IStacksModelChangeEvent
,
getResource
}
from
'
vs/workbench/common/editor
'
;
import
{
EventType
as
BaseEventType
}
from
'
vs/base/common/events
'
;
import
{
IActionItem
,
ActionsOrientation
,
Separator
}
from
'
vs/base/browser/ui/actionbar/actionbar
'
;
import
{
ToolBar
}
from
'
vs/base/browser/ui/toolbar/toolbar
'
;
import
{
IWorkbenchEditorService
}
from
'
vs/workbench/services/editor/common/editorService
'
;
import
{
IContextMenuService
}
from
'
vs/platform/contextview/browser/contextView
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IEditorGroupService
}
from
'
vs/workbench/services/group/common/groupService
'
;
import
{
IMessageService
,
Severity
}
from
'
vs/platform/message/common/message
'
;
import
{
StandardMouseEvent
}
from
'
vs/base/browser/mouseEvent
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
IInstantiationService
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IQuickOpenService
}
from
'
vs/workbench/services/quickopen/common/quickOpenService
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
CloseEditorsInGroupAction
,
SplitEditorAction
,
CloseEditorAction
,
KeepEditorAction
,
CloseOtherEditorsInGroupAction
,
CloseRightEditorsInGroupAction
,
ShowEditorsInGroupAction
}
from
'
vs/workbench/browser/parts/editor/editorActions
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
createActionItem
,
fillInActions
}
from
'
vs/platform/actions/browser/menuItemActionItem
'
;
import
{
IMenuService
,
MenuId
,
IMenu
}
from
'
vs/platform/actions/common/actions
'
;
import
{
ResourceContextKey
}
from
'
vs/platform/actions/common/resourceContextKey
'
;
export
interface
IToolbarActions
{
primary
:
IAction
[];
...
...
@@ -116,7 +116,7 @@ export abstract class TitleControl implements ITitleAreaControl {
this
.
resourceContext
=
instantiationService
.
createInstance
(
ResourceContextKey
);
this
.
contextMenu
=
this
.
menuService
.
createMenu
(
MenuId
.
EditorT
ab
Context
,
this
.
contextKeyService
);
this
.
contextMenu
=
this
.
menuService
.
createMenu
(
MenuId
.
EditorT
itle
Context
,
this
.
contextKeyService
);
this
.
toDispose
.
push
(
this
.
contextMenu
);
this
.
initActions
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录