提交 2f206670 编写于 作者: J Jason Malinowski

Don't open an editable invisible editor when locating nodes

We implement GetStartPoint in a two step process: locate the point
directly from the tree, and then take that point and get an
EnvDTE.TextPoint from it. In the first step we were opening an editable
invisible editor for for no good reason, which was causing us to check
out files from source control. The second step does require an invisible
editor (since EnvDTE.TextPoint is implemented by the shims) but that we
were already opting out of an editable editor for.

Going through source control, we used to open an editor for the first
step because at the time we were grabbing tab settings which required
the editor to be open, but that's no longer the case.
上级 3cd56727
......@@ -152,7 +152,7 @@ public EnvDTE.TextPoint StartPoint
{
get
{
var point = FileCodeModel.EnsureEditor(() => CodeModelService.GetStartPoint(LookupNode()));
var point = CodeModelService.GetStartPoint(LookupNode());
if (point == null)
{
return null;
......@@ -178,7 +178,7 @@ public EnvDTE.TextPoint EndPoint
public virtual EnvDTE.TextPoint GetStartPoint(EnvDTE.vsCMPart part)
{
var point = FileCodeModel.EnsureEditor(() => CodeModelService.GetStartPoint(LookupNode(), part));
var point = CodeModelService.GetStartPoint(LookupNode(), part);
if (point == null)
{
return null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册