Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
62ac14d5
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,发现更多精彩内容 >>
未验证
提交
62ac14d5
编写于
3月 11, 2019
作者:
D
dotnet-automerge-bot
提交者:
GitHub
3月 11, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #33955 from dotnet/merges/dev16.0-vs-deps-to-master-vs-deps
Merge dev16.0-vs-deps to master-vs-deps
上级
2dbf5aac
16fbdfb6
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
55 addition
and
33 deletion
+55
-33
azure-pipelines-official.yml
azure-pipelines-official.yml
+2
-2
global.json
global.json
+1
-1
src/EditorFeatures/CSharp/AutomaticCompletion/AutomaticLineEnderCommandHandler.cs
...p/AutomaticCompletion/AutomaticLineEnderCommandHandler.cs
+3
-2
src/EditorFeatures/CSharpTest/AutomaticCompletion/AutomaticLineEnderTests.cs
...CSharpTest/AutomaticCompletion/AutomaticLineEnderTests.cs
+4
-2
src/EditorFeatures/Core/Implementation/AutomaticCompletion/AbstractAutomaticLineEnderCommandHandler.cs
...ticCompletion/AbstractAutomaticLineEnderCommandHandler.cs
+22
-1
src/EditorFeatures/Core/Implementation/IntelliSense/AsyncCompletion/CommitManager.cs
...lementation/IntelliSense/AsyncCompletion/CommitManager.cs
+4
-0
src/EditorFeatures/TestUtilities/AutomaticCompletion/AbstractAutomaticLineEnderTests.cs
...es/AutomaticCompletion/AbstractAutomaticLineEnderTests.cs
+5
-11
src/EditorFeatures/VisualBasic/AutomaticCompletion/AutomaticLineEnderCommandHandler.vb
...c/AutomaticCompletion/AutomaticLineEnderCommandHandler.vb
+3
-2
src/EditorFeatures/VisualBasicTest/AutomaticCompletion/AutomaticLineEnderTests.vb
...lBasicTest/AutomaticCompletion/AutomaticLineEnderTests.vb
+4
-2
src/Features/Core/Portable/Completion/CommonCompletionProvider.cs
...ures/Core/Portable/Completion/CommonCompletionProvider.cs
+1
-1
src/Interactive/EditorFeatures/CSharp/Microsoft.CodeAnalysis.CSharp.InteractiveEditorFeatures.csproj
...soft.CodeAnalysis.CSharp.InteractiveEditorFeatures.csproj
+0
-1
src/Interactive/EditorFeatures/Core/Microsoft.CodeAnalysis.InteractiveEditorFeatures.csproj
...e/Microsoft.CodeAnalysis.InteractiveEditorFeatures.csproj
+0
-1
src/Interactive/Features/Microsoft.CodeAnalysis.InteractiveFeatures.csproj
...eatures/Microsoft.CodeAnalysis.InteractiveFeatures.csproj
+0
-1
src/NuGet/Microsoft.Net.Compilers.Toolset/DesktopCompilerArtifacts.targets
...ft.Net.Compilers.Toolset/DesktopCompilerArtifacts.targets
+1
-0
src/Setup/DevDivInsertionFiles/DevDivInsertionFiles.csproj
src/Setup/DevDivInsertionFiles/DevDivInsertionFiles.csproj
+2
-1
src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpIntelliSense.cs
...grationTest/IntegrationTests/CSharp/CSharpIntelliSense.cs
+2
-3
src/VisualStudio/IntegrationTest/IntegrationTests/VisualBasic/BasicEditAndContinue.cs
...Test/IntegrationTests/VisualBasic/BasicEditAndContinue.cs
+1
-2
未找到文件。
azure-pipelines-official.yml
浏览文件 @
62ac14d5
...
...
@@ -6,8 +6,8 @@ variables:
SignType
:
real
SkipTests
:
false
SkipApplyOptimizationData
:
false
IbcSourceBranchName
:
'
master-vs-deps
'
IbcDropId
:
'
75e3797e1105a4da4c10dddda76c3b9398f7725a/223453/935479/1
'
IbcSourceBranchName
:
'
default
'
IbcDropId
:
'
default
'
jobs
:
-
job
:
OfficialBuild
...
...
global.json
浏览文件 @
62ac14d5
...
...
@@ -7,6 +7,6 @@
"xcopy-msbuild"
:
"15.9.0-alpha"
},
"msbuild-sdks"
:
{
"Microsoft.DotNet.Arcade.Sdk"
:
"1.0.0-beta.191
27.8
"
"Microsoft.DotNet.Arcade.Sdk"
:
"1.0.0-beta.191
57.23
"
}
}
src/EditorFeatures/CSharp/AutomaticCompletion/AutomaticLineEnderCommandHandler.cs
浏览文件 @
62ac14d5
...
...
@@ -34,8 +34,9 @@ internal class AutomaticLineEnderCommandHandler : AbstractAutomaticLineEnderComm
[
ImportingConstructor
]
public
AutomaticLineEnderCommandHandler
(
ITextUndoHistoryRegistry
undoRegistry
,
IEditorOperationsFactoryService
editorOperations
)
:
base
(
undoRegistry
,
editorOperations
)
IEditorOperationsFactoryService
editorOperations
,
IAsyncCompletionBroker
asyncCompletionBroker
)
:
base
(
undoRegistry
,
editorOperations
,
asyncCompletionBroker
)
{
}
...
...
src/EditorFeatures/CSharpTest/AutomaticCompletion/AutomaticLineEnderTests.cs
浏览文件 @
62ac14d5
...
...
@@ -6,6 +6,7 @@
using
Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
;
using
Microsoft.CodeAnalysis.Test.Utilities
;
using
Microsoft.VisualStudio.Commanding
;
using
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
;
using
Microsoft.VisualStudio.Text.Editor.Commanding.Commands
;
using
Microsoft.VisualStudio.Text.Operations
;
using
Roslyn.Test.Utilities
;
...
...
@@ -848,9 +849,10 @@ protected override Action CreateNextHandler(TestWorkspace workspace)
internal
override
IChainedCommandHandler
<
AutomaticLineEnderCommandArgs
>
CreateCommandHandler
(
ITextUndoHistoryRegistry
undoRegistry
,
IEditorOperationsFactoryService
editorOperations
)
IEditorOperationsFactoryService
editorOperations
,
IAsyncCompletionBroker
asyncCompletionBroker
)
{
return
new
AutomaticLineEnderCommandHandler
(
undoRegistry
,
editorOperations
);
return
new
AutomaticLineEnderCommandHandler
(
undoRegistry
,
editorOperations
,
asyncCompletionBroker
);
}
}
}
src/EditorFeatures/Core/Implementation/AutomaticCompletion/AbstractAutomaticLineEnderCommandHandler.cs
浏览文件 @
62ac14d5
...
...
@@ -8,6 +8,8 @@
using
Microsoft.CodeAnalysis.Shared.Extensions
;
using
Microsoft.CodeAnalysis.Text
;
using
Microsoft.VisualStudio.Commanding
;
using
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
;
using
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion.Data
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Editor.Commanding.Commands
;
using
Microsoft.VisualStudio.Text.Operations
;
...
...
@@ -20,15 +22,18 @@ internal abstract class AbstractAutomaticLineEnderCommandHandler :
{
private
readonly
ITextUndoHistoryRegistry
_undoRegistry
;
private
readonly
IEditorOperationsFactoryService
_editorOperationsFactoryService
;
private
readonly
IAsyncCompletionBroker
_asyncCompletionBroker
;
public
string
DisplayName
=>
EditorFeaturesResources
.
Automatic_Line_Ender
;
public
AbstractAutomaticLineEnderCommandHandler
(
ITextUndoHistoryRegistry
undoRegistry
,
IEditorOperationsFactoryService
editorOperationsFactoryService
)
IEditorOperationsFactoryService
editorOperationsFactoryService
,
IAsyncCompletionBroker
asyncCompletionBroker
)
{
_undoRegistry
=
undoRegistry
;
_editorOperationsFactoryService
=
editorOperationsFactoryService
;
_asyncCompletionBroker
=
asyncCompletionBroker
;
}
/// <summary>
...
...
@@ -58,6 +63,22 @@ public VSCommanding.CommandState GetCommandState(AutomaticLineEnderCommandArgs a
public
void
ExecuteCommand
(
AutomaticLineEnderCommandArgs
args
,
Action
nextHandler
,
CommandExecutionContext
context
)
{
// Completion will only be active here if this command wasn't handled by the completion controller itself.
if
(
_asyncCompletionBroker
.
IsCompletionActive
(
args
.
TextView
))
{
var
session
=
_asyncCompletionBroker
.
GetSession
(
args
.
TextView
);
var
computedItems
=
session
.
GetComputedItems
(
context
.
OperationContext
.
UserCancellationToken
);
var
softSelection
=
computedItems
.
SuggestionItemSelected
||
computedItems
.
UsesSoftSelection
;
var
behavior
=
session
.
Commit
(
'\n'
,
context
.
OperationContext
.
UserCancellationToken
);
session
.
Dismiss
();
if
(
behavior
!=
CommitBehavior
.
CancelCommit
&&
!
softSelection
)
{
// Skip the automatic line handling in this case for behavior parity with legacy completion.
return
;
}
}
// get editor operation
var
operations
=
_editorOperationsFactoryService
.
GetEditorOperations
(
args
.
TextView
);
if
(
operations
==
null
)
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/AsyncCompletion/CommitManager.cs
浏览文件 @
62ac14d5
...
...
@@ -213,6 +213,10 @@ internal CommitManager(ITextView textView, RecentItemsManager recentItemsManager
{
view
.
TryMoveCaretToAndEnsureVisible
(
new
SnapshotPoint
(
subjectBuffer
.
CurrentSnapshot
,
mappedSpan
.
Start
.
Position
+
adjustedNewText
.
Length
));
}
else
{
view
.
Caret
.
EnsureVisible
();
}
}
includesCommitCharacter
=
change
.
IncludesCommitCharacter
;
...
...
src/EditorFeatures/TestUtilities/AutomaticCompletion/AbstractAutomaticLineEnderTests.cs
浏览文件 @
62ac14d5
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using
System
;
using
System.Collections.Generic
;
using
System.Collections.ObjectModel
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis.Editor.Host
;
using
Microsoft.CodeAnalysis.Editor.UnitTests.Utilities
;
using
Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
;
using
Microsoft.CodeAnalysis.Options
;
using
Microsoft.CodeAnalysis.Test.Utilities
;
using
Microsoft.CodeAnalysis.Text
;
using
Microsoft.VisualStudio.Commanding
;
using
Microsoft.VisualStudio.Language.Intellisense
;
using
Microsoft.VisualStudio.Language.Intellisense
.AsyncCompletion
;
using
Microsoft.VisualStudio.Text
;
using
Microsoft.VisualStudio.Text.Editor
;
using
Microsoft.VisualStudio.Text.Editor.Commanding.Commands
;
using
Microsoft.VisualStudio.Text.Operations
;
using
Moq
;
using
Roslyn.Test.Utilities
;
using
Roslyn.Utilities
;
using
Xunit
;
namespace
Microsoft.CodeAnalysis.Editor.UnitTests.AutomaticCompletion
...
...
@@ -32,7 +24,8 @@ public abstract class AbstractAutomaticLineEnderTests
internal
abstract
IChainedCommandHandler
<
AutomaticLineEnderCommandArgs
>
CreateCommandHandler
(
ITextUndoHistoryRegistry
undoRegistry
,
IEditorOperationsFactoryService
editorOperations
);
IEditorOperationsFactoryService
editorOperations
,
IAsyncCompletionBroker
asyncCompletionBroker
);
protected
void
Test
(
string
expected
,
string
code
,
bool
completionActive
=
false
,
bool
assertNextHandlerInvoked
=
false
)
{
...
...
@@ -46,7 +39,8 @@ protected void Test(string expected, string code, bool completionActive = false,
var
commandHandler
=
CreateCommandHandler
(
GetExportedValue
<
ITextUndoHistoryRegistry
>(
workspace
),
GetExportedValue
<
IEditorOperationsFactoryService
>(
workspace
));
GetExportedValue
<
IEditorOperationsFactoryService
>(
workspace
),
GetExportedValue
<
IAsyncCompletionBroker
>(
workspace
));
commandHandler
.
ExecuteCommand
(
new
AutomaticLineEnderCommandArgs
(
view
,
buffer
),
assertNextHandlerInvoked
...
...
src/EditorFeatures/VisualBasic/AutomaticCompletion/AutomaticLineEnderCommandHandler.vb
浏览文件 @
62ac14d5
...
...
@@ -24,9 +24,10 @@ Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.AutomaticCompletion
<
ImportingConstructor
>
Friend
Sub
New
(
undoRegistry
As
ITextUndoHistoryRegistry
,
editorOperations
As
IEditorOperationsFactoryService
)
editorOperations
As
IEditorOperationsFactoryService
,
asyncCompletionBroker
As
IAsyncCompletionBroker
)
MyBase
.
New
(
undoRegistry
,
editorOperations
)
MyBase
.
New
(
undoRegistry
,
editorOperations
,
asyncCompletionBroker
)
End
Sub
Protected
Overrides
Sub
NextAction
(
editorOperation
As
IEditorOperations
,
nextAction
As
Action
)
...
...
src/EditorFeatures/VisualBasicTest/AutomaticCompletion/AutomaticLineEnderTests.vb
浏览文件 @
62ac14d5
...
...
@@ -7,6 +7,7 @@ Imports Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
Imports
Microsoft.CodeAnalysis.Editor.VisualBasic.AutomaticCompletion
Imports
Microsoft.CodeAnalysis.Editor.VisualBasic.EndConstructGeneration
Imports
Microsoft.VisualStudio.Commanding
Imports
Microsoft.VisualStudio.Language.Intellisense.AsyncCompletion
Imports
Microsoft.VisualStudio.Text.Editor.Commanding.Commands
Imports
Microsoft.VisualStudio.Text.Operations
...
...
@@ -245,10 +246,11 @@ End Module
Friend
Overrides
Function
CreateCommandHandler
(
undoRegistry
As
ITextUndoHistoryRegistry
,
editorOperations
As
IEditorOperationsFactoryService
editorOperations
As
IEditorOperationsFactoryService
,
asyncCompletionBroker
As
IAsyncCompletionBroker
)
As
IChainedCommandHandler
(
Of
AutomaticLineEnderCommandArgs
)
Return
New
AutomaticLineEnderCommandHandler
(
undoRegistry
,
editorOperations
)
Return
New
AutomaticLineEnderCommandHandler
(
undoRegistry
,
editorOperations
,
asyncCompletionBroker
)
End
Function
Protected
Overrides
Function
CreateNextHandler
(
workspace
As
TestWorkspace
)
As
Action
...
...
src/Features/Core/Portable/Completion/CommonCompletionProvider.cs
浏览文件 @
62ac14d5
...
...
@@ -18,7 +18,7 @@ public override bool ShouldTriggerCompletion(SourceText text, int position, Comp
{
switch
(
trigger
.
Kind
)
{
case
CompletionTriggerKind
.
Insertion
:
case
CompletionTriggerKind
.
Insertion
when
position
>
0
:
var
insertedCharacterPosition
=
position
-
1
;
return
this
.
IsInsertionTrigger
(
text
,
insertedCharacterPosition
,
options
);
...
...
src/Interactive/EditorFeatures/CSharp/Microsoft.CodeAnalysis.CSharp.InteractiveEditorFeatures.csproj
浏览文件 @
62ac14d5
...
...
@@ -5,7 +5,6 @@
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.Editor.CSharp
</RootNamespace>
<TargetFramework>
net472
</TargetFramework>
<ApplyPartialNgenOptimization>
true
</ApplyPartialNgenOptimization>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ProjectReference
Include=
"..\..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj"
/>
...
...
src/Interactive/EditorFeatures/Core/Microsoft.CodeAnalysis.InteractiveEditorFeatures.csproj
浏览文件 @
62ac14d5
...
...
@@ -5,7 +5,6 @@
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.Editor
</RootNamespace>
<TargetFramework>
net472
</TargetFramework>
<ApplyPartialNgenOptimization>
true
</ApplyPartialNgenOptimization>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ProjectReference
Include=
"..\..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj"
/>
...
...
src/Interactive/Features/Microsoft.CodeAnalysis.InteractiveFeatures.csproj
浏览文件 @
62ac14d5
...
...
@@ -5,7 +5,6 @@
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis
</RootNamespace>
<TargetFramework>
net472
</TargetFramework>
<ApplyPartialNgenOptimization>
true
</ApplyPartialNgenOptimization>
</PropertyGroup>
<ItemGroup
Label=
"Project References"
>
<ProjectReference
Include=
"..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj"
/>
...
...
src/NuGet/Microsoft.Net.Compilers.Toolset/DesktopCompilerArtifacts.targets
浏览文件 @
62ac14d5
...
...
@@ -57,6 +57,7 @@
<_NoOptimizationData
Include=
"$(ArtifactsBinDir)csi\$(Configuration)\net472\System.Buffers.dll"
/>
<_NoOptimizationData
Include=
"$(ArtifactsBinDir)csi\$(Configuration)\net472\System.Memory.dll"
/>
<_NoOptimizationData
Include=
"$(ArtifactsBinDir)csi\$(Configuration)\net472\System.Numerics.Vectors.dll"
/>
<_NoOptimizationData
Include=
"$(ArtifactsBinDir)csi\$(Configuration)\net472\System.Text.Encoding.CodePages.dll"
/>
<!--
System.Numerics.Vector requires JIT, since its size is dynamic and based on the underlying CPU support.
...
...
src/Setup/DevDivInsertionFiles/DevDivInsertionFiles.csproj
浏览文件 @
62ac14d5
...
...
@@ -56,7 +56,8 @@
<ExpectedDependency
Include=
"System.Reflection.Metadata"
OptimizeAssemblies=
"lib/netstandard2.0/System.Reflection.Metadata.dll"
UnsignAssemblies=
"lib/netstandard1.1/System.Reflection.Metadata.dll"
/>
<ExpectedDependency
Include=
"System.Memory"
/>
<ExpectedDependency
Include=
"System.Runtime.CompilerServices.Unsafe"
OptimizeAssemblies=
"lib/netstandard2.0/System.Runtime.CompilerServices.Unsafe.dll"
/>
<ExpectedDependency
Include=
"System.Text.Encoding.CodePages"
OptimizeAssemblies=
"lib/netstandard2.0/System.Text.Encoding.CodePages.dll"
/>
<!-- We do not have a training scenario that covers lib/netstandard2.0/System.Text.Encoding.CodePages.dll -->
<ExpectedDependency
Include=
"System.Text.Encoding.CodePages"
/>
<ExpectedDependency
Include=
"System.Numerics.Vectors"
/>
<!--
...
...
src/VisualStudio/IntegrationTest/IntegrationTests/CSharp/CSharpIntelliSense.cs
浏览文件 @
62ac14d5
...
...
@@ -251,8 +251,7 @@ void Main(string[] args)
assertCaretPosition
:
true
);
}
// 🐛 This should work with async completion, but currently does not.
[
ConditionalWpfFact
(
typeof
(
LegacyCompletionCondition
)),
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WorkItem
(
33823
,
"https://github.com/dotnet/roslyn/issues/33823"
)]
public
void
CommitOnShiftEnter
()
{
...
...
@@ -333,7 +332,7 @@ class Class1
assertCaretPosition
:
true
);
}
[
ConditionalWpfFact
(
typeof
(
LegacyCompletionCondition
))
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WpfFact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
Completion
)]
[
WorkItem
(
33822
,
"https://github.com/dotnet/roslyn/issues/33822"
)]
public
void
EnsureTheCaretIsVisibleAfterALongEdit
()
{
...
...
src/VisualStudio/IntegrationTest/IntegrationTests/VisualBasic/BasicEditAndContinue.cs
浏览文件 @
62ac14d5
...
...
@@ -199,8 +199,7 @@ public void MultiProjectDebuggingWhereNotAllModulesAreLoaded()
VisualStudio
.
ErrorList
.
Verify
.
NoErrors
();
}
// 🐛 This test crashes when async completion is enabled
[
ConditionalWpfFact
(
typeof
(
LegacyCompletionCondition
))]
[
WpfFact
]
[
WorkItem
(
33829
,
"https://github.com/dotnet/roslyn/issues/33829"
)]
public
void
DocumentStateTrackingReadonlyInRunMode
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录