Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs')
-rw-r--r--main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs33
1 files changed, 19 insertions, 14 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs
index f53c921949..81045c5e5c 100644
--- a/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs
+++ b/main/src/addins/MonoDevelop.SourceEditor2/VSEditor/Language/Impl/Intellisense/IntellisenseSessionStack.cs
@@ -1,4 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -8,6 +8,10 @@ using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Windows.Input;
using Microsoft.VisualStudio.Text.Editor;
+using MonoDevelop.SourceEditor;
+
+// this conflicts with the new editor, but it's internal and will be removed
+#pragma warning disable CS0436 // Type conflicts with imported type
namespace Microsoft.VisualStudio.Language.Intellisense.Implementation
{
@@ -51,10 +55,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.Implementation
private IMdTextView _textView;
private StackList<IIntellisenseSession> _sessions = new StackList<IIntellisenseSession>();
private ReadOnlyObservableCollection<IIntellisenseSession> _readOnlySessions;
- private Dictionary<IIntellisenseSession, ISpaceReservationAgent> _reservationAgentIndex =
- new Dictionary<IIntellisenseSession, ISpaceReservationAgent>();
- private Dictionary<ISpaceReservationAgent, ISpaceReservationManager> _reservationManagerIndex =
- new Dictionary<ISpaceReservationAgent, ISpaceReservationManager>();
+ private Dictionary<IIntellisenseSession, IMDSpaceReservationAgent> _reservationAgentIndex =
+ new Dictionary<IIntellisenseSession, IMDSpaceReservationAgent>();
+ private Dictionary<IMDSpaceReservationAgent, IMDSpaceReservationManager> _reservationManagerIndex =
+ new Dictionary<IMDSpaceReservationAgent, IMDSpaceReservationManager>();
private IIntellisenseSession _keyboardSession;
private IIntellisenseSession _sessionBeingRehosted;
@@ -101,8 +105,9 @@ namespace Microsoft.VisualStudio.Language.Intellisense.Implementation
// Subscribe to events on this new session
session.Dismissed += this.OnSessionDismissed;
- session.PresenterChanged += this.OnSessionPresenterChanged;
- IPopupIntellisensePresenter popupPresenter = session.Presenter as IPopupIntellisensePresenter;
+ session.PresenterChanged += this.OnSessionPresenterChanged;
+
+ IPopupIntellisensePresenter popupPresenter = session.Presenter as IPopupIntellisensePresenter;
if (popupPresenter != null)
{
popupPresenter.SurfaceElementChanged += this.OnPresenterSurfaceElementChanged;
@@ -205,7 +210,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.Implementation
return false;
}
- private void OnSpaceReservationManager_AgentChanged(object sender, SpaceReservationAgentChangedEventArgs e)
+ private void OnSpaceReservationManager_AgentChanged(object sender, MDSpaceReservationAgentChangedEventArgs e)
{
if (e.NewAgent == null)
{
@@ -412,7 +417,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.Implementation
if (popupPresenter.SurfaceElement == null)
{ return; }
- ISpaceReservationManager manager = _textView.GetSpaceReservationManager(popupPresenter.SpaceReservationManagerName);
+ IMDSpaceReservationManager manager = _textView.GetSpaceReservationManager(popupPresenter.SpaceReservationManagerName);
if (manager != null)
{
// If this is the first time we've seen this manager, subscribe to its AgentChanged event.
@@ -422,7 +427,7 @@ namespace Microsoft.VisualStudio.Language.Intellisense.Implementation
manager.AgentChanged += this.OnSpaceReservationManager_AgentChanged;
}
- ISpaceReservationAgent agent = manager.CreatePopupAgent(popupPresenter.PresentationSpan,
+ IMDSpaceReservationAgent agent = manager.CreatePopupAgent(popupPresenter.PresentationSpan,
popupPresenter.PopupStyles,
popupPresenter.SurfaceElement);
@@ -463,10 +468,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.Implementation
try
{
- ISpaceReservationAgent oldAgent = null;
+ IMDSpaceReservationAgent oldAgent = null;
if ((_reservationAgentIndex.TryGetValue(session, out oldAgent)) && (oldAgent != null))
{
- ISpaceReservationManager manager = null;
+ IMDSpaceReservationManager manager = null;
if ((_reservationManagerIndex.TryGetValue(oldAgent, out manager)) && (manager != null))
{
manager.UpdatePopupAgent(oldAgent, popupPresenter.PresentationSpan, popupPresenter.PopupStyles);
@@ -509,10 +514,10 @@ namespace Microsoft.VisualStudio.Language.Intellisense.Implementation
// Now, see if we have a popup agent for this presenter. If so, let's get rid of it. This is what will "hide" the
// popup.
- ISpaceReservationAgent agent;
+ IMDSpaceReservationAgent agent;
if ((_reservationAgentIndex.TryGetValue(session, out agent)) && (agent != null))
{
- ISpaceReservationManager manager;
+ IMDSpaceReservationManager manager;
if ((_reservationManagerIndex.TryGetValue(agent, out manager)) && (manager != null))
{
manager.RemoveAgent(agent);