diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/IRunningDocumentTableEventListener.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/IRunningDocumentTableEventListener.cs
index dde0d68be367668ad3270e95e1ea3707ce590e42..5cf8881070c023876b44c8d1eec4e697b1ec355a 100644
--- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/IRunningDocumentTableEventListener.cs
+++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/IRunningDocumentTableEventListener.cs
@@ -8,7 +8,7 @@ namespace Microsoft.VisualStudio.LanguageServices.Implementation.ProjectSystem
/// Defines the methods that get called by the
/// for getting notified about running document table events.
///
- interface IRunningDocumentTableEventListener
+ internal interface IRunningDocumentTableEventListener
{
void OnCloseDocument(uint docCookie, string moniker);
diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
index 28726b3eea99729ceab7a99e93112ca8b0373475..9a1cb38bc096c5df2004d6a1e2abf0bd43d642ff 100644
--- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
+++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/MiscellaneousFilesWorkspace.cs
@@ -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)
diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/RunningDocumentTableEventTracker.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/RunningDocumentTableEventTracker.cs
index 38f6f04a674b1383c8ffd1a4257e5415c8ceff76..596b5df173507b3e62406984ddeee0d565526ebd 100644
--- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/RunningDocumentTableEventTracker.cs
+++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/RunningDocumentTableEventTracker.cs
@@ -21,21 +21,21 @@ internal sealed class RunningDocumentTableEventTracker : IVsRunningDocTableEvent
private readonly ForegroundThreadAffinitizedObject _foregroundAffinitization;
private readonly IVsEditorAdaptersFactoryService _editorAdaptersFactoryService;
private readonly IVsRunningDocumentTable4 _runningDocumentTable;
- private readonly IRunningDocumentTableEventListener _runningDocumentTableEventListener;
+ private readonly IRunningDocumentTableEventListener _listener;
private uint _runningDocumentTableEventsCookie;
public RunningDocumentTableEventTracker(IThreadingContext threadingContext, IVsEditorAdaptersFactoryService editorAdaptersFactoryService, IVsRunningDocumentTable4 runningDocumentTable,
- IRunningDocumentTableEventListener runningDocumentTableEventListener)
+ IRunningDocumentTableEventListener listener)
{
Contract.ThrowIfNull(threadingContext);
Contract.ThrowIfNull(editorAdaptersFactoryService);
Contract.ThrowIfNull(runningDocumentTable);
- Contract.ThrowIfNull(runningDocumentTableEventListener);
+ Contract.ThrowIfNull(listener);
_foregroundAffinitization = new ForegroundThreadAffinitizedObject(threadingContext, assertIsForeground: true);
_runningDocumentTable = runningDocumentTable;
_editorAdaptersFactoryService = editorAdaptersFactoryService;
- _runningDocumentTableEventListener = runningDocumentTableEventListener;
+ _listener = listener;
((IVsRunningDocumentTable)_runningDocumentTable).AdviseRunningDocTableEvents(this, out _runningDocumentTableEventsCookie);
}
@@ -51,7 +51,7 @@ public int OnBeforeLastDocumentUnlock(uint docCookie, uint dwRDTLockType, uint d
{
if (CheckPreconditions(docCookie))
{
- _runningDocumentTableEventListener.OnCloseDocument(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie));
+ _listener.OnCloseDocument(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie));
}
}
@@ -75,7 +75,7 @@ public int OnAfterAttributeChangeEx(uint docCookie, uint grfAttribs, IVsHierarch
{
if (CheckPreconditions(docCookie))
{
- _runningDocumentTableEventListener.OnRenameDocument(docCookie, pszMkDocumentNew, pszMkDocumentOld);
+ _listener.OnRenameDocument(docCookie, pszMkDocumentNew, pszMkDocumentOld);
}
}
@@ -83,7 +83,7 @@ public int OnAfterAttributeChangeEx(uint docCookie, uint grfAttribs, IVsHierarch
{
if (TryGetBuffer(docCookie, out var buffer))
{
- _runningDocumentTableEventListener.OnInitializedDocument(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie), buffer);
+ _listener.OnInitializedDocument(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie), buffer);
}
}
@@ -94,13 +94,13 @@ public int OnAfterAttributeChangeEx(uint docCookie, uint grfAttribs, IVsHierarch
{
if (CheckPreconditions(docCookie))
{
- _runningDocumentTableEventListener.OnReloadDocumentData(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie));
+ _listener.OnReloadDocumentData(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie));
}
}
if ((grfAttribs & (uint)__VSRDTATTRIB.RDTA_Hierarchy) != 0)
{
- _runningDocumentTableEventListener.OnRefreshDocumentContext(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie));
+ _listener.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))
{
- _runningDocumentTableEventListener.OnBeforeOpenDocument(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie), buffer);
+ _listener.OnBeforeOpenDocument(docCookie, _runningDocumentTable.GetDocumentMoniker(docCookie), buffer);
}
}
diff --git a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.OpenFileTracker.cs b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.OpenFileTracker.cs
index 93d6e8d6afc91b6d9f089dd6494b120b215bd5c0..75522f6b392785199250e045872680fc6ac4f1f8 100644
--- a/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.OpenFileTracker.cs
+++ b/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.OpenFileTracker.cs
@@ -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 CreateAsync(VisualStudioWorkspaceImpl workspace, IAsyncServiceProvider asyncServiceProvider)