Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
2945d193
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,发现更多精彩内容 >>
提交
2945d193
编写于
3月 08, 2019
作者:
S
Sam Harwell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Implement Find Symbol References API for VsDebugPresentationPackage
上级
a2acd415
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
116 addition
and
0 deletion
+116
-0
Roslyn.sln
Roslyn.sln
+7
-0
src/EditorFeatures/Core/Microsoft.CodeAnalysis.EditorFeatures.csproj
...eatures/Core/Microsoft.CodeAnalysis.EditorFeatures.csproj
+1
-0
src/Tools/ExternalAccess/VsDebugPresentationPackage/DebuggerFindReferencesService.cs
...DebugPresentationPackage/DebuggerFindReferencesService.cs
+64
-0
src/Tools/ExternalAccess/VsDebugPresentationPackage/Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage.csproj
...Analysis.ExternalAccess.VsDebugPresentationPackage.csproj
+36
-0
src/Tools/ExternalAccess/VsDebugPresentationPackage/PublicAPI.Shipped.txt
...alAccess/VsDebugPresentationPackage/PublicAPI.Shipped.txt
+0
-0
src/Tools/ExternalAccess/VsDebugPresentationPackage/PublicAPI.Unshipped.txt
...Access/VsDebugPresentationPackage/PublicAPI.Unshipped.txt
+0
-0
src/VisualStudio/Setup/AssemblyRedirects.cs
src/VisualStudio/Setup/AssemblyRedirects.cs
+1
-0
src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj
src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj
+5
-0
src/VisualStudio/Setup/source.extension.vsixmanifest
src/VisualStudio/Setup/source.extension.vsixmanifest
+1
-0
src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
...es/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
+1
-0
未找到文件。
Roslyn.sln
浏览文件 @
2945d193
...
...
@@ -410,6 +410,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.Exte
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Net.Compilers.Toolset.Package", "src\NuGet\Microsoft.Net.Compilers.Toolset\Microsoft.Net.Compilers.Toolset.Package.csproj", "{A74C7D2E-92FA-490A-B80A-28BEF56B56FC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage", "src\Tools\ExternalAccess\VsDebugPresentationPackage\Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage.csproj", "{655A5B07-39B8-48CD-8590-8AC0C2B708D8}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
src\Compilers\VisualBasic\BasicAnalyzerDriver\BasicAnalyzerDriver.projitems*{2523d0e6-df32-4a3e-8ae0-a19bffae2ef6}*SharedItemsImports = 4
...
...
@@ -1079,6 +1081,10 @@ Global
{A74C7D2E-92FA-490A-B80A-28BEF56B56FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A74C7D2E-92FA-490A-B80A-28BEF56B56FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A74C7D2E-92FA-490A-B80A-28BEF56B56FC}.Release|Any CPU.Build.0 = Release|Any CPU
{655A5B07-39B8-48CD-8590-8AC0C2B708D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{655A5B07-39B8-48CD-8590-8AC0C2B708D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{655A5B07-39B8-48CD-8590-8AC0C2B708D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{655A5B07-39B8-48CD-8590-8AC0C2B708D8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
@@ -1271,6 +1277,7 @@ Global
{2FB6C157-DF91-4B1C-9827-A4D1C08C73EC} = {8977A560-45C2-4EC2-A849-97335B382C74}
{1638FB04-0298-4341-B5E0-8A13B4823C81} = {8977A560-45C2-4EC2-A849-97335B382C74}
{A74C7D2E-92FA-490A-B80A-28BEF56B56FC} = {C52D8057-43AF-40E6-A01B-6CDBB7301985}
{655A5B07-39B8-48CD-8590-8AC0C2B708D8} = {8977A560-45C2-4EC2-A849-97335B382C74}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {604E6B91-7BC0-4126-AE07-D4D2FEFC3D29}
...
...
src/EditorFeatures/Core/Microsoft.CodeAnalysis.EditorFeatures.csproj
浏览文件 @
2945d193
...
...
@@ -38,6 +38,7 @@
<InternalsVisibleTo
Include=
"InteractiveHost"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.CSharp.EditorFeatures"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.EditorFeatures.Wpf"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.VisualBasic.EditorFeatures"
/>
<InternalsVisibleTo
Include=
"Microsoft.VisualStudio.LanguageServices"
/>
<InternalsVisibleTo
Include=
"Microsoft.VisualStudio.LanguageServices.CSharp"
/>
...
...
src/Tools/ExternalAccess/VsDebugPresentationPackage/DebuggerFindReferencesService.cs
0 → 100644
浏览文件 @
2945d193
// 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.Composition
;
using
System.Linq
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
Microsoft.CodeAnalysis.Editor
;
using
Microsoft.CodeAnalysis.Editor.FindUsages
;
using
Microsoft.CodeAnalysis.Editor.Host
;
using
Microsoft.CodeAnalysis.Editor.Shared.Utilities
;
using
Microsoft.CodeAnalysis.Host.Mef
;
namespace
Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage
{
[
Export
]
[
Shared
]
internal
sealed
class
DebuggerFindReferencesService
{
private
readonly
IThreadingContext
_threadingContext
;
private
readonly
IEnumerable
<
Lazy
<
IStreamingFindUsagesPresenter
>>
_streamingPresenters
;
[
ImportingConstructor
]
[
Obsolete
(
MefConstruction
.
ImportingConstructorMessage
,
error
:
true
)]
public
DebuggerFindReferencesService
(
IThreadingContext
threadingContext
,
[
ImportMany
]
IEnumerable
<
Lazy
<
IStreamingFindUsagesPresenter
>>
streamingPresenters
)
{
_threadingContext
=
threadingContext
;
_streamingPresenters
=
streamingPresenters
;
}
public
async
Task
FindSymbolReferencesAsync
(
ISymbol
symbol
,
Project
project
,
CancellationToken
cancellationToken
)
{
var
streamingPresenter
=
GetStreamingPresenter
();
// Let the presenter know we're starting a search. It will give us back
// the context object that the FAR service will push results into.
var
context
=
streamingPresenter
.
StartSearch
(
EditorFeaturesResources
.
Find_References
,
supportsReferences
:
true
);
await
AbstractFindUsagesService
.
FindSymbolReferencesAsync
(
_threadingContext
,
context
,
symbol
,
project
,
cancellationToken
).
ConfigureAwait
(
false
);
// Note: we don't need to put this in a finally. The only time we might not hit
// this is if cancellation or another error gets thrown. In the former case,
// that means that a new search has started. We don't care about telling the
// context it has completed. In the latter case something wrong has happened
// and we don't want to run any more code in this particular context.
await
context
.
OnCompletedAsync
().
ConfigureAwait
(
false
);
}
private
IStreamingFindUsagesPresenter
GetStreamingPresenter
()
{
try
{
return
_streamingPresenters
.
FirstOrDefault
()?.
Value
;
}
catch
{
return
null
;
}
}
}
}
src/Tools/ExternalAccess/VsDebugPresentationPackage/Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage.csproj
0 → 100644
浏览文件 @
2945d193
<?xml version="1.0" encoding="utf-8"?>
<Project
Sdk=
"Microsoft.NET.Sdk"
>
<PropertyGroup>
<OutputType>
Library
</OutputType>
<RootNamespace>
Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage
</RootNamespace>
<TargetFramework>
net472
</TargetFramework>
<!-- NuGet -->
<IsPackable>
true
</IsPackable>
<PackageId>
Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage
</PackageId>
<PackageDescription>
A supporting package for VsDebugPresentationPackage:
[needs link]
</PackageDescription>
</PropertyGroup>
<ItemGroup>
<!--
⚠ ONLY VSDEBUGPRESENTATIONPACKAGE ASSEMBLIES MAY BE ADDED HERE ⚠
-->
<InternalsVisibleTo
Include=
"Microsoft.VisualStudio.Debugger.VsDebugPresentationPackage"
Key=
"$(VsDebugPresentationPackageKey)"
/>
</ItemGroup>
<ItemGroup>
<ProjectReference
Include=
"..\..\..\Compilers\Core\Portable\Microsoft.CodeAnalysis.csproj"
/>
<ProjectReference
Include=
"..\..\..\EditorFeatures\Core\Microsoft.CodeAnalysis.EditorFeatures.csproj"
/>
<ProjectReference
Include=
"..\..\..\Workspaces\Core\Portable\Microsoft.CodeAnalysis.Workspaces.csproj"
/>
</ItemGroup>
<ItemGroup>
<PublicAPI
Include=
"PublicAPI.Shipped.txt"
/>
<PublicAPI
Include=
"PublicAPI.Unshipped.txt"
/>
</ItemGroup>
</Project>
\ No newline at end of file
src/Tools/ExternalAccess/VsDebugPresentationPackage/PublicAPI.Shipped.txt
0 → 100644
浏览文件 @
2945d193
src/Tools/ExternalAccess/VsDebugPresentationPackage/PublicAPI.Unshipped.txt
0 → 100644
浏览文件 @
2945d193
src/VisualStudio/Setup/AssemblyRedirects.cs
浏览文件 @
2945d193
...
...
@@ -30,6 +30,7 @@
[
assembly
:
ProvideRoslynBindingRedirection
(
"Microsoft.CodeAnalysis.ExternalAccess.FSharp.dll"
)]
[
assembly
:
ProvideRoslynBindingRedirection
(
"Microsoft.CodeAnalysis.ExternalAccess.Razor.dll"
)]
[
assembly
:
ProvideRoslynBindingRedirection
(
"Microsoft.CodeAnalysis.ExternalAccess.TypeScript.dll"
)]
[
assembly
:
ProvideRoslynBindingRedirection
(
"Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage.dll"
)]
[
assembly
:
ProvideRoslynBindingRedirection
(
"Microsoft.CodeAnalysis.Elfie.dll"
)]
...
...
src/VisualStudio/Setup/Roslyn.VisualStudio.Setup.csproj
浏览文件 @
2945d193
...
...
@@ -49,6 +49,11 @@
<IncludeOutputGroupsInVSIX>
BuiltProjectOutputGroup
</IncludeOutputGroupsInVSIX>
<ForceIncludeInVSIX>
true
</ForceIncludeInVSIX>
</ProjectReference>
<ProjectReference
Include=
"..\..\Tools\ExternalAccess\VsDebugPresentationPackage\Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage.csproj"
>
<Name>
Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage
</Name>
<IncludeOutputGroupsInVSIX>
BuiltProjectOutputGroup
</IncludeOutputGroupsInVSIX>
<ForceIncludeInVSIX>
true
</ForceIncludeInVSIX>
</ProjectReference>
<ProjectReference
Include=
"..\..\Workspaces\Core\Desktop\Microsoft.CodeAnalysis.Workspaces.Desktop.csproj"
>
<Name>
Workspaces.Desktop
</Name>
<IncludeOutputGroupsInVSIX>
BuiltProjectOutputGroup;SatelliteDllsProjectOutputGroup
</IncludeOutputGroupsInVSIX>
...
...
src/VisualStudio/Setup/source.extension.vsixmanifest
浏览文件 @
2945d193
...
...
@@ -56,6 +56,7 @@
<Asset
Type=
"Microsoft.VisualStudio.Analyzer"
Path=
"Microsoft.CodeAnalysis.VisualBasic.Features.dll"
/>
<Asset
Type=
"Microsoft.VisualStudio.Analyzer"
Path=
"Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.dll"
/>
<Asset
Type=
"Microsoft.VisualStudio.Analyzer"
d:Source=
"Project"
d:ProjectName=
"XamlVisualStudio"
Path=
"|XamlVisualStudio|"
/>
<Asset
Type=
"Microsoft.VisualStudio.MefComponent"
Path=
"Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage.dll"
/>
</Assets>
<Prerequisites>
<Prerequisite
Id=
"Microsoft.VisualStudio.Component.CoreEditor"
Version=
"[15.0,17.0)"
DisplayName=
"Visual Studio core editor"
/>
...
...
src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
浏览文件 @
2945d193
...
...
@@ -232,6 +232,7 @@
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.EditorFeatures"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.EditorFeatures.Text"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.EditorFeatures.Wpf"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.ExternalAccess.VsDebugPresentationPackage"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.Features"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.InteractiveEditorFeatures"
/>
<InternalsVisibleTo
Include=
"Microsoft.CodeAnalysis.InteractiveFeatures"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录