Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
d2718191
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,发现更多精彩内容 >>
提交
d2718191
编写于
3月 13, 2018
作者:
C
Carol Hu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Upgrade Editor and related nuget packages from 15.6.281-preview to 15.7.153-preview-g7d0635149a
上级
f39a95c8
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
40 addition
and
37 deletion
+40
-37
build/Targets/Packages.props
build/Targets/Packages.props
+11
-11
src/EditorFeatures/Core.Wpf/Completion/Presentation/CompletionPresenterSession.cs
...Wpf/Completion/Presentation/CompletionPresenterSession.cs
+5
-4
src/EditorFeatures/Core.Wpf/Completion/Presentation/CustomCommitCompletion.cs
...ore.Wpf/Completion/Presentation/CustomCommitCompletion.cs
+3
-4
src/EditorFeatures/Core.Wpf/Completion/Presentation/RoslynCompletionSet.cs
...s/Core.Wpf/Completion/Presentation/RoslynCompletionSet.cs
+12
-11
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller.cs
...Core/Implementation/IntelliSense/Completion/Controller.cs
+2
-2
src/EditorFeatures/TestUtilities/Completion/AbstractCompletionProviderTests.cs
...stUtilities/Completion/AbstractCompletionProviderTests.cs
+6
-4
src/EditorFeatures/TestUtilities2/Intellisense/TestState.vb
src/EditorFeatures/TestUtilities2/Intellisense/TestState.vb
+1
-1
未找到文件。
build/Targets/Packages.props
浏览文件 @
d2718191
...
...
@@ -76,25 +76,25 @@
<MicrosoftVisualStudioCodeAnalysisSdkUIVersion>
15.0.26730-alpha
</MicrosoftVisualStudioCodeAnalysisSdkUIVersion>
<MicrosoftVisualStudioComponentModelHostVersion>
15.0.26730-alpha
</MicrosoftVisualStudioComponentModelHostVersion>
<MicrosoftVisualStudioCompositionVersion>
15.5.23
</MicrosoftVisualStudioCompositionVersion>
<MicrosoftVisualStudioCoreUtilityVersion>
15.
6.281-preview
</MicrosoftVisualStudioCoreUtilityVersion>
<MicrosoftVisualStudioCoreUtilityVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioCoreUtilityVersion>
<MicrosoftVisualStudioDebuggerEngineVersion>
15.0.27309-vsucorediag
</MicrosoftVisualStudioDebuggerEngineVersion>
<MicrosoftVisualStudioDebuggerMetadataVersion>
15.0.27309-vsucorediag
</MicrosoftVisualStudioDebuggerMetadataVersion>
<MicrosoftVisualStudioDebuggerUIInterfacesVersion>
15.0.27309-vsucorediag
</MicrosoftVisualStudioDebuggerUIInterfacesVersion>
<MicrosoftVisualStudioDebuggerInterop100Version>
10.0.30319
</MicrosoftVisualStudioDebuggerInterop100Version>
<MicrosoftVisualStudioDesignerInterfacesVersion>
1.1.4322
</MicrosoftVisualStudioDesignerInterfacesVersion>
<MicrosoftVisualStudioDiagnosticsPerformanceProviderVersion>
15.0.26730-alpha
</MicrosoftVisualStudioDiagnosticsPerformanceProviderVersion>
<MicrosoftVisualStudioEditorVersion>
15.
6.281-preview
</MicrosoftVisualStudioEditorVersion>
<MicrosoftVisualStudioEditorVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioEditorVersion>
<MicrosoftVisualStudioGraphModelVersion>
15.0.26730-alpha
</MicrosoftVisualStudioGraphModelVersion>
<MicrosoftVisualStudioImageCatalogVersion>
15.0.26730-alpha
</MicrosoftVisualStudioImageCatalogVersion>
<MicrosoftVisualStudioImagingVersion>
15.0.26730-alpha
</MicrosoftVisualStudioImagingVersion>
<MicrosoftVisualStudioImagingInterop140DesignTimeVersion>
15.0.25726-Preview5
</MicrosoftVisualStudioImagingInterop140DesignTimeVersion>
<MicrosoftVisualStudioInteractiveWindowVersion>
2.0.0-rc3-61304-01
</MicrosoftVisualStudioInteractiveWindowVersion>
<MicrosoftVisualStudioLanguageCallHierarchyVersion>
15.3.1710.203
</MicrosoftVisualStudioLanguageCallHierarchyVersion>
<MicrosoftVisualStudioLanguageIntellisenseVersion>
15.
6.281-preview
</MicrosoftVisualStudioLanguageIntellisenseVersion>
<MicrosoftVisualStudioLanguageNavigateToInterfacesVersion>
15.
6.281-preview
</MicrosoftVisualStudioLanguageNavigateToInterfacesVersion>
<MicrosoftVisualStudioLanguageStandardClassificationVersion>
15.
6.281-preview
</MicrosoftVisualStudioLanguageStandardClassificationVersion>
<MicrosoftVisualStudioLanguageIntellisenseVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioLanguageIntellisenseVersion>
<MicrosoftVisualStudioLanguageNavigateToInterfacesVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioLanguageNavigateToInterfacesVersion>
<MicrosoftVisualStudioLanguageStandardClassificationVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioLanguageStandardClassificationVersion>
<MicrosoftVisualStudioOLEInteropVersion>
7.10.6070
</MicrosoftVisualStudioOLEInteropVersion>
<MicrosoftVisualStudioPlatformVSEditorVersion>
15.
6.281-preview
</MicrosoftVisualStudioPlatformVSEditorVersion>
<MicrosoftVisualStudioPlatformVSEditorVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioPlatformVSEditorVersion>
<MicrosoftVisualStudioProgressionCodeSchemaVersion>
15.0.26730-alpha
</MicrosoftVisualStudioProgressionCodeSchemaVersion>
<MicrosoftVisualStudioProgressionCommonVersion>
15.0.26730-alpha
</MicrosoftVisualStudioProgressionCommonVersion>
<MicrosoftVisualStudioProgressionInterfacesVersion>
15.0.26730-alpha
</MicrosoftVisualStudioProgressionInterfacesVersion>
...
...
@@ -120,11 +120,11 @@
<MicrosoftVisualStudioShellInterop90Version>
9.0.30729
</MicrosoftVisualStudioShellInterop90Version>
<MicrosoftVisualStudioTelemetryVersion>
15.0.26730-alpha
</MicrosoftVisualStudioTelemetryVersion>
<MicrosoftVisualStudioTemplateWizardInterfaceVersion>
8.0.0.0-alpha
</MicrosoftVisualStudioTemplateWizardInterfaceVersion>
<MicrosoftVisualStudioTextDataVersion>
15.
6.281-preview
</MicrosoftVisualStudioTextDataVersion>
<MicrosoftVisualStudioTextInternalVersion>
15.
6.281-preview
</MicrosoftVisualStudioTextInternalVersion>
<MicrosoftVisualStudioTextLogicVersion>
15.
6.281-preview
</MicrosoftVisualStudioTextLogicVersion>
<MicrosoftVisualStudioTextUIVersion>
15.
6.281-preview
</MicrosoftVisualStudioTextUIVersion>
<MicrosoftVisualStudioTextUIWpfVersion>
15.
6.281-preview
</MicrosoftVisualStudioTextUIWpfVersion>
<MicrosoftVisualStudioTextDataVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioTextDataVersion>
<MicrosoftVisualStudioTextInternalVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioTextInternalVersion>
<MicrosoftVisualStudioTextLogicVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioTextLogicVersion>
<MicrosoftVisualStudioTextUIVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioTextUIVersion>
<MicrosoftVisualStudioTextUIWpfVersion>
15.
7.153-preview-g7d0635149a
</MicrosoftVisualStudioTextUIWpfVersion>
<MicrosoftVisualStudioTextManagerInteropVersion>
7.10.6070
</MicrosoftVisualStudioTextManagerInteropVersion>
<MicrosoftVisualStudioTextManagerInterop100Version>
10.0.30319
</MicrosoftVisualStudioTextManagerInterop100Version>
<MicrosoftVisualStudioTextManagerInterop120Version>
12.0.30110
</MicrosoftVisualStudioTextManagerInterop120Version>
...
...
src/EditorFeatures/Core.Wpf/Completion/Presentation/CompletionPresenterSession.cs
浏览文件 @
d2718191
...
...
@@ -12,6 +12,7 @@
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Editor
;
using
Roslyn.Utilities
;
using
CACompletionItem
=
Microsoft
.
CodeAnalysis
.
Completion
.
CompletionItem
;
namespace
Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation
{
...
...
@@ -70,9 +71,9 @@ internal sealed class CompletionPresenterSession : ForegroundThreadAffinitizedOb
public
void
PresentItems
(
ITrackingSpan
triggerSpan
,
IList
<
CompletionItem
>
completionItems
,
CompletionItem
selectedItem
,
CompletionItem
suggestionModeItem
,
IList
<
C
AC
ompletionItem
>
completionItems
,
C
AC
ompletionItem
selectedItem
,
C
AC
ompletionItem
suggestionModeItem
,
bool
suggestionMode
,
bool
isSoftSelected
,
ImmutableArray
<
CompletionItemFilter
>
completionItemFilters
,
...
...
@@ -140,7 +141,7 @@ private void OnEditorSessionDismissed()
this
.
Dismissed
?.
Invoke
(
this
,
new
EventArgs
());
}
internal
void
OnCompletionItemCommitted
(
CompletionItem
completionItem
)
internal
void
OnCompletionItemCommitted
(
C
AC
ompletionItem
completionItem
)
{
AssertIsForeground
();
this
.
ItemCommitted
?.
Invoke
(
this
,
new
CompletionItemEventArgs
(
completionItem
));
...
...
src/EditorFeatures/Core.Wpf/Completion/Presentation/CustomCommitCompletion.cs
浏览文件 @
d2718191
...
...
@@ -5,12 +5,11 @@
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis.Completion
;
using
Microsoft.CodeAnalysis.Editor.Shared.Extensions
;
using
Microsoft.CodeAnalysis.Editor.Wpf
;
using
Microsoft.CodeAnalysis.Text
;
using
Microsoft.VisualStudio.Imaging.Interop
;
using
Microsoft.VisualStudio.Language.Intellisense
;
using
Roslyn.Utilities
;
using
CACompletionItem
=
Microsoft
.
CodeAnalysis
.
Completion
.
CompletionItem
;
namespace
Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation
{
...
...
@@ -18,12 +17,12 @@ internal sealed class CustomCommitCompletion : Completion3, ICustomCommit
{
private
const
string
s_glyphCompletionWarning
=
"GlyphCompletionWarning"
;
private
readonly
CompletionPresenterSession
_completionPresenterSession
;
internal
readonly
CompletionItem
CompletionItem
;
internal
readonly
C
AC
ompletionItem
CompletionItem
;
private
readonly
ImageMoniker
_imageMoniker
;
public
CustomCommitCompletion
(
CompletionPresenterSession
completionPresenterSession
,
CompletionItem
completionItem
)
C
AC
ompletionItem
completionItem
)
{
// PERF: Note that the base class contains a constructor taking the displayText string
// but we're intentionally NOT using that here because it allocates a private CompletionState
...
...
src/EditorFeatures/Core.Wpf/Completion/Presentation/RoslynCompletionSet.cs
浏览文件 @
d2718191
...
...
@@ -10,6 +10,7 @@
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Editor
;
using
VSCompletion
=
Microsoft
.
VisualStudio
.
Language
.
Intellisense
.
Completion
;
using
CACompletionItem
=
Microsoft
.
CodeAnalysis
.
Completion
.
CompletionItem
;
namespace
Microsoft.CodeAnalysis.Editor.Implementation.IntelliSense.Completion.Presentation
{
...
...
@@ -26,8 +27,8 @@ internal class RoslynCompletionSet : CompletionSet2
protected
readonly
CompletionPresenterSession
CompletionPresenterSession
;
private
CompletionHelper
_completionHelper
;
protected
Dictionary
<
CompletionItem
,
VSCompletion
>
CompletionItemMap
;
protected
CompletionItem
SuggestionModeItem
;
protected
Dictionary
<
C
AC
ompletionItem
,
VSCompletion
>
CompletionItemMap
;
protected
C
AC
ompletionItem
SuggestionModeItem
;
protected
string
FilterText
;
...
...
@@ -80,9 +81,9 @@ public override void Recalculate()
}
public
void
SetCompletionItems
(
IList
<
CompletionItem
>
completionItems
,
CompletionItem
selectedItem
,
CompletionItem
suggestionModeItem
,
IList
<
C
AC
ompletionItem
>
completionItems
,
C
AC
ompletionItem
selectedItem
,
C
AC
ompletionItem
suggestionModeItem
,
bool
suggestionMode
,
bool
isSoftSelected
,
ImmutableArray
<
CompletionItemFilter
>
completionItemFilters
,
...
...
@@ -91,7 +92,7 @@ public override void Recalculate()
_foregroundThread
.
AssertIsForeground
();
// Initialize the completion map to a reasonable default initial size (+1 for the builder)
CompletionItemMap
=
CompletionItemMap
??
new
Dictionary
<
CompletionItem
,
VSCompletion
>(
completionItems
.
Count
+
1
);
CompletionItemMap
=
CompletionItemMap
??
new
Dictionary
<
C
AC
ompletionItem
,
VSCompletion
>(
completionItems
.
Count
+
1
);
FilterText
=
filterText
;
SuggestionModeItem
=
suggestionModeItem
;
...
...
@@ -112,8 +113,8 @@ public override void Recalculate()
}
private
void
CreateCompletionListBuilder
(
CompletionItem
selectedItem
,
CompletionItem
suggestionModeItem
,
C
AC
ompletionItem
selectedItem
,
C
AC
ompletionItem
suggestionModeItem
,
bool
suggestionMode
)
{
try
...
...
@@ -138,7 +139,7 @@ public override void Recalculate()
}
}
private
void
CreateNormalCompletionListItems
(
IList
<
CompletionItem
>
completionItems
)
private
void
CreateNormalCompletionListItems
(
IList
<
C
AC
ompletionItem
>
completionItems
)
{
try
{
...
...
@@ -157,7 +158,7 @@ private void CreateNormalCompletionListItems(IList<CompletionItem> completionIte
}
}
private
VSCompletion
GetVSCompletion
(
CompletionItem
item
,
string
displayText
=
null
)
private
VSCompletion
GetVSCompletion
(
C
AC
ompletionItem
item
,
string
displayText
=
null
)
{
if
(!
CompletionItemMap
.
TryGetValue
(
item
,
out
var
value
))
{
...
...
@@ -170,7 +171,7 @@ private VSCompletion GetVSCompletion(CompletionItem item, string displayText = n
return
value
;
}
public
CompletionItem
GetCompletionItem
(
VSCompletion
completion
)
public
C
AC
ompletionItem
GetCompletionItem
(
VSCompletion
completion
)
{
// Linear search is ok since this is only called by the user manually selecting
// an item. Creating a reverse mapping uses too much memory and affects GCs.
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/Completion/Controller.cs
浏览文件 @
d2718191
...
...
@@ -152,7 +152,7 @@ internal override void OnModelUpdated(Model modelOpt)
private
bool
StartNewModelComputation
(
CompletionService
completionService
,
CompletionTrigger
trigger
)
Co
deAnalysis
.
Completion
.
Co
mpletionTrigger
trigger
)
{
AssertIsForeground
();
Contract
.
ThrowIfTrue
(
sessionOpt
!=
null
);
...
...
@@ -214,7 +214,7 @@ private OptionSet GetOptions()
:
workspace
.
Options
;
}
private
void
CommitItem
(
CompletionItem
item
)
private
void
CommitItem
(
Co
deAnalysis
.
Completion
.
Co
mpletionItem
item
)
{
AssertIsForeground
();
...
...
src/EditorFeatures/TestUtilities/Completion/AbstractCompletionProviderTests.cs
浏览文件 @
d2718191
...
...
@@ -20,6 +20,7 @@
using
Roslyn.Test.Utilities
;
using
Roslyn.Utilities
;
using
Xunit
;
using
CompletionTrigger
=
Microsoft
.
CodeAnalysis
.
Completion
.
CompletionTrigger
;
namespace
Microsoft.CodeAnalysis.Editor.UnitTests.Completion
{
...
...
@@ -74,7 +75,8 @@ internal static CompletionHelper GetCompletionHelper(Document document)
internal
Task
<
CompletionList
>
GetCompletionListAsync
(
CompletionService
service
,
Document
document
,
int
position
,
CompletionTrigger
triggerInfo
,
OptionSet
options
=
null
)
Document
document
,
int
position
,
CodeAnalysis
.
Completion
.
CompletionTrigger
triggerInfo
,
OptionSet
options
=
null
)
{
return
service
.
GetCompletionsAsync
(
document
,
position
,
triggerInfo
,
options
:
options
);
}
...
...
@@ -96,7 +98,7 @@ internal static CompletionHelper GetCompletionHelper(Document document)
var
completionService
=
GetCompletionService
(
document
.
Project
.
Solution
.
Workspace
);
var
completionList
=
await
GetCompletionListAsync
(
completionService
,
document
,
position
,
trigger
);
var
items
=
completionList
==
null
?
ImmutableArray
<
CompletionItem
>.
Empty
:
completionList
.
Items
;
var
items
=
completionList
==
null
?
ImmutableArray
<
Co
deAnalysis
.
Completion
.
Co
mpletionItem
>.
Empty
:
completionList
.
Items
;
if
(
hasSuggestionModeItem
!=
null
)
{
...
...
@@ -332,7 +334,7 @@ protected virtual void SetWorkspaceOptions(TestWorkspace workspace)
internal
async
Task
VerifyCustomCommitWorkerAsync
(
CompletionServiceWithProviders
service
,
Document
document
,
CompletionItem
completionItem
,
Co
deAnalysis
.
Completion
.
Co
mpletionItem
completionItem
,
string
codeBeforeCommit
,
string
expectedCodeAfterCommit
,
char
?
commitChar
=
null
)
...
...
@@ -366,7 +368,7 @@ protected virtual void SetWorkspaceOptions(TestWorkspace workspace)
internal
virtual
void
VerifyCustomCommitWorker
(
CompletionService
service
,
ICustomCommitCompletionProvider
customCommitCompletionProvider
,
CompletionItem
completionItem
,
Co
deAnalysis
.
Completion
.
Co
mpletionItem
completionItem
,
CompletionHelper
completionRules
,
ITextView
textView
,
ITextBuffer
textBuffer
,
...
...
src/EditorFeatures/TestUtilities2/Intellisense/TestState.vb
浏览文件 @
d2718191
...
...
@@ -196,7 +196,7 @@ Namespace Microsoft.CodeAnalysis.Editor.UnitTests.IntelliSense
CurrentCompletionPresenterSession
.
SetSelectedItem
(
item
)
End
Sub
Public
Overloads
Sub
SendSelectCompletionItemThroughPresenterSession
(
item
As
CompletionItem
)
Public
Overloads
Sub
SendSelectCompletionItemThroughPresenterSession
(
item
As
Co
deAnalysis
.
Completion
.
Co
mpletionItem
)
CurrentCompletionPresenterSession
.
SetSelectedItem
(
item
)
End
Sub
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录