Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET
Roslyn
提交
f07ef511
R
Roslyn
项目概览
dotNET
/
Roslyn
通知
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,发现更多精彩内容 >>
提交
f07ef511
编写于
5月 31, 2017
作者:
S
Sam Harwell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Pass a project when creating an invisible editor
上级
10899a37
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
5 deletion
+6
-5
src/VisualStudio/Core/Def/Implementation/FindReferences/VisualStudioDefinitionsAndReferencesFactory.cs
...References/VisualStudioDefinitionsAndReferencesFactory.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/ProjectSystem/InvisibleEditor.cs
.../Core/Def/Implementation/ProjectSystem/InvisibleEditor.cs
+3
-2
src/VisualStudio/Core/Impl/CodeModel/TextManagerAdapter.cs
src/VisualStudio/Core/Impl/CodeModel/TextManagerAdapter.cs
+1
-1
src/VisualStudio/Core/Impl/RoslynVisualStudioWorkspace.cs
src/VisualStudio/Core/Impl/RoslynVisualStudioWorkspace.cs
+1
-1
未找到文件。
src/VisualStudio/Core/Def/Implementation/FindReferences/VisualStudioDefinitionsAndReferencesFactory.cs
浏览文件 @
f07ef511
...
...
@@ -64,7 +64,7 @@ public VisualStudioDefinitionsAndReferencesFactory(SVsServiceProvider servicePro
private
string
GetSourceLine
(
string
filePath
,
int
lineNumber
)
{
using
(
var
invisibleEditor
=
new
InvisibleEditor
(
_serviceProvider
,
filePath
,
needsSave
:
false
,
needsUndoDisabled
:
false
))
_serviceProvider
,
filePath
,
projectOpt
:
null
,
needsSave
:
false
,
needsUndoDisabled
:
false
))
{
var
vsTextLines
=
invisibleEditor
.
VsTextLines
;
if
(
vsTextLines
!=
null
&&
...
...
src/VisualStudio/Core/Def/Implementation/ProjectSystem/InvisibleEditor.cs
浏览文件 @
f07ef511
...
...
@@ -28,15 +28,16 @@ internal partial class InvisibleEditor : IInvisibleEditor
private
OLE
.
Interop
.
IOleUndoManager
_manager
;
private
readonly
bool
_needsUndoRestored
;
public
InvisibleEditor
(
IServiceProvider
serviceProvider
,
string
filePath
,
bool
needsSave
,
bool
needsUndoDisabled
)
public
InvisibleEditor
(
IServiceProvider
serviceProvider
,
string
filePath
,
IVisualStudioHostProject
projectOpt
,
bool
needsSave
,
bool
needsUndoDisabled
)
{
_serviceProvider
=
serviceProvider
;
_filePath
=
filePath
;
_needsSave
=
needsSave
;
var
invisibleEditorManager
=
(
IIntPtrReturningVsInvisibleEditorManager
)
serviceProvider
.
GetService
(
typeof
(
SVsInvisibleEditorManager
));
var
vsProject
=
projectOpt
?.
Hierarchy
as
IVsProject
;
var
invisibleEditorPtr
=
IntPtr
.
Zero
;
Marshal
.
ThrowExceptionForHR
(
invisibleEditorManager
.
RegisterInvisibleEditor
(
filePath
,
null
,
0
,
null
,
out
invisibleEditorPtr
));
Marshal
.
ThrowExceptionForHR
(
invisibleEditorManager
.
RegisterInvisibleEditor
(
filePath
,
vsProject
,
0
,
null
,
out
invisibleEditorPtr
));
try
{
...
...
src/VisualStudio/Core/Impl/CodeModel/TextManagerAdapter.cs
浏览文件 @
f07ef511
...
...
@@ -17,7 +17,7 @@ public EnvDTE.TextPoint CreateTextPoint(FileCodeModel fileCodeModel, VirtualTree
return
null
;
}
using
(
var
invisibleEditor
=
new
InvisibleEditor
(
fileCodeModel
.
ServiceProvider
,
hostDocument
.
FilePath
,
needsSave
:
false
,
needsUndoDisabled
:
false
))
using
(
var
invisibleEditor
=
new
InvisibleEditor
(
fileCodeModel
.
ServiceProvider
,
hostDocument
.
FilePath
,
hostDocument
.
Project
,
needsSave
:
false
,
needsUndoDisabled
:
false
))
{
var
vsTextLines
=
invisibleEditor
.
VsTextLines
;
...
...
src/VisualStudio/Core/Impl/RoslynVisualStudioWorkspace.cs
浏览文件 @
f07ef511
...
...
@@ -143,7 +143,7 @@ internal override IInvisibleEditor OpenInvisibleEditor(IVisualStudioHostDocument
}
}
return
new
InvisibleEditor
(
DeferredState
.
ServiceProvider
,
hostDocument
.
FilePath
,
needsSave
,
needsUndoDisabled
);
return
new
InvisibleEditor
(
DeferredState
.
ServiceProvider
,
hostDocument
.
FilePath
,
hostDocument
.
Project
,
needsSave
,
needsUndoDisabled
);
}
private
static
bool
TryResolveSymbol
(
ISymbol
symbol
,
Project
project
,
CancellationToken
cancellationToken
,
out
ISymbol
resolvedSymbol
,
out
Project
resolvedProject
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录