Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
718ec323
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,体验更适合开发者的 AI 搜索 >>
提交
718ec323
编写于
9月 07, 2020
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
keyboard - rename and cleanup some editor related contextkeys
上级
d69c272c
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
36 addition
and
34 deletion
+36
-34
src/vs/workbench/browser/contextkeys.ts
src/vs/workbench/browser/contextkeys.ts
+5
-7
src/vs/workbench/browser/parts/editor/editor.contribution.ts
src/vs/workbench/browser/parts/editor/editor.contribution.ts
+2
-2
src/vs/workbench/browser/parts/editor/editorGroupView.ts
src/vs/workbench/browser/parts/editor/editorGroupView.ts
+6
-6
src/vs/workbench/common/editor.ts
src/vs/workbench/common/editor.ts
+13
-8
src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
...rkbench/contrib/files/browser/fileActions.contribution.ts
+2
-2
src/vs/workbench/contrib/remote/browser/remoteIndicator.ts
src/vs/workbench/contrib/remote/browser/remoteIndicator.ts
+2
-3
src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts
...ch/contrib/remote/electron-browser/remote.contribution.ts
+1
-2
src/vs/workbench/electron-sandbox/desktop.contribution.ts
src/vs/workbench/electron-sandbox/desktop.contribution.ts
+2
-2
src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
...vs/workbench/services/dialogs/browser/simpleFileDialog.ts
+3
-2
未找到文件。
src/vs/workbench/browser/contextkeys.ts
浏览文件 @
718ec323
...
...
@@ -7,7 +7,7 @@ import { Event } from 'vs/base/common/event';
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
IContextKeyService
,
IContextKey
,
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
InputFocusedContext
,
IsMacContext
,
IsLinuxContext
,
IsWindowsContext
,
IsWebContext
,
IsMacNativeContext
,
IsDevelopmentContext
}
from
'
vs/platform/contextkey/common/contextkeys
'
;
import
{
ActiveEditorContext
,
EditorsVisibleContext
,
TextCompareEditorVisibleContext
,
TextCompareEditorActiveContext
,
ActiveEditorGroupEmptyContext
,
MultipleEditorGroupsContext
,
TEXT_DIFF_EDITOR_ID
,
SplitEditorsVertically
,
InEditorZenModeContext
,
IsCenteredLayoutContext
,
ActiveEditorGroupIndexContext
,
ActiveEditorGroupLastContext
,
ActiveEditorIsReadonlyContext
,
EditorAreaVisibleContext
,
DirtyWorkingCopies
Context
,
ActiveEditorAvailableEditorIdsContext
}
from
'
vs/workbench/common/editor
'
;
import
{
ActiveEditorContext
,
EditorsVisibleContext
,
TextCompareEditorVisibleContext
,
TextCompareEditorActiveContext
,
ActiveEditorGroupEmptyContext
,
MultipleEditorGroupsContext
,
TEXT_DIFF_EDITOR_ID
,
SplitEditorsVertically
,
InEditorZenModeContext
,
IsCenteredLayoutContext
,
ActiveEditorGroupIndexContext
,
ActiveEditorGroupLastContext
,
EditorReadonlyContext
,
EditorAreaVisible
Context
,
ActiveEditorAvailableEditorIdsContext
}
from
'
vs/workbench/common/editor
'
;
import
{
trackFocus
,
addDisposableListener
,
EventType
}
from
'
vs/base/browser/dom
'
;
import
{
preferredSideBySideGroupDirection
,
GroupDirection
,
IEditorGroupsService
}
from
'
vs/workbench/services/editor/common/editorGroupsService
'
;
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
...
...
@@ -21,14 +21,12 @@ import { PanelPositionContext } from 'vs/workbench/common/panel';
import
{
getRemoteName
}
from
'
vs/platform/remote/common/remoteHosts
'
;
import
{
IWorkingCopyService
}
from
'
vs/workbench/services/workingCopy/common/workingCopyService
'
;
export
const
RemoteNameContext
=
new
RawContextKey
<
string
>
(
'
remoteName
'
,
''
);
export
const
RemoteConnectionState
=
new
RawContextKey
<
''
|
'
initializing
'
|
'
disconnected
'
|
'
connected
'
>
(
'
remoteConnectionState
'
,
''
);
export
const
WorkbenchStateContext
=
new
RawContextKey
<
string
>
(
'
workbenchState
'
,
undefined
);
export
const
WorkspaceFolderCountContext
=
new
RawContextKey
<
number
>
(
'
workspaceFolderCount
'
,
0
);
export
const
RemoteFileDialogContext
=
new
RawContextKey
<
boolean
>
(
'
remoteFileDialogVisible
'
,
false
);
export
const
DirtyWorkingCopiesContext
=
new
RawContextKey
<
boolean
>
(
'
dirtyWorkingCopies
'
,
false
);
export
const
RemoteNameContext
=
new
RawContextKey
<
string
>
(
'
remoteName
'
,
''
);
export
const
IsFullscreenContext
=
new
RawContextKey
<
boolean
>
(
'
isFullscreen
'
,
false
);
...
...
@@ -89,7 +87,7 @@ export class WorkbenchContextKeysHandler extends Disposable {
// Editors
this
.
activeEditorContext
=
ActiveEditorContext
.
bindTo
(
this
.
contextKeyService
);
this
.
activeEditorIsReadonly
=
ActiveEditorIs
ReadonlyContext
.
bindTo
(
this
.
contextKeyService
);
this
.
activeEditorIsReadonly
=
Editor
ReadonlyContext
.
bindTo
(
this
.
contextKeyService
);
this
.
activeEditorAvailableEditorIds
=
ActiveEditorAvailableEditorIdsContext
.
bindTo
(
this
.
contextKeyService
);
this
.
editorsVisibleContext
=
EditorsVisibleContext
.
bindTo
(
this
.
contextKeyService
);
this
.
textCompareEditorVisibleContext
=
TextCompareEditorVisibleContext
.
bindTo
(
this
.
contextKeyService
);
...
...
src/vs/workbench/browser/parts/editor/editor.contribution.ts
浏览文件 @
718ec323
...
...
@@ -525,7 +525,7 @@ appendEditorToolItem(
title
:
nls
.
localize
(
'
close
'
,
"
Close
"
),
icon
:
{
id
:
'
codicon/close
'
}
},
ContextKeyExpr
.
and
(
ContextKeyExpr
.
not
(
'
config.workbench.editor.showTabs
'
),
ContextKeyExpr
.
not
(
'
groupActiveEditor
Dirty
'
)),
ContextKeyExpr
.
and
(
ContextKeyExpr
.
not
(
'
config.workbench.editor.showTabs
'
),
ContextKeyExpr
.
not
(
'
activeEditorIs
Dirty
'
)),
1000000
,
// towards the far end
{
id
:
editorCommands
.
CLOSE_EDITORS_IN_GROUP_COMMAND_ID
,
...
...
@@ -540,7 +540,7 @@ appendEditorToolItem(
title
:
nls
.
localize
(
'
close
'
,
"
Close
"
),
icon
:
{
id
:
'
codicon/close-dirty
'
}
},
ContextKeyExpr
.
and
(
ContextKeyExpr
.
not
(
'
config.workbench.editor.showTabs
'
),
ContextKeyExpr
.
has
(
'
groupActiveEditor
Dirty
'
)),
ContextKeyExpr
.
and
(
ContextKeyExpr
.
not
(
'
config.workbench.editor.showTabs
'
),
ContextKeyExpr
.
has
(
'
activeEditorIs
Dirty
'
)),
1000000
,
// towards the far end
{
id
:
editorCommands
.
CLOSE_EDITORS_IN_GROUP_COMMAND_ID
,
...
...
src/vs/workbench/browser/parts/editor/editorGroupView.ts
浏览文件 @
718ec323
...
...
@@ -5,7 +5,7 @@
import
'
vs/css!./media/editorgroupview
'
;
import
{
EditorGroup
,
IEditorOpenOptions
,
EditorCloseEvent
,
ISerializedEditorGroup
,
isSerializedEditorGroup
}
from
'
vs/workbench/common/editor/editorGroup
'
;
import
{
EditorInput
,
EditorOptions
,
GroupIdentifier
,
SideBySideEditorInput
,
CloseDirection
,
IEditorCloseEvent
,
Editor
GroupActiveEditor
DirtyContext
,
IEditorPane
,
EditorGroupEditorsCountContext
,
SaveReason
,
IEditorPartOptionsChangeEvent
,
EditorsOrder
,
IVisibleEditorPane
,
EditorStickyContext
,
EditorPinnedContext
}
from
'
vs/workbench/common/editor
'
;
import
{
EditorInput
,
EditorOptions
,
GroupIdentifier
,
SideBySideEditorInput
,
CloseDirection
,
IEditorCloseEvent
,
EditorDirtyContext
,
IEditorPane
,
EditorGroupEditorsCountContext
,
SaveReason
,
IEditorPartOptionsChangeEvent
,
EditorsOrder
,
IVisibleEditorPane
,
EditorStickyContext
,
EditorPinnedContext
}
from
'
vs/workbench/common/editor
'
;
import
{
Event
,
Emitter
,
Relay
}
from
'
vs/base/common/event
'
;
import
{
IInstantiationService
,
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
addClass
,
addClasses
,
Dimension
,
trackFocus
,
toggleClass
,
removeClass
,
addDisposableListener
,
EventType
,
EventHelper
,
findParentWithClass
,
clearNode
,
isAncestor
}
from
'
vs/base/browser/dom
'
;
...
...
@@ -217,10 +217,10 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
}
private
handleGroupContextKeys
(
contextKeyService
:
IContextKeyService
):
void
{
const
groupActiveEditorDirtyContextKey
=
EditorGroupActiveEditorDirtyContext
.
bindTo
(
contextKeyService
);
const
groupEditorsCountContext
=
EditorGroupEditorsCountContext
.
bindTo
(
contextKeyService
);
const
groupActiveEditorDirtyContext
=
EditorDirtyContext
.
bindTo
(
contextKeyService
);
const
groupActiveEditorPinnedContext
=
EditorPinnedContext
.
bindTo
(
contextKeyService
);
const
groupActiveEditorStickyContext
=
EditorStickyContext
.
bindTo
(
contextKeyService
);
const
groupEditorsCountContext
=
EditorGroupEditorsCountContext
.
bindTo
(
contextKeyService
);
const
activeEditorListener
=
new
MutableDisposable
();
...
...
@@ -229,10 +229,10 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
const
activeEditor
=
this
.
_group
.
activeEditor
;
if
(
activeEditor
)
{
groupActiveEditorDirtyContext
Key
.
set
(
activeEditor
.
isDirty
()
&&
!
activeEditor
.
isSaving
());
activeEditorListener
.
value
=
activeEditor
.
onDidChangeDirty
(()
=>
groupActiveEditorDirtyContext
Key
.
set
(
activeEditor
.
isDirty
()
&&
!
activeEditor
.
isSaving
()));
groupActiveEditorDirtyContext
.
set
(
activeEditor
.
isDirty
()
&&
!
activeEditor
.
isSaving
());
activeEditorListener
.
value
=
activeEditor
.
onDidChangeDirty
(()
=>
groupActiveEditorDirtyContext
.
set
(
activeEditor
.
isDirty
()
&&
!
activeEditor
.
isSaving
()));
}
else
{
groupActiveEditorDirtyContext
Key
.
set
(
false
);
groupActiveEditorDirtyContext
.
set
(
false
);
}
};
...
...
src/vs/workbench/common/editor.ts
浏览文件 @
718ec323
...
...
@@ -24,23 +24,28 @@ import { IResourceEditorInputType } from 'vs/workbench/services/editor/common/ed
import
{
IRange
}
from
'
vs/editor/common/core/range
'
;
import
{
IExtUri
}
from
'
vs/base/common/resources
'
;
export
const
DirtyWorkingCopiesContext
=
new
RawContextKey
<
boolean
>
(
'
dirtyWorkingCopies
'
,
false
);
// Editor State Context Keys
export
const
EditorDirtyContext
=
new
RawContextKey
<
boolean
>
(
'
activeEditorIsDirty
'
,
false
);
export
const
EditorPinnedContext
=
new
RawContextKey
<
boolean
>
(
'
activeEditorIsNotPreview
'
,
false
);
export
const
EditorStickyContext
=
new
RawContextKey
<
boolean
>
(
'
activeEditorIsPinned
'
,
false
);
export
const
EditorReadonlyContext
=
new
RawContextKey
<
boolean
>
(
'
activeEditorIsReadonly
'
,
false
);
// Editor Kind Context Keys
export
const
ActiveEditorContext
=
new
RawContextKey
<
string
|
null
>
(
'
activeEditor
'
,
null
);
export
const
ActiveEditorIsReadonlyContext
=
new
RawContextKey
<
boolean
>
(
'
activeEditorIsReadonly
'
,
false
);
export
const
ActiveEditorAvailableEditorIdsContext
=
new
RawContextKey
<
string
>
(
'
activeEditorAvailableEditorIds
'
,
''
);
export
const
EditorsVisibleContext
=
new
RawContextKey
<
boolean
>
(
'
editorIsOpen
'
,
false
);
export
const
EditorPinnedContext
=
new
RawContextKey
<
boolean
>
(
'
editorPinned
'
,
false
);
export
const
EditorStickyContext
=
new
RawContextKey
<
boolean
>
(
'
editorSticky
'
,
false
);
export
const
EditorGroupActiveEditorDirtyContext
=
new
RawContextKey
<
boolean
>
(
'
groupActiveEditorDirty
'
,
false
);
export
const
EditorGroupEditorsCountContext
=
new
RawContextKey
<
number
>
(
'
groupEditorsCount
'
,
0
);
export
const
NoEditorsVisibleContext
=
EditorsVisibleContext
.
toNegated
();
export
const
TextCompareEditorVisibleContext
=
new
RawContextKey
<
boolean
>
(
'
textCompareEditorVisible
'
,
false
);
export
const
TextCompareEditorActiveContext
=
new
RawContextKey
<
boolean
>
(
'
textCompareEditorActive
'
,
false
);
// Editor Group Context Keys
export
const
EditorGroupEditorsCountContext
=
new
RawContextKey
<
number
>
(
'
groupEditorsCount
'
,
0
);
export
const
ActiveEditorGroupEmptyContext
=
new
RawContextKey
<
boolean
>
(
'
activeEditorGroupEmpty
'
,
false
);
export
const
ActiveEditorGroupIndexContext
=
new
RawContextKey
<
number
>
(
'
activeEditorGroupIndex
'
,
0
);
export
const
ActiveEditorGroupLastContext
=
new
RawContextKey
<
boolean
>
(
'
activeEditorGroupLast
'
,
false
);
export
const
MultipleEditorGroupsContext
=
new
RawContextKey
<
boolean
>
(
'
multipleEditorGroups
'
,
false
);
export
const
SingleEditorGroupsContext
=
MultipleEditorGroupsContext
.
toNegated
();
// Editor Layout Context Keys
export
const
EditorsVisibleContext
=
new
RawContextKey
<
boolean
>
(
'
editorIsOpen
'
,
false
);
export
const
InEditorZenModeContext
=
new
RawContextKey
<
boolean
>
(
'
inZenMode
'
,
false
);
export
const
IsCenteredLayoutContext
=
new
RawContextKey
<
boolean
>
(
'
isCenteredLayout
'
,
false
);
export
const
SplitEditorsVertically
=
new
RawContextKey
<
boolean
>
(
'
splitEditorsVertically
'
,
false
);
...
...
src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
浏览文件 @
718ec323
...
...
@@ -22,11 +22,11 @@ import { AutoSaveAfterShortDelayContext } from 'vs/workbench/services/filesConfi
import
{
ResourceContextKey
}
from
'
vs/workbench/common/resources
'
;
import
{
WorkbenchListDoubleSelection
}
from
'
vs/platform/list/browser/listService
'
;
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
WorkspaceFolderCountContext
}
from
'
vs/workbench/browser/contextkeys
'
;
import
{
DirtyWorkingCopiesContext
,
WorkspaceFolderCountContext
}
from
'
vs/workbench/browser/contextkeys
'
;
import
{
IsWebContext
}
from
'
vs/platform/contextkey/common/contextkeys
'
;
import
{
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
OpenFileFolderAction
,
OpenFileAction
,
OpenFolderAction
,
OpenWorkspaceAction
}
from
'
vs/workbench/browser/actions/workspaceActions
'
;
import
{
DirtyWorkingCopiesContext
,
ActiveEditorContext
}
from
'
vs/workbench/common/editor
'
;
import
{
ActiveEditorContext
}
from
'
vs/workbench/common/editor
'
;
import
{
SidebarFocusContext
}
from
'
vs/workbench/common/viewlet
'
;
import
{
ThemeIcon
}
from
'
vs/platform/theme/common/themeService
'
;
...
...
src/vs/workbench/contrib/remote/browser/remoteIndicator.ts
浏览文件 @
718ec323
...
...
@@ -12,7 +12,7 @@ import { MenuId, IMenuService, MenuItemAction, IMenu, MenuRegistry, registerActi
import
{
IWorkbenchContribution
}
from
'
vs/workbench/common/contributions
'
;
import
{
StatusbarAlignment
,
IStatusbarService
,
IStatusbarEntryAccessor
,
IStatusbarEntry
}
from
'
vs/workbench/services/statusbar/common/statusbar
'
;
import
{
ILabelService
}
from
'
vs/platform/label/common/label
'
;
import
{
IContextKeyService
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IContextKeyService
,
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
ICommandService
}
from
'
vs/platform/commands/common/commands
'
;
import
{
REMOTE_HOST_SCHEME
}
from
'
vs/platform/remote/common/remoteHosts
'
;
import
{
IExtensionService
}
from
'
vs/workbench/services/extensions/common/extensions
'
;
...
...
@@ -21,7 +21,6 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/
import
{
PersistentConnectionEventType
}
from
'
vs/platform/remote/common/remoteAgentConnection
'
;
import
{
IRemoteAuthorityResolverService
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
import
{
IHostService
}
from
'
vs/workbench/services/host/browser/host
'
;
import
{
RemoteConnectionState
}
from
'
vs/workbench/browser/contextkeys
'
;
import
{
isWeb
}
from
'
vs/base/common/platform
'
;
import
{
once
}
from
'
vs/base/common/functional
'
;
...
...
@@ -38,7 +37,7 @@ export class RemoteStatusIndicator extends Disposable implements IWorkbenchContr
private
remoteAuthority
=
this
.
environmentService
.
configuration
.
remoteAuthority
;
private
connectionState
:
'
initializing
'
|
'
connected
'
|
'
disconnected
'
|
undefined
=
undefined
;
private
connectionStateContextKey
=
RemoteConnectionState
.
bindTo
(
this
.
contextKeyService
);
private
connectionStateContextKey
=
new
RawContextKey
<
''
|
'
initializing
'
|
'
disconnected
'
|
'
connected
'
>
(
'
remoteConnectionState
'
,
''
)
.
bindTo
(
this
.
contextKeyService
);
constructor
(
@
IStatusbarService
private
readonly
statusbarService
:
IStatusbarService
,
...
...
src/vs/workbench/contrib/remote/electron-browser/remote.contribution.ts
浏览文件 @
718ec323
...
...
@@ -27,9 +27,8 @@ import { PersistentConnectionEventType } from 'vs/platform/remote/common/remoteA
import
{
IConfigurationService
}
from
'
vs/platform/configuration/common/configuration
'
;
import
{
IConfigurationRegistry
,
Extensions
as
ConfigurationExtensions
}
from
'
vs/platform/configuration/common/configurationRegistry
'
;
import
{
IRemoteAuthorityResolverService
}
from
'
vs/platform/remote/common/remoteAuthorityResolver
'
;
import
{
RemoteFileDialogContext
}
from
'
vs/workbench/browser/contextkeys
'
;
import
{
IDownloadService
}
from
'
vs/platform/download/common/download
'
;
import
{
OpenLocalFileFolderCommand
,
OpenLocalFileCommand
,
OpenLocalFolderCommand
,
SaveLocalFileCommand
}
from
'
vs/workbench/services/dialogs/browser/simpleFileDialog
'
;
import
{
OpenLocalFileFolderCommand
,
OpenLocalFileCommand
,
OpenLocalFolderCommand
,
SaveLocalFileCommand
,
RemoteFileDialogContext
}
from
'
vs/workbench/services/dialogs/browser/simpleFileDialog
'
;
class
RemoteChannelsContribution
implements
IWorkbenchContribution
{
...
...
src/vs/workbench/electron-sandbox/desktop.contribution.ts
浏览文件 @
718ec323
...
...
@@ -17,7 +17,7 @@ import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/co
import
{
CommandsRegistry
}
from
'
vs/platform/commands/common/commands
'
;
import
{
ServicesAccessor
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IsDevelopmentContext
,
IsMacContext
}
from
'
vs/platform/contextkey/common/contextkeys
'
;
import
{
No
EditorsVisibleContext
,
SingleEditorGroupsContext
}
from
'
vs/workbench/common/editor
'
;
import
{
EditorsVisibleContext
,
SingleEditorGroupsContext
}
from
'
vs/workbench/common/editor
'
;
import
{
IElectronService
}
from
'
vs/platform/electron/electron-sandbox/electron
'
;
import
{
IJSONContributionRegistry
,
Extensions
as
JSONExtensions
}
from
'
vs/platform/jsonschemas/common/jsonContributionRegistry
'
;
import
product
from
'
vs/platform/product/common/product
'
;
...
...
@@ -45,7 +45,7 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
KeybindingsRegistry
.
registerCommandAndKeybindingRule
({
id
:
CloseCurrentWindowAction
.
ID
,
// close the window when the last editor is closed by reusing the same keybinding
weight
:
KeybindingWeight
.
WorkbenchContrib
,
when
:
ContextKeyExpr
.
and
(
NoEditorsVisibleContext
,
SingleEditorGroupsContext
),
when
:
ContextKeyExpr
.
and
(
EditorsVisibleContext
.
toNegated
()
,
SingleEditorGroupsContext
),
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_W
,
handler
:
accessor
=>
{
const
electronService
=
accessor
.
get
(
IElectronService
);
...
...
src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
浏览文件 @
718ec323
...
...
@@ -21,12 +21,11 @@ import { getIconClasses } from 'vs/editor/common/services/getIconClasses';
import
{
Schemas
}
from
'
vs/base/common/network
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IRemoteAgentService
}
from
'
vs/workbench/services/remote/common/remoteAgentService
'
;
import
{
IContextKeyService
,
IContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
IContextKeyService
,
IContextKey
,
RawContextKey
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
equalsIgnoreCase
,
format
,
startsWithIgnoreCase
}
from
'
vs/base/common/strings
'
;
import
{
IKeybindingService
}
from
'
vs/platform/keybinding/common/keybinding
'
;
import
{
IRemoteAgentEnvironment
}
from
'
vs/platform/remote/common/remoteAgentEnvironment
'
;
import
{
isValidBasename
}
from
'
vs/base/common/extpath
'
;
import
{
RemoteFileDialogContext
}
from
'
vs/workbench/browser/contextkeys
'
;
import
{
Emitter
}
from
'
vs/base/common/event
'
;
import
{
IDisposable
,
dispose
}
from
'
vs/base/common/lifecycle
'
;
import
{
createCancelablePromise
,
CancelablePromise
}
from
'
vs/base/common/async
'
;
...
...
@@ -98,6 +97,8 @@ enum UpdateResult {
InvalidPath
}
export
const
RemoteFileDialogContext
=
new
RawContextKey
<
boolean
>
(
'
remoteFileDialogVisible
'
,
false
);
export
class
SimpleFileDialog
{
private
options
!
:
IOpenDialogOptions
;
private
currentFolder
!
:
URI
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录