Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
cdc32b73
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,发现更多精彩内容 >>
提交
cdc32b73
编写于
6月 04, 2019
作者:
D
David Barbet
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Address more feedback.
上级
ebe0a9ff
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
15 deletion
+11
-15
src/VisualStudio/Core/Def/Implementation/ProjectSystem/IRunningDocumentTableEventListener.cs
...ation/ProjectSystem/IRunningDocumentTableEventListener.cs
+1
-1
src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
...plementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
+0
-2
src/VisualStudio/Core/Def/Implementation/ProjectSystem/RunningDocumentTableEventTracker.cs
...ntation/ProjectSystem/RunningDocumentTableEventTracker.cs
+10
-10
src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.OpenFileTracker.cs
...rojectSystem/VisualStudioWorkspaceImpl.OpenFileTracker.cs
+0
-2
未找到文件。
src/VisualStudio/Core/Def/Implementation/ProjectSystem/IRunningDocumentTableEventListener.cs
浏览文件 @
cdc32b73
...
...
@@ -8,7 +8,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem
/// Defines the methods that get called by the <see cref="RunningDocumentTableEventTracker"/>
/// for getting notified about running document table events.
/// </summary>
interface
IRunningDocumentTableEventListener
inter
nal
inter
face
IRunningDocumentTableEventListener
{
void
OnCloseDocument
(
uint
docCookie
,
string
moniker
);
...
...
src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
浏览文件 @
cdc32b73
...
...
@@ -85,7 +85,6 @@ void IRunningDocumentTableEventListener.OnCloseDocument(uint docCookie, string m
void
IRunningDocumentTableEventListener
.
OnRefreshDocumentContext
(
uint
docCookie
,
string
moniker
)
{
// This event is not relevant to the misc workspace.
return
;
}
void
IRunningDocumentTableEventListener
.
OnReloadDocumentData
(
uint
docCookie
,
string
moniker
)
...
...
@@ -102,7 +101,6 @@ void IRunningDocumentTableEventListener.OnReloadDocumentData(uint docCookie, str
void
IRunningDocumentTableEventListener
.
OnBeforeOpenDocument
(
uint
docCookie
,
string
moniker
,
ITextBuffer
textBuffer
)
{
// This event is not relevant to the misc workspace.
return
;
}
void
IRunningDocumentTableEventListener
.
OnInitializedDocument
(
uint
docCookie
,
string
moniker
,
ITextBuffer
textBuffer
)
...
...
src/VisualStudio/Core/Def/Implementation/ProjectSystem/RunningDocumentTableEventTracker.cs
浏览文件 @
cdc32b73
...
...
@@ -21,21 +21,21 @@ internal sealed class RunningDocumentTableEventTracker : IVsRunningDocTableEvent
private
readonly
ForegroundThreadAffinitizedObject
_foregroundAffinitization
;
private
readonly
IVsEditorAdaptersFactoryService
_editorAdaptersFactoryService
;
private
readonly
IVsRunningDocumentTable4
_runningDocumentTable
;
private
readonly
IRunningDocumentTableEventListener
_
runningDocumentTableEventL
istener
;
private
readonly
IRunningDocumentTableEventListener
_
l
istener
;
private
uint
_runningDocumentTableEventsCookie
;
public
RunningDocumentTableEventTracker
(
IThreadingContext
threadingContext
,
IVsEditorAdaptersFactoryService
editorAdaptersFactoryService
,
IVsRunningDocumentTable4
runningDocumentTable
,
IRunningDocumentTableEventListener
runningDocumentTableEventL
istener
)
IRunningDocumentTableEventListener
l
istener
)
{
Contract
.
ThrowIfNull
(
threadingContext
);
Contract
.
ThrowIfNull
(
editorAdaptersFactoryService
);
Contract
.
ThrowIfNull
(
runningDocumentTable
);
Contract
.
ThrowIfNull
(
runningDocumentTableEventL
istener
);
Contract
.
ThrowIfNull
(
l
istener
);
_foregroundAffinitization
=
new
ForegroundThreadAffinitizedObject
(
threadingContext
,
assertIsForeground
:
true
);
_runningDocumentTable
=
runningDocumentTable
;
_editorAdaptersFactoryService
=
editorAdaptersFactoryService
;
_
runningDocumentTableEventListener
=
runningDocumentTableEventL
istener
;
_
listener
=
l
istener
;
((
IVsRunningDocumentTable
)
_runningDocumentTable
).
AdviseRunningDocTableEvents
(
this
,
out
_runningDocumentTableEventsCookie
);
}
...
...
@@ -51,7 +51,7 @@ public int OnBeforeLastDocumentUnlock(uint docCookie, uint dwRDTLockType, uint d
{
if
(
CheckPreconditions
(
docCookie
))
{
_
runningDocumentTableEventL
istener
.
OnCloseDocument
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
));
_
l
istener
.
OnCloseDocument
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
));
}
}
...
...
@@ -75,7 +75,7 @@ public int OnAfterAttributeChangeEx(uint docCookie, uint grfAttribs, IVsHierarch
{
if
(
CheckPreconditions
(
docCookie
))
{
_
runningDocumentTableEventL
istener
.
OnRenameDocument
(
docCookie
,
pszMkDocumentNew
,
pszMkDocumentOld
);
_
l
istener
.
OnRenameDocument
(
docCookie
,
pszMkDocumentNew
,
pszMkDocumentOld
);
}
}
...
...
@@ -83,7 +83,7 @@ public int OnAfterAttributeChangeEx(uint docCookie, uint grfAttribs, IVsHierarch
{
if
(
TryGetBuffer
(
docCookie
,
out
var
buffer
))
{
_
runningDocumentTableEventL
istener
.
OnInitializedDocument
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
),
buffer
);
_
l
istener
.
OnInitializedDocument
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
),
buffer
);
}
}
...
...
@@ -94,13 +94,13 @@ public int OnAfterAttributeChangeEx(uint docCookie, uint grfAttribs, IVsHierarch
{
if
(
CheckPreconditions
(
docCookie
))
{
_
runningDocumentTableEventL
istener
.
OnReloadDocumentData
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
));
_
l
istener
.
OnReloadDocumentData
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
));
}
}
if
((
grfAttribs
&
(
uint
)
__VSRDTATTRIB
.
RDTA_Hierarchy
)
!=
0
)
{
_
runningDocumentTableEventL
istener
.
OnRefreshDocumentContext
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
));
_
l
istener
.
OnRefreshDocumentContext
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
));
}
return
VSConstants
.
S_OK
;
...
...
@@ -112,7 +112,7 @@ public int OnBeforeDocumentWindowShow(uint docCookie, int fFirstShow, IVsWindowF
{
if
(
TryGetBuffer
(
docCookie
,
out
var
buffer
))
{
_
runningDocumentTableEventL
istener
.
OnBeforeOpenDocument
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
),
buffer
);
_
l
istener
.
OnBeforeOpenDocument
(
docCookie
,
_runningDocumentTable
.
GetDocumentMoniker
(
docCookie
),
buffer
);
}
}
...
...
src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.OpenFileTracker.cs
浏览文件 @
cdc32b73
...
...
@@ -101,7 +101,6 @@ void IRunningDocumentTableEventListener.OnRefreshDocumentContext(uint docCookie,
void
IRunningDocumentTableEventListener
.
OnReloadDocumentData
(
uint
docCookie
,
string
moniker
)
{
// This event is not relevant to the VS workspace open file tracker.
return
;
}
void
IRunningDocumentTableEventListener
.
OnBeforeOpenDocument
(
uint
docCookie
,
string
moniker
,
ITextBuffer
textBuffer
)
...
...
@@ -113,7 +112,6 @@ void IRunningDocumentTableEventListener.OnInitializedDocument(uint docCookie, st
void
IRunningDocumentTableEventListener
.
OnRenameDocument
(
uint
docCookie
,
string
newMoniker
,
string
oldMoniker
)
{
// This event is not relevant to the VS workspace open file tracker.
return
;
}
public
async
static
Task
<
OpenFileTracker
>
CreateAsync
(
VisualStudioWorkspaceImpl
workspace
,
IAsyncServiceProvider
asyncServiceProvider
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录