Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
33f3458d
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,发现更多精彩内容 >>
提交
33f3458d
编写于
4月 11, 2016
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
You should be able to navigate to items that are in generated code.
上级
39233d4c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
6 deletion
+8
-6
src/EditorFeatures/CSharpTest/NavigateTo/NavigateToTests.cs
src/EditorFeatures/CSharpTest/NavigateTo/NavigateToTests.cs
+5
-3
src/EditorFeatures/Core/Extensibility/Navigation/NavigableItemFactory.cs
...res/Core/Extensibility/Navigation/NavigableItemFactory.cs
+2
-1
src/EditorFeatures/Core/Implementation/NavigateTo/NavigateToSymbolFinder.cs
.../Core/Implementation/NavigateTo/NavigateToSymbolFinder.cs
+1
-2
未找到文件。
src/EditorFeatures/CSharpTest/NavigateTo/NavigateToTests.cs
浏览文件 @
33f3458d
...
...
@@ -840,8 +840,9 @@ public async Task DottedPattern7()
}
[
WorkItem
(
1174255
,
"http://vstfdevdiv:8080/DevDiv2/DevDiv/_workitems/edit/1174255"
)]
[
WorkItem
(
8009
,
"https://github.com/dotnet/roslyn/issues/8009"
)]
[
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
NavigateTo
)]
public
async
Task
N
oNavigation
ToGeneratedFiles
()
public
async
Task
N
avigate
ToGeneratedFiles
()
{
using
(
var
workspace
=
await
TestWorkspace
.
CreateAsync
(
@"
<Workspace>
...
...
@@ -860,7 +861,7 @@ namespace N
{
public partial class C
{
public void VisibleMethod_
Not
() { }
public void VisibleMethod_
Generated
() { }
}
}
</Document>
...
...
@@ -876,7 +877,8 @@ public partial class C
var
items
=
_aggregator
.
GetItems
(
"VisibleMethod"
);
var
expectedItems
=
new
List
<
NavigateToItem
>()
{
new
NavigateToItem
(
"VisibleMethod"
,
NavigateToItemKind
.
Method
,
"csharp"
,
null
,
null
,
MatchKind
.
Exact
,
true
,
null
)
new
NavigateToItem
(
"VisibleMethod"
,
NavigateToItemKind
.
Method
,
"csharp"
,
null
,
null
,
MatchKind
.
Exact
,
true
,
null
),
new
NavigateToItem
(
"VisibleMethod_Generated"
,
NavigateToItemKind
.
Method
,
"csharp"
,
null
,
null
,
MatchKind
.
Prefix
,
true
,
null
)
};
// The pattern matcher should match 'VisibleMethod' to both 'VisibleMethod' and 'VisibleMethod_Not', except that
...
...
src/EditorFeatures/Core/Extensibility/Navigation/NavigableItemFactory.cs
浏览文件 @
33f3458d
...
...
@@ -29,7 +29,8 @@ public static IEnumerable<INavigableItem> GetItemsFromPreferredSourceLocations(S
return
locations
.
Select
(
loc
=>
GetItemFromSymbolLocation
(
solution
,
symbol
,
loc
,
displayString
));
}
public
static
IEnumerable
<
Location
>
GetPreferredSourceLocations
(
Solution
solution
,
ISymbol
symbol
)
public
static
IEnumerable
<
Location
>
GetPreferredSourceLocations
(
Solution
solution
,
ISymbol
symbol
)
{
// Prefer non-generated source locations over generated ones.
...
...
src/EditorFeatures/Core/Implementation/NavigateTo/NavigateToSymbolFinder.cs
浏览文件 @
33f3458d
...
...
@@ -16,11 +16,10 @@ internal static class NavigateToSymbolFinder
{
internal
static
async
Task
<
IEnumerable
<
ValueTuple
<
DeclaredSymbolInfo
,
Document
,
IEnumerable
<
PatternMatch
>>>>
FindNavigableDeclaredSymbolInfos
(
Project
project
,
string
pattern
,
CancellationToken
cancellationToken
)
{
var
generatedCodeRecognitionService
=
project
.
LanguageServices
.
WorkspaceServices
.
GetService
<
IGeneratedCodeRecognitionService
>();
var
patternMatcher
=
new
PatternMatcher
(
pattern
);
var
result
=
new
List
<
ValueTuple
<
DeclaredSymbolInfo
,
Document
,
IEnumerable
<
PatternMatch
>>>();
foreach
(
var
document
in
project
.
Documents
.
Where
(
d
=>
!
generatedCodeRecognitionService
?.
IsGeneratedCode
(
d
)
??
true
)
)
foreach
(
var
document
in
project
.
Documents
)
{
cancellationToken
.
ThrowIfCancellationRequested
();
var
declaredSymbolInfos
=
await
document
.
GetDeclaredSymbolInfosAsync
(
cancellationToken
).
ConfigureAwait
(
false
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录