Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
8c93bb82
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8c93bb82
编写于
7月 16, 2016
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Simplify insertion code.
上级
f1c8c971
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
21 deletion
+13
-21
src/Features/VisualBasic/Portable/Completion/CompletionProviders/CompletionUtilities.vb
...ble/Completion/CompletionProviders/CompletionUtilities.vb
+6
-3
src/Features/VisualBasic/Portable/Completion/CompletionProviders/EnumCompletionProvider.vb
.../Completion/CompletionProviders/EnumCompletionProvider.vb
+1
-6
src/Features/VisualBasic/Portable/Completion/CompletionProviders/HandlesClauseCompletionProvider.vb
...on/CompletionProviders/HandlesClauseCompletionProvider.vb
+4
-6
src/Features/VisualBasic/Portable/Completion/CompletionProviders/ImplementsClauseCompletionProvider.vb
...CompletionProviders/ImplementsClauseCompletionProvider.vb
+1
-4
src/Features/VisualBasic/Portable/Completion/CompletionProviders/SymbolCompletionProvider.vb
...ompletion/CompletionProviders/SymbolCompletionProvider.vb
+1
-2
未找到文件。
src/Features/VisualBasic/Portable/Completion/CompletionProviders/CompletionUtilities.vb
浏览文件 @
8c93bb82
...
...
@@ -75,9 +75,12 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers
Public
Function
GetDisplayAndInsertionText
(
symbol
As
ISymbol
,
isAttributeNameContext
As
Boolean
,
isAfterDot
As
Boolean
,
isWithinAsyncMethod
As
Boolean
,
syntaxFacts
As
ISyntaxFactsService
)
As
ValueTuple
(
Of
String
,
String
)
context
As
AbstractSyntaxContext
)
As
ValueTuple
(
Of
String
,
String
)
Dim
isAttributeNameContext
=
context
.
IsAttributeNameContext
Dim
isAfterDot
=
context
.
IsRightOfNameSeparator
Dim
isWithinAsyncMethod
=
context
.
IsWithinAsyncMethod
Dim
syntaxFacts
=
context
.
GetLanguageService
(
Of
ISyntaxFactsService
)()
Dim
name
As
String
=
Nothing
If
Not
CommonCompletionUtilities
.
TryRemoveAttributeSuffix
(
symbol
,
isAttributeNameContext
,
syntaxFacts
,
name
)
Then
...
...
src/Features/VisualBasic/Portable/Completion/CompletionProviders/EnumCompletionProvider.vb
浏览文件 @
8c93bb82
...
...
@@ -97,12 +97,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers
Return
ValueTuple
.
Create
(
text
,
text
)
End
If
Dim
result
=
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
context
.
IsAttributeNameContext
,
context
.
IsRightOfNameSeparator
,
context
.
IsWithinAsyncMethod
,
context
.
GetLanguageService
(
Of
ISyntaxFactsService
)())
Return
result
Return
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
context
)
End
Function
Protected
Overrides
Async
Function
CreateContext
(
document
As
Document
,
position
As
Integer
,
cancellationToken
As
CancellationToken
)
As
Task
(
Of
AbstractSyntaxContext
)
...
...
src/Features/VisualBasic/Portable/Completion/CompletionProviders/HandlesClauseCompletionProvider.vb
浏览文件 @
8c93bb82
...
...
@@ -112,8 +112,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers
symbol
As
ISymbol
,
context
As
AbstractSyntaxContext
)
As
CompletionItem
Dim
displayAndInsertionText
=
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
isAttributeNameContext
:
=
False
,
isAfterDot
:
=
context
.
IsRightOfNameSeparator
,
isWithinAsyncMethod
:
=
context
.
IsWithinAsyncMethod
,
syntaxFacts
:
=
context
.
GetLanguageService
(
Of
ISyntaxFactsService
)())
Dim
displayAndInsertionText
=
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
context
)
Return
SymbolCompletionItem
.
Create
(
displayText
:
=
displayAndInsertionText
.
Item1
,
...
...
@@ -132,11 +131,10 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers
Return
False
End
Function
Protected
Overrides
Function
GetDisplayAndInsertionText
(
symbol
As
ISymbol
,
context
As
AbstractSyntaxContext
)
As
ValueTuple
(
Of
String
,
String
)
Protected
Overrides
Function
GetDisplayAndInsertionText
(
symbol
As
ISymbol
,
context
As
AbstractSyntaxContext
)
As
ValueTuple
(
Of
String
,
String
)
Return
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
context
.
IsAttributeNameContext
,
context
.
IsRightOfNameSeparator
,
isWithinAsyncMethod
:
=
context
.
IsWithinAsyncMethod
,
syntaxFacts
:
=
context
.
GetLanguageService
(
Of
ISyntaxFactsService
))
Return
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
context
)
End
Function
Protected
Overrides
Async
Function
CreateContext
(
document
As
Document
,
position
As
Integer
,
cancellationToken
As
CancellationToken
)
As
Task
(
Of
AbstractSyntaxContext
)
...
...
src/Features/VisualBasic/Portable/Completion/CompletionProviders/ImplementsClauseCompletionProvider.vb
浏览文件 @
8c93bb82
...
...
@@ -251,10 +251,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers
displayText
=
symbol
.
ToMinimalDisplayString
(
context
.
SemanticModel
,
context
.
Position
)
insertionText
=
displayText
Else
Dim
displayAndInsertionText
=
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
isAttributeNameContext
:
=
False
,
isAfterDot
:
=
context
.
IsRightOfNameSeparator
,
isWithinAsyncMethod
:
=
False
,
syntaxFacts
:
=
context
.
GetLanguageService
(
Of
ISyntaxFactsService
)())
Dim
displayAndInsertionText
=
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
context
)
displayText
=
displayAndInsertionText
.
Item1
insertionText
=
displayAndInsertionText
.
Item2
...
...
src/Features/VisualBasic/Portable/Completion/CompletionProviders/SymbolCompletionProvider.vb
浏览文件 @
8c93bb82
...
...
@@ -62,8 +62,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Completion.Providers
End
Function
Protected
Overrides
Function
GetDisplayAndInsertionText
(
symbol
As
ISymbol
,
context
As
AbstractSyntaxContext
)
As
ValueTuple
(
Of
String
,
String
)
Return
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
context
.
IsAttributeNameContext
,
context
.
IsRightOfNameSeparator
,
context
.
IsWithinAsyncMethod
,
context
.
GetLanguageService
(
Of
ISyntaxFactsService
))
Return
CompletionUtilities
.
GetDisplayAndInsertionText
(
symbol
,
context
)
End
Function
Protected
Overrides
Async
Function
CreateContext
(
document
As
Document
,
position
As
Integer
,
cancellationToken
As
CancellationToken
)
As
Task
(
Of
AbstractSyntaxContext
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录