Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
6892cfc9
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,发现更多精彩内容 >>
提交
6892cfc9
编写于
3月 11, 2019
作者:
J
Johannes Rieken
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
for now remove SelectionRangeKind #67872
上级
d77d8d56
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
9 addition
and
72 deletion
+9
-72
extensions/css-language-features/client/src/cssMain.ts
extensions/css-language-features/client/src/cssMain.ts
+1
-2
extensions/html-language-features/client/src/htmlMain.ts
extensions/html-language-features/client/src/htmlMain.ts
+0
-1
extensions/json-language-features/client/src/jsonMain.ts
extensions/json-language-features/client/src/jsonMain.ts
+0
-1
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+1
-28
src/vs/workbench/api/node/extHost.api.impl.ts
src/vs/workbench/api/node/extHost.api.impl.ts
+0
-1
src/vs/workbench/api/node/extHostTypeConverters.ts
src/vs/workbench/api/node/extHostTypeConverters.ts
+2
-12
src/vs/workbench/api/node/extHostTypes.ts
src/vs/workbench/api/node/extHostTypes.ts
+1
-23
src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts
...ench/test/electron-browser/api/extHostApiCommands.test.ts
+2
-2
src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts
...test/electron-browser/api/extHostLanguageFeatures.test.ts
+2
-2
未找到文件。
extensions/css-language-features/client/src/cssMain.ts
浏览文件 @
6892cfc9
...
...
@@ -88,8 +88,7 @@ export function activate(context: ExtensionContext) {
return
rawResult
.
map
(
rawSelectionRanges
=>
{
return
rawSelectionRanges
.
map
(
selectionRange
=>
{
return
{
range
:
client
.
protocol2CodeConverter
.
asRange
(
selectionRange
.
range
),
kind
:
selectionRange
.
kind
range
:
client
.
protocol2CodeConverter
.
asRange
(
selectionRange
.
range
)
};
});
});
...
...
extensions/html-language-features/client/src/htmlMain.ts
浏览文件 @
6892cfc9
...
...
@@ -98,7 +98,6 @@ export function activate(context: ExtensionContext) {
return
rawSelectionRanges
.
map
(
selectionRange
=>
{
return
{
range
:
client
.
protocol2CodeConverter
.
asRange
(
selectionRange
.
range
),
kind
:
selectionRange
.
kind
};
});
});
...
...
extensions/json-language-features/client/src/jsonMain.ts
浏览文件 @
6892cfc9
...
...
@@ -222,7 +222,6 @@ export function activate(context: ExtensionContext) {
return
rawSelectionRanges
.
map
(
selectionRange
=>
{
return
{
range
:
client
.
protocol2CodeConverter
.
asRange
(
selectionRange
.
range
),
kind
:
selectionRange
.
kind
};
});
});
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
6892cfc9
...
...
@@ -84,36 +84,9 @@ declare module 'vscode' {
//#region Joh - selection range provider
export
class
SelectionRangeKind
{
/**
* Empty Kind.
*/
static
readonly
Empty
:
SelectionRangeKind
;
/**
* The statement kind, its value is `statement`, possible extensions can be
* `statement.if` etc
*/
static
readonly
Statement
:
SelectionRangeKind
;
/**
* The declaration kind, its value is `declaration`, possible extensions can be
* `declaration.function`, `declaration.class` etc.
*/
static
readonly
Declaration
:
SelectionRangeKind
;
readonly
value
:
string
;
private
constructor
(
value
:
string
);
append
(
value
:
string
):
SelectionRangeKind
;
}
export
class
SelectionRange
{
kind
:
SelectionRangeKind
;
range
:
Range
;
constructor
(
range
:
Range
,
kind
:
SelectionRangeKind
);
constructor
(
range
:
Range
);
}
export
interface
SelectionRangeProvider
{
...
...
src/vs/workbench/api/node/extHost.api.impl.ts
浏览文件 @
6892cfc9
...
...
@@ -800,7 +800,6 @@ export function createApiFactory(
ResolvedAuthority
:
extHostTypes
.
ResolvedAuthority
,
Selection
:
extHostTypes
.
Selection
,
SelectionRange
:
extHostTypes
.
SelectionRange
,
SelectionRangeKind
:
extHostTypes
.
SelectionRangeKind
,
ShellExecution
:
extHostTypes
.
ShellExecution
,
ShellQuoting
:
extHostTypes
.
ShellQuoting
,
SignatureHelpTriggerKind
:
extHostTypes
.
SignatureHelpTriggerKind
,
...
...
src/vs/workbench/api/node/extHostTypeConverters.ts
浏览文件 @
6892cfc9
...
...
@@ -854,27 +854,17 @@ export namespace Color {
}
}
export
namespace
SelectionRangeKind
{
export
function
from
(
kind
:
vscode
.
SelectionRangeKind
):
string
{
return
kind
.
value
;
}
export
function
to
(
value
:
string
):
vscode
.
SelectionRangeKind
{
return
new
types
.
SelectionRangeKind
(
value
);
}
}
export
namespace
SelectionRange
{
export
function
from
(
obj
:
vscode
.
SelectionRange
):
modes
.
SelectionRange
{
return
{
kind
:
SelectionRangeKind
.
from
(
obj
.
kind
)
,
kind
:
''
,
range
:
Range
.
from
(
obj
.
range
)
};
}
export
function
to
(
obj
:
modes
.
SelectionRange
):
vscode
.
SelectionRange
{
return
new
types
.
SelectionRange
(
Range
.
to
(
obj
.
range
)
,
SelectionRangeKind
.
to
(
obj
.
kind
)
);
return
new
types
.
SelectionRange
(
Range
.
to
(
obj
.
range
));
}
}
...
...
src/vs/workbench/api/node/extHostTypes.ts
浏览文件 @
6892cfc9
...
...
@@ -1094,35 +1094,13 @@ CodeActionKind.Source = CodeActionKind.Empty.append('source');
CodeActionKind
.
SourceOrganizeImports
=
CodeActionKind
.
Source
.
append
(
'
organizeImports
'
);
CodeActionKind
.
SourceFixAll
=
CodeActionKind
.
Source
.
append
(
'
fixAll
'
);
@
es5ClassCompat
export
class
SelectionRangeKind
{
private
static
readonly
_sep
=
'
.
'
;
static
readonly
Empty
=
new
SelectionRangeKind
(
''
);
static
readonly
Statement
=
SelectionRangeKind
.
Empty
.
append
(
'
statement
'
);
static
readonly
Declaration
=
SelectionRangeKind
.
Empty
.
append
(
'
declaration
'
);
readonly
value
:
string
;
constructor
(
value
:
string
)
{
this
.
value
=
value
;
}
append
(
value
:
string
):
SelectionRangeKind
{
return
new
SelectionRangeKind
(
this
.
value
?
this
.
value
+
SelectionRangeKind
.
_sep
+
value
:
value
);
}
}
@
es5ClassCompat
export
class
SelectionRange
{
kind
:
SelectionRangeKind
;
range
:
Range
;
constructor
(
range
:
Range
,
kind
:
SelectionRangeKind
,
)
{
constructor
(
range
:
Range
)
{
this
.
range
=
range
;
this
.
kind
=
kind
;
}
}
...
...
src/vs/workbench/test/electron-browser/api/extHostApiCommands.test.ts
浏览文件 @
6892cfc9
...
...
@@ -800,8 +800,8 @@ suite('ExtHostLanguageFeatureCommands', function () {
disposables
.
push
(
extHost
.
registerSelectionRangeProvider
(
nullExtensionDescription
,
defaultSelector
,
<
vscode
.
SelectionRangeProvider
>
{
provideSelectionRanges
()
{
return
[[
new
types
.
SelectionRange
(
new
types
.
Range
(
0
,
10
,
0
,
18
)
,
types
.
SelectionRangeKind
.
Empty
),
new
types
.
SelectionRange
(
new
types
.
Range
(
0
,
2
,
0
,
20
)
,
types
.
SelectionRangeKind
.
Empty
)
new
types
.
SelectionRange
(
new
types
.
Range
(
0
,
10
,
0
,
18
)),
new
types
.
SelectionRange
(
new
types
.
Range
(
0
,
2
,
0
,
20
))
]];
}
}));
...
...
src/vs/workbench/test/electron-browser/api/extHostLanguageFeatures.test.ts
浏览文件 @
6892cfc9
...
...
@@ -1105,8 +1105,8 @@ suite('ExtHostLanguageFeatures', function () {
disposables
.
push
(
extHost
.
registerSelectionRangeProvider
(
defaultExtension
,
defaultSelector
,
new
class
implements
vscode
.
SelectionRangeProvider
{
provideSelectionRanges
()
{
return
[[
new
types
.
SelectionRange
(
new
types
.
Range
(
0
,
10
,
0
,
18
)
,
types
.
SelectionRangeKind
.
Empty
),
new
types
.
SelectionRange
(
new
types
.
Range
(
0
,
2
,
0
,
20
)
,
types
.
SelectionRangeKind
.
Empty
)
new
types
.
SelectionRange
(
new
types
.
Range
(
0
,
10
,
0
,
18
)),
new
types
.
SelectionRange
(
new
types
.
Range
(
0
,
2
,
0
,
20
))
]];
}
}));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录