Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
ce1222ba
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,发现更多精彩内容 >>
提交
ce1222ba
编写于
3月 24, 2017
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💡
scm api docs
上级
2506bfa2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
134 addition
and
3 deletion
+134
-3
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+134
-3
未找到文件。
src/vs/vscode.proposed.d.ts
浏览文件 @
ce1222ba
...
@@ -584,54 +584,185 @@ declare module 'vscode' {
...
@@ -584,54 +584,185 @@ declare module 'vscode' {
getClickCommand
?(
node
:
T
):
string
;
getClickCommand
?(
node
:
T
):
string
;
}
}
/**
* The theme-aware decorations for a [SCM resource](#SCMResource).
*/
export
interface
SCMResourceThemableDecorations
{
export
interface
SCMResourceThemableDecorations
{
/**
* The icon path for a specific [SCM resource](#SCMResource).
*/
readonly
iconPath
?:
string
|
Uri
;
readonly
iconPath
?:
string
|
Uri
;
}
}
/**
* The decorations for a [SCM resource](#SCMResource). Can be specified
* for light and dark themes, independently.
*/
export
interface
SCMResourceDecorations
extends
SCMResourceThemableDecorations
{
export
interface
SCMResourceDecorations
extends
SCMResourceThemableDecorations
{
/**
* Whether the [SCM resource](#SCMResource) should be striked-through
* in the UI.
*/
readonly
strikeThrough
?:
boolean
;
readonly
strikeThrough
?:
boolean
;
/**
* The light theme decorations.
*/
readonly
light
?:
SCMResourceThemableDecorations
;
readonly
light
?:
SCMResourceThemableDecorations
;
/**
* The dark theme decorations.
*/
readonly
dark
?:
SCMResourceThemableDecorations
;
readonly
dark
?:
SCMResourceThemableDecorations
;
}
}
/**
* An SCM resource is the source control state of an underlying resource.
*/
export
interface
SCMResource
{
export
interface
SCMResource
{
/**
* The [uri](#Uri) of the underlying resource.
*/
readonly
uri
:
Uri
;
readonly
uri
:
Uri
;
/**
* The [decorations](#SCMResourceDecorations) for this SCM resource.
*/
readonly
decorations
?:
SCMResourceDecorations
;
readonly
decorations
?:
SCMResourceDecorations
;
}
}
/**
* An SCM resource group is a collection of [SCM resources](#SCMResource).
*/
export
interface
SCMResourceGroup
{
export
interface
SCMResourceGroup
{
/**
* The identifier of this SCM resource group.
*/
readonly
id
:
string
;
readonly
id
:
string
;
/**
* The UI label of this SCM resource group.
*/
readonly
label
:
string
;
readonly
label
:
string
;
/**
* The collection of [SCM resources](#SCMResource) within this SCM resource group.
*/
readonly
resources
:
SCMResource
[];
readonly
resources
:
SCMResource
[];
}
}
/**
* An SCM provider is able to provide [SCM resources](#SCMResource) to Code,
* notify of changes in them and interact with Code in several SCM related ways.
*/
export
interface
SCMProvider
{
export
interface
SCMProvider
{
/**
* A human-readable label for the name of this SCM Provider.
*/
readonly
label
:
string
;
readonly
label
:
string
;
/**
* The list of SCM resource groups.
*/
readonly
resources
:
SCMResourceGroup
[];
readonly
resources
:
SCMResourceGroup
[];
readonly
onDidChange
:
Event
<
SCMResourceGroup
[]
>
;
readonly
count
?:
number
|
undefined
;
/**
* A count of resources, used in the UI as the label for the SCM changes count.
*/
readonly
count
?:
number
;
/**
* A state identifier, which will be used to populate the value of the
* `scmProviderState` context key.
*/
readonly
state
?:
string
;
readonly
state
?:
string
;
/**
* An [event](#Event) which should fire when any of the following attributes
* have changed:
* - [resources](#SCMProvider.resources)
* - [count](#SCMProvider.count)
* - [state](#SCMProvider.state)
*/
readonly
onDidChange
:
Event
<
SCMResourceGroup
[]
>
;
/**
* Provide a [uri](#Uri) to the original resource of any given resource uri.
*
* @param uri The uri of the resource open in a text editor.
* @param token A cancellation token.
* @return A thenable that resolves to uri of the matching original resource.
*/
getOriginalResource
?(
uri
:
Uri
,
token
:
CancellationToken
):
ProviderResult
<
Uri
>
;
getOriginalResource
?(
uri
:
Uri
,
token
:
CancellationToken
):
ProviderResult
<
Uri
>
;
/**
* Open a specific [SCM resource](#SCMResource). Called when SCM resources
* are clicked in the UI, for example.
*
* @param resource The [SCM resource](#SCMResource) which should be open.
* @param token A cancellation token.
* @return A thenable which resolves when the resource is open.
*/
open
?(
resource
:
SCMResource
,
token
:
CancellationToken
):
ProviderResult
<
void
>
;
open
?(
resource
:
SCMResource
,
token
:
CancellationToken
):
ProviderResult
<
void
>
;
drag
?(
resource
:
SCMResource
,
resourceGroup
:
SCMResourceGroup
,
token
:
CancellationToken
):
ProviderResult
<
void
>
;
// TODO@joao: move to SCMInput?
acceptChanges
?(
token
:
CancellationToken
):
ProviderResult
<
void
>
;
acceptChanges
?(
token
:
CancellationToken
):
ProviderResult
<
void
>
;
}
}
/**
* Represents the input box in the SCM view.
*/
export
interface
SCMInputBox
{
export
interface
SCMInputBox
{
/**
* Setter and getter for the contents of the input box.
*/
value
:
string
;
value
:
string
;
/**
* An [event](#Event) which fires when the input box value has changed.
*/
readonly
onDidChange
:
Event
<
string
>
;
readonly
onDidChange
:
Event
<
string
>
;
}
}
export
namespace
scm
{
export
namespace
scm
{
/**
* An [event](#Event) which fires when the active [SCM provider](#SCMProvider)
* has changed.
*/
export
const
onDidChangeActiveProvider
:
Event
<
SCMProvider
>
;
export
const
onDidChangeActiveProvider
:
Event
<
SCMProvider
>
;
/**
* The currently active [SCM provider](#SCMProvider).
*/
export
let
activeProvider
:
SCMProvider
|
undefined
;
export
let
activeProvider
:
SCMProvider
|
undefined
;
/**
* The [input box](#SCMInputBox) in the SCM view.
*/
export
const
inputBox
:
SCMInputBox
;
export
const
inputBox
:
SCMInputBox
;
// TODO@Joao
export
function
getResourceFromURI
(
uri
:
Uri
):
SCMResource
|
SCMResourceGroup
|
undefined
;
export
function
getResourceFromURI
(
uri
:
Uri
):
SCMResource
|
SCMResourceGroup
|
undefined
;
/**
* Registers an [SCM provider](#SCMProvider).
*
* @param id The provider's id.
* @return A disposable which unregisters this provider.
*/
export
function
registerSCMProvider
(
id
:
string
,
provider
:
SCMProvider
):
Disposable
;
export
function
registerSCMProvider
(
id
:
string
,
provider
:
SCMProvider
):
Disposable
;
}
}
/**
* The contiguous set of modified lines in a diff.
*/
export
interface
LineChange
{
export
interface
LineChange
{
readonly
originalStartLineNumber
:
number
;
readonly
originalStartLineNumber
:
number
;
readonly
originalEndLineNumber
:
number
;
readonly
originalEndLineNumber
:
number
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录