Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
31ec4fe4
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,发现更多精彩内容 >>
提交
31ec4fe4
编写于
1月 15, 2020
作者:
P
Pine Wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
CompletionItemLabel#label -> name
上级
79a01a0f
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
17 addition
and
23 deletion
+17
-23
src/vs/editor/common/modes.ts
src/vs/editor/common/modes.ts
+2
-4
src/vs/editor/contrib/suggest/completionModel.ts
src/vs/editor/contrib/suggest/completionModel.ts
+1
-1
src/vs/editor/contrib/suggest/suggest.ts
src/vs/editor/contrib/suggest/suggest.ts
+2
-2
src/vs/editor/contrib/suggest/suggestController.ts
src/vs/editor/contrib/suggest/suggestController.ts
+1
-1
src/vs/editor/contrib/suggest/suggestWidget.ts
src/vs/editor/contrib/suggest/suggestWidget.ts
+3
-3
src/vs/editor/contrib/suggest/wordDistance.ts
src/vs/editor/contrib/suggest/wordDistance.ts
+1
-1
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+2
-4
src/vs/vscode.proposed.d.ts
src/vs/vscode.proposed.d.ts
+2
-4
src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts
src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts
+1
-1
src/vs/workbench/api/common/extHostLanguageFeatures.ts
src/vs/workbench/api/common/extHostLanguageFeatures.ts
+1
-1
src/vs/workbench/api/common/extHostTypes.ts
src/vs/workbench/api/common/extHostTypes.ts
+1
-1
未找到文件。
src/vs/editor/common/modes.ts
浏览文件 @
31ec4fe4
...
...
@@ -372,11 +372,9 @@ export let completionKindFromString: {
export
interface
CompletionItemLabel
{
/**
* The label of this completion item. By default
* this is also the text that is inserted when selecting
* this completion.
* The name of this completion item's label.
*/
label
:
string
;
name
:
string
;
/**
* A description of the completion item which is rendered
...
...
src/vs/editor/contrib/suggest/completionModel.ts
浏览文件 @
31ec4fe4
...
...
@@ -192,7 +192,7 @@ export class CompletionModel {
}
}
const
label
=
typeof
item
.
completion
.
label
===
'
string
'
?
item
.
completion
.
label
:
item
.
completion
.
label
.
label
;
const
label
=
typeof
item
.
completion
.
label
===
'
string
'
?
item
.
completion
.
label
:
item
.
completion
.
label
.
name
;
if
(
wordPos
>=
wordLen
)
{
// the wordPos at which scoring starts is the whole word
// and therefore the same rules as not having a word apply
...
...
src/vs/editor/contrib/suggest/suggest.ts
浏览文件 @
31ec4fe4
...
...
@@ -59,7 +59,7 @@ export class CompletionItem {
)
{
this
.
textLabel
=
typeof
completion
.
label
===
'
string
'
?
completion
.
label
:
completion
.
label
.
label
;
:
completion
.
label
.
name
;
// ensure lower-variants (perf)
this
.
labelLow
=
this
.
textLabel
.
toLowerCase
();
...
...
@@ -191,7 +191,7 @@ export function provideSuggestionItems(
}
// fill in default sortText when missing
if
(
!
suggestion
.
sortText
)
{
suggestion
.
sortText
=
typeof
suggestion
.
label
===
'
string
'
?
suggestion
.
label
:
suggestion
.
label
.
label
;
suggestion
.
sortText
=
typeof
suggestion
.
label
===
'
string
'
?
suggestion
.
label
:
suggestion
.
label
.
name
;
}
allSuggestions
.
push
(
new
CompletionItem
(
position
,
suggestion
,
container
,
provider
,
model
));
...
...
src/vs/editor/contrib/suggest/suggestController.ts
浏览文件 @
31ec4fe4
...
...
@@ -343,7 +343,7 @@ export class SuggestController implements IEditorContribution {
}
private
_alertCompletionItem
({
completion
:
suggestion
}:
CompletionItem
):
void
{
const
textLabel
=
typeof
suggestion
.
label
===
'
string
'
?
suggestion
.
label
:
suggestion
.
label
.
label
;
const
textLabel
=
typeof
suggestion
.
label
===
'
string
'
?
suggestion
.
label
:
suggestion
.
label
.
name
;
if
(
isNonEmptyArray
(
suggestion
.
additionalTextEdits
))
{
let
msg
=
nls
.
localize
(
'
arai.alert.snippet
'
,
"
Accepting '{0}' made {1} additional edits
"
,
textLabel
,
suggestion
.
additionalTextEdits
.
length
);
alert
(
msg
);
...
...
src/vs/editor/contrib/suggest/suggestWidget.ts
浏览文件 @
31ec4fe4
...
...
@@ -69,7 +69,7 @@ const colorRegExp = /^(#([\da-f]{3}){1,2}|(rgb|hsl)a\(\s*(\d{1,3}%?\s*,\s*){3}(1
function
extractColor
(
item
:
CompletionItem
,
out
:
string
[]):
boolean
{
const
label
=
typeof
item
.
completion
.
label
===
'
string
'
?
item
.
completion
.
label
:
item
.
completion
.
label
.
label
;
:
item
.
completion
.
label
.
name
;
if
(
label
.
match
(
colorRegExp
))
{
out
[
0
]
=
label
;
...
...
@@ -167,7 +167,7 @@ class Renderer implements IListRenderer<CompletionItem, ISuggestionTemplateData>
renderElement
(
element
:
CompletionItem
,
_index
:
number
,
templateData
:
ISuggestionTemplateData
):
void
{
const
data
=
<
ISuggestionTemplateData
>
templateData
;
const
suggestion
=
(
<
CompletionItem
>
element
).
completion
;
const
textLabel
=
typeof
suggestion
.
label
===
'
string
'
?
suggestion
.
label
:
suggestion
.
label
.
label
;
const
textLabel
=
typeof
suggestion
.
label
===
'
string
'
?
suggestion
.
label
:
suggestion
.
label
.
name
;
data
.
icon
.
className
=
'
icon
'
+
completionKindToCssClass
(
suggestion
.
kind
);
data
.
colorspan
.
style
.
backgroundColor
=
''
;
...
...
@@ -630,7 +630,7 @@ export class SuggestWidget implements IContentWidget, IListVirtualDelegate<Compl
}
private
_getSuggestionAriaAlertLabel
(
item
:
CompletionItem
):
string
{
const
textLabel
=
typeof
item
.
completion
.
label
===
'
string
'
?
item
.
completion
.
label
:
item
.
completion
.
label
.
label
;
const
textLabel
=
typeof
item
.
completion
.
label
===
'
string
'
?
item
.
completion
.
label
:
item
.
completion
.
label
.
name
;
if
(
this
.
expandDocsSettingFromStorage
())
{
return
nls
.
localize
(
'
ariaCurrenttSuggestionReadDetails
'
,
"
Item {0}, docs: {1}
"
,
textLabel
,
this
.
details
.
getAriaLabel
());
}
else
{
...
...
src/vs/editor/contrib/suggest/wordDistance.ts
浏览文件 @
31ec4fe4
...
...
@@ -50,7 +50,7 @@ export abstract class WordDistance {
}
let
word
=
typeof
suggestion
.
label
===
'
string
'
?
suggestion
.
label
:
suggestion
.
label
.
label
;
:
suggestion
.
label
.
name
;
let
wordLines
=
wordRanges
[
word
];
if
(
isFalsyOrEmpty
(
wordLines
))
{
...
...
src/vs/monaco.d.ts
浏览文件 @
31ec4fe4
...
...
@@ -4746,11 +4746,9 @@ declare namespace monaco.languages {
export
interface
CompletionItemLabel
{
/**
* The label of this completion item. By default
* this is also the text that is inserted when selecting
* this completion.
* The name of this completion item's label.
*/
label
:
string
;
name
:
string
;
/**
* A description of the completion item which is rendered
* less prominent.
...
...
src/vs/vscode.proposed.d.ts
浏览文件 @
31ec4fe4
...
...
@@ -1512,11 +1512,9 @@ declare module 'vscode' {
export
interface
CompletionItemLabel
{
/**
* The label of this completion item. By default
* this is also the text that is inserted when selecting
* this completion.
* The name of this completion item's label.
*/
label
:
string
;
name
:
string
;
/**
* A description of the completion item which is rendered
...
...
src/vs/workbench/api/browser/mainThreadLanguageFeatures.ts
浏览文件 @
31ec4fe4
...
...
@@ -337,7 +337,7 @@ export class MainThreadLanguageFeatures implements MainThreadLanguageFeaturesSha
const
label
=
data
[
ISuggestDataDtoField
.
label
];
const
labelText
=
typeof
label
===
'
string
'
?
label
:
label
.
label
;
:
label
.
name
;
return
{
label
:
data
[
ISuggestDataDtoField
.
label
],
...
...
src/vs/workbench/api/common/extHostLanguageFeatures.ts
浏览文件 @
31ec4fe4
...
...
@@ -859,7 +859,7 @@ class SuggestAdapter {
private
_convertCompletionItem
(
item
:
vscode
.
CompletionItem
,
position
:
vscode
.
Position
,
id
:
extHostProtocol
.
ChainedCacheId
):
extHostProtocol
.
ISuggestDataDto
|
undefined
{
const
label
=
typeof
item
.
label
===
'
string
'
?
item
.
label
:
item
.
label
.
label
;
:
item
.
label
.
name
;
if
(
typeof
label
!==
'
string
'
||
label
.
length
===
0
)
{
this
.
_logService
.
warn
(
'
INVALID text edit -> must have at least a label
'
);
...
...
src/vs/workbench/api/common/extHostTypes.ts
浏览文件 @
31ec4fe4
...
...
@@ -1352,7 +1352,7 @@ export enum CompletionItemTag {
}
export
interface
CompletionItemLabel
{
label
:
string
;
name
:
string
;
// description?: string;
details
?:
string
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录