Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b9e8b1ea
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,发现更多精彩内容 >>
提交
b9e8b1ea
编写于
12月 20, 2017
作者:
I
isidor
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
open folder setting as command
上级
c72b67dd
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
16 addition
and
29 deletion
+16
-29
src/vs/workbench/browser/actions/workspaceActions.ts
src/vs/workbench/browser/actions/workspaceActions.ts
+0
-22
src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts
.../parts/files/electron-browser/fileActions.contribution.ts
+13
-5
src/vs/workbench/parts/preferences/browser/preferencesActions.ts
...workbench/parts/preferences/browser/preferencesActions.ts
+3
-2
未找到文件。
src/vs/workbench/browser/actions/workspaceActions.ts
浏览文件 @
b9e8b1ea
...
...
@@ -266,28 +266,6 @@ export class RemoveRootFolderAction extends Action {
}
}
export
class
OpenFolderSettingsAction
extends
Action
{
static
ID
=
'
workbench.action.openFolderSettings
'
;
static
LABEL
=
nls
.
localize
(
'
openFolderSettings
'
,
"
Open Folder Settings
"
);
constructor
(
private
rootUri
:
URI
,
id
:
string
,
label
:
string
,
@
IWorkspaceContextService
private
contextService
:
IWorkspaceContextService
,
@
ICommandService
private
commandService
:
ICommandService
)
{
super
(
id
,
label
);
}
public
run
():
TPromise
<
any
>
{
const
workspaceFolder
=
this
.
contextService
.
getWorkspaceFolder
(
this
.
rootUri
);
return
this
.
commandService
.
executeCommand
(
'
_workbench.action.openFolderSettings
'
,
workspaceFolder
);
}
}
export
class
SaveWorkspaceAsAction
extends
BaseWorkspacesAction
{
static
ID
=
'
workbench.action.saveWorkspaceAs
'
;
...
...
src/vs/workbench/parts/files/electron-browser/fileActions.contribution.ts
浏览文件 @
b9e8b1ea
...
...
@@ -17,13 +17,14 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
FileStat
,
Model
}
from
'
vs/workbench/parts/files/common/explorerModel
'
;
import
{
KeyMod
,
KeyChord
,
KeyCode
}
from
'
vs/base/common/keyCodes
'
;
import
{
RemoveRootFolderAction
,
OpenFolderSettingsAction
}
from
'
vs/workbench/browser/actions/workspaceActions
'
;
import
{
RemoveRootFolderAction
}
from
'
vs/workbench/browser/actions/workspaceActions
'
;
import
{
copyFocusedFilesExplorerViewItem
,
openWindowCommand
,
deleteFocusedFilesExplorerViewItemCommand
,
moveFocusedFilesExplorerViewItemToTrashCommand
,
renameFocusedFilesExplorerViewItemCommand
,
REVEAL_IN_OS_COMMAND_ID
,
COPY_PATH_COMMAND_ID
,
REVEAL_IN_EXPLORER_COMMAND_ID
}
from
'
vs/workbench/parts/files/electron-browser/fileCommands
'
;
import
{
CommandsRegistry
,
ICommandHandler
}
from
'
vs/platform/commands/common/commands
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
KeybindingsRegistry
}
from
'
vs/platform/keybinding/common/keybindingsRegistry
'
;
import
{
FilesExplorerFocusCondition
,
ExplorerRootContext
}
from
'
vs/workbench/parts/files/common/files
'
;
import
{
FilesExplorerFocusCondition
,
ExplorerRootContext
,
ExplorerFolderContext
}
from
'
vs/workbench/parts/files/common/files
'
;
import
{
ADD_ROOT_FOLDER_COMMAND_ID
,
ADD_ROOT_FOLDER_LABEL
}
from
'
vs/workbench/browser/actions/workspaceCommands
'
;
import
{
OPEN_FOLDER_SETTINGS_COMMAND
,
OPEN_FOLDER_SETTINGS_LABEL
}
from
'
vs/workbench/parts/preferences/browser/preferencesActions
'
;
class
FilesViewerActionContributor
extends
ActionBarContributor
{
...
...
@@ -64,9 +65,6 @@ class FilesViewerActionContributor extends ActionBarContributor {
// Workspace Root Folder Actions
if
(
stat
.
isRoot
)
{
const
openFolderSettingsActions
=
this
.
instantiationService
.
createInstance
(
OpenFolderSettingsAction
,
stat
.
resource
,
OpenFolderSettingsAction
.
ID
,
OpenFolderSettingsAction
.
LABEL
);
openFolderSettingsActions
.
order
=
53
;
actions
.
push
(
openFolderSettingsActions
);
const
removeRootFolderAction
=
this
.
instantiationService
.
createInstance
(
RemoveRootFolderAction
,
stat
.
resource
,
RemoveRootFolderAction
.
ID
,
RemoveRootFolderAction
.
LABEL
);
removeRootFolderAction
.
order
=
54
;
actions
.
push
(
removeRootFolderAction
);
...
...
@@ -247,3 +245,13 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerContext, {
},
when
:
ExplorerRootContext
});
MenuRegistry
.
appendMenuItem
(
MenuId
.
ExplorerContext
,
{
group
:
'
2_workspace
'
,
order
:
20
,
command
:
{
id
:
OPEN_FOLDER_SETTINGS_COMMAND
,
title
:
OPEN_FOLDER_SETTINGS_LABEL
},
when
:
ContextKeyExpr
.
and
(
ExplorerRootContext
,
ExplorerFolderContext
)
});
src/vs/workbench/parts/preferences/browser/preferencesActions.ts
浏览文件 @
b9e8b1ea
...
...
@@ -121,10 +121,11 @@ export class OpenWorkspaceSettingsAction extends Action {
}
export
const
OPEN_FOLDER_SETTINGS_COMMAND
=
'
_workbench.action.openFolderSettings
'
;
export
const
OPEN_FOLDER_SETTINGS_LABEL
=
nls
.
localize
(
'
openFolderSettings
'
,
"
Open Folder Settings
"
);
export
class
OpenFolderSettingsAction
extends
Action
{
public
static
readonly
ID
=
'
workbench.action.openFolderSettings
'
;
public
static
readonly
LABEL
=
nls
.
localize
(
'
openFolderSettings
'
,
"
Open Folder Settings
"
)
;
public
static
readonly
LABEL
=
OPEN_FOLDER_SETTINGS_LABEL
;
private
disposables
:
IDisposable
[]
=
[];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录