Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
2b66510c
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,发现更多精彩内容 >>
提交
2b66510c
编写于
6月 04, 2020
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Cleaning up docs for custom editor
Fixes #99279
上级
a96098e2
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
32 addition
and
19 deletion
+32
-19
src/vs/vscode.d.ts
src/vs/vscode.d.ts
+32
-19
未找到文件。
src/vs/vscode.d.ts
浏览文件 @
2b66510c
...
...
@@ -6896,12 +6896,15 @@ declare module 'vscode' {
* This is called when a user first opens a resource for a `CustomTextEditorProvider`, or if they reopen an
* existing editor using this `CustomTextEditorProvider`.
*
* To resolve a custom editor, the provider must fill in its initial html content and hook up all
* the event listeners it is interested it. The provider can also hold onto the `WebviewPanel` to use later,
* for example in a command. See [`WebviewPanel`](#WebviewPanel) for additional details.
*
* @param document Document for the resource to resolve.
* @param webviewPanel Webview to resolve.
*
* @param webviewPanel The webview panel used to display the editor UI for this resource.
*
* During resolve, the provider must fill in the initial html for the content webview panel and hook up all
* the event listeners on it that it is interested in. The provider can also hold onto the `WebviewPanel` to
* use later for example in a command. See [`WebviewPanel`](#WebviewPanel) for additional details.
*
* @param token A cancellation token that indicates the result is no longer needed.
*
* @return Thenable indicating that the custom editor has been resolved.
...
...
@@ -6963,7 +6966,7 @@ declare module 'vscode' {
/**
* Display name describing the edit.
*
* This
is shown in the UI to user
s.
* This
will be shown to users in the UI for undo/redo operation
s.
*/
readonly
label
?:
string
;
}
...
...
@@ -7010,7 +7013,9 @@ declare module 'vscode' {
*
* Note that your extension is free to ignore this and use its own strategy for backup.
*
* For editors for workspace resource, this destination will be in the workspace storage. The path may not
* If the editor is for a resource from the current workspace, `destination` will point to a file inside
* `ExtensionContext.storagePath`. The parent folder of `destination` may not exist, so make sure to created it
* before writing the backup to this location.
*/
readonly
destination
:
Uri
;
}
...
...
@@ -7023,7 +7028,7 @@ declare module 'vscode' {
* The id of the backup to restore the document from or `undefined` if there is no backup.
*
* If this is provided, your extension should restore the editor from the backup instead of reading the file
* the user's workspace.
*
from
the user's workspace.
*/
readonly
backupId
?:
string
;
}
...
...
@@ -7043,10 +7048,12 @@ declare module 'vscode' {
/**
* Create a new document for a given resource.
*
* `openCustomDocument` is called when the first editor for a given resource is opened, and the resolve document
* is passed to `resolveCustomEditor`. The resolved `CustomDocument` is re-used for subsequent editor opens.
* If all editors for a given resource are closed, the `CustomDocument` is disposed of. Opening an editor at
* this point will trigger another call to `openCustomDocument`.
* `openCustomDocument` is called when the first time an editor for a given resource is opened. The opened
* document is then passed to `resolveCustomEditor` so that the editor can be shown to the user.
*
* Already opened `CustomDocument` are re-used if the user opened additional editors. When all editors for a
* given resource are closed, the `CustomDocument` is disposed of. Opening an editor at this point will
* trigger another call to `openCustomDocument`.
*
* @param uri Uri of the document to open.
* @param openContext Additional information about the opening custom document.
...
...
@@ -7061,12 +7068,14 @@ declare module 'vscode' {
*
* This is called whenever the user opens a new editor for this `CustomEditorProvider`.
*
* To resolve a custom editor, the provider must fill in its initial html content and hook up all
* the event listeners it is interested it. The provider can also hold onto the `WebviewPanel` to use later,
* for example in a command. See [`WebviewPanel`](#WebviewPanel) for additional details.
*
* @param document Document for the resource being resolved.
* @param webviewPanel Webview to resolve.
*
* @param webviewPanel The webview panel used to display the editor UI for this resource.
*
* During resolve, the provider must fill in the initial html for the content webview panel and hook up all
* the event listeners on it that it is interested in. The provider can also hold onto the `WebviewPanel` to
* use later for example in a command. See [`WebviewPanel`](#WebviewPanel) for additional details.
*
* @param token A cancellation token that indicates the result is no longer needed.
*
* @return Optional thenable indicating that the custom editor has been resolved.
...
...
@@ -8033,6 +8042,9 @@ declare module 'vscode' {
* @return Disposable that unregisters the provider.
*/
export
function
registerCustomEditorProvider
(
viewType
:
string
,
provider
:
CustomTextEditorProvider
|
CustomReadonlyEditorProvider
|
CustomEditorProvider
,
options
?:
{
/**
* Content settings for the webview panels created for this custom editor.
*/
readonly
webviewOptions
?:
WebviewPanelOptions
;
/**
...
...
@@ -8041,12 +8053,13 @@ declare module 'vscode' {
* Indicates that the provider allows multiple editor instances to be open at the same time for
* the same resource.
*
*
If not se
t, VS Code only allows one editor instance to be open at a time for each resource. If the
*
By defaul
t, VS Code only allows one editor instance to be open at a time for each resource. If the
* user tries to open a second editor instance for the resource, the first one is instead moved to where
* the second one was to be opened.
*
* When set, users can split and create copies of the custom editor. The custom editor must make sure it
* can properly synchronize the states of all editor instances for a resource so that they are consistent.
* When `supportsMultipleEditorsPerDocument` is enabled, users can split and create copies of the custom
* editor. In this case, the custom editor must make sure it can properly synchronize the states of all
* editor instances for a resource so that they are consistent.
*/
readonly
supportsMultipleEditorsPerDocument
?:
boolean
;
}):
Disposable
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录