diff --git a/src/Main/Base/Project/Src/Editor/AvalonEdit/PinLayer.cs b/src/Main/Base/Project/Src/Editor/AvalonEdit/PinLayer.cs
deleted file mode 100644
index cd9294889e..0000000000
--- a/src/Main/Base/Project/Src/Editor/AvalonEdit/PinLayer.cs
+++ /dev/null
@@ -1,225 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Data;
-using System.Windows.Input;
-using System.Windows.Media;
-
-using ICSharpCode.AvalonEdit.Editing;
-using ICSharpCode.AvalonEdit.Rendering;
-using ICSharpCode.SharpDevelop.Refactoring;
-using Services.Debugger.Tooltips;
-
-namespace Editor.AvalonEdit
-{
- ///
- /// Pin layer class. This class handles the pinning and unpinning operations.
- ///
- public class PinLayer : Layer
- {
- private Canvas pinningSurface;
-
- private double verticalOffset = 0;
-
- ///
- /// PinLayer constructor.
- ///
- /// Text area for this layer.
- public PinLayer(TextArea textArea) : base(textArea.TextView, KnownLayer.DataPins)
- {
- pinningSurface = new Canvas();
- this.Children.Add(pinningSurface);
- textView.VisualLinesChanged += new EventHandler(textView_VisualLinesChanged);
- }
-
- ///
- /// Pins an element;
- ///
- /// Element to pin.
- public void Pin(PinDebuggerControl element)
- {
- if (element == null)
- throw new NullReferenceException("Element is null!");
-
- Thumb currentThumb = new Thumb();
- // check for saved position
- if (!element.Mark.PinPosition.HasValue) {
- // this is satisfied when pinning the first time
- element.Mark.PinPosition = new Point {
- X = element.Location.X + textView.HorizontalOffset,
- Y = element.Location.Y + textView.VerticalOffset
- };
-
- Canvas.SetTop(currentThumb, element.Location.Y);
- Canvas.SetLeft(currentThumb, element.Location.X);
- }
- else {
- // this is satisfied when loading the pins - so we might have hidden pins
- element.Location = new Point {
- X = element.Mark.PinPosition.Value.X - textView.HorizontalOffset,
- Y = element.Mark.PinPosition.Value.Y - textView.VerticalOffset
- };
-
- Canvas.SetTop(currentThumb, element.Mark.PinPosition.Value.Y);
- Canvas.SetLeft(currentThumb, element.Mark.PinPosition.Value.X);
- }
-
- currentThumb.Style = element.TryFindResource("PinThumbStyle") as Style;
- currentThumb.ApplyTemplate();
- currentThumb.DragDelta += onDragDelta;
- currentThumb.DragStarted += currentThumb_DragStarted;
- currentThumb.DragCompleted += currentThumb_DragCompleted;
-
- var container = TryFindChild(currentThumb);
- container.Children.Add(element);
- pinningSurface.Children.Add(currentThumb);
- }
-
- ///
- /// Unpins an element.
- ///
- /// Element to unpin.
- public void Unpin(PinDebuggerControl element)
- {
- if (element == null)
- throw new NullReferenceException("Element is null!");
-
- foreach (var thumb in this.pinningSurface.Children) {
- PinDebuggerControl pinControl = TryFindChild((DependencyObject)thumb);
- if (pinControl != null && pinControl == element)
- {
- pinningSurface.Children.Remove((UIElement)thumb);
- break;
- }
- }
- }
-
- void textView_VisualLinesChanged(object sender, EventArgs e)
- {
- foreach (var ctrl in this.pinningSurface.Children) {
- var currentThumb = ctrl as Thumb;
- PinDebuggerControl pinControl = TryFindChild(currentThumb);
- if (pinControl != null)
- {
- // update relative location
- Point location = pinControl.Location;
- location.X -= textView.HorizontalOffset;
- location.Y += verticalOffset - textView.VerticalOffset;
-
- Canvas.SetLeft(currentThumb, location.X);
- Canvas.SetTop(currentThumb, location.Y);
-
- pinControl.Location = location;
- pinControl.Mark.PinPosition = new Point {
- X = location.X + textView.HorizontalOffset,
- Y = location.Y + textView.VerticalOffset,
- };
- }
- }
-
- verticalOffset = textView.VerticalOffset;
- }
-
- #region Mouse move
-
- void onDragDelta(object sender, DragDeltaEventArgs e)
- {
- Thumb currnetThumb = (Thumb)sender;
- currnetThumb.Cursor = Cursors.Arrow;
- double left = Canvas.GetLeft(currnetThumb) + e.HorizontalChange;
- double top = Canvas.GetTop(currnetThumb) + e.VerticalChange;
-
- Canvas.SetLeft(currnetThumb, left);
- Canvas.SetTop(currnetThumb, top);
- }
-
- void currentThumb_DragCompleted(object sender, DragCompletedEventArgs e)
- {
- Thumb currnetThumb = (Thumb)sender;
- currnetThumb.Cursor = Cursors.Arrow;
-
- var pinControl = TryFindChild(currnetThumb);
- if (pinControl != null) {
- double left = Canvas.GetLeft(currnetThumb);
- double top = Canvas.GetTop(currnetThumb);
- pinControl.Opacity = 1d;
- pinControl.Location = new Point { X = left, Y = top };
-
- // pin's position is with respect to the layer.
- pinControl.Mark.PinPosition =
- new Point
- {
- X = textView.HorizontalOffset + left,
- Y = textView.VerticalOffset + top
- };
- }
- }
-
- void currentThumb_DragStarted(object sender, DragStartedEventArgs e)
- {
- Thumb currnetThumb = (Thumb)sender;
- currnetThumb.Cursor = Cursors.Arrow;
-
- var pinControl = TryFindChild(currnetThumb);
- if (pinControl != null)
- pinControl.Opacity = 1d;
- }
-
- #endregion
-
- #region Static helpers
-
- static T TryFindChild(DependencyObject root) where T : DependencyObject
- {
- return ContextActionsControl.SearchVisualTree(root);
- }
-
- static T TryFindParent(DependencyObject child) where T : DependencyObject
- {
- if (child is T) return child as T;
-
- DependencyObject parentObject = GetParentObject(child);
- if (parentObject == null) return null;
-
- var parent = parentObject as T;
- if (parent != null && parent is T)
- {
- return parent;
- }
- else
- {
- return TryFindParent(parentObject);
- }
- }
-
- static DependencyObject GetParentObject(DependencyObject child)
- {
- if (child == null) return null;
-
- ContentElement contentElement = child as ContentElement;
- if (contentElement != null)
- {
- DependencyObject parent = ContentOperations.GetParent(contentElement);
- if (parent != null) return parent;
-
- FrameworkContentElement fce = contentElement as FrameworkContentElement;
- return fce != null ? fce.Parent : null;
- }
-
- FrameworkElement frameworkElement = child as FrameworkElement;
- if (frameworkElement != null)
- {
- DependencyObject parent = frameworkElement.Parent;
- if (parent != null) return parent;
- }
-
- return VisualTreeHelper.GetParent(child);
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerPopup.cs b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerPopup.cs
deleted file mode 100644
index 2a04967115..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerPopup.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using System;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Controls.Primitives;
-using System.Windows.Input;
-
-using ICSharpCode.Core;
-using ICSharpCode.SharpDevelop.Gui;
-
-namespace ICSharpCode.SharpDevelop.Debugging
-{
- ///
- /// Popup containing .
- ///
- public class DebuggerPopup : Popup
- {
- internal DebuggerTooltipControl contentControl;
-
- public DebuggerPopup(DebuggerTooltipControl parentControl, bool showPins = true)
- {
- this.contentControl = new DebuggerTooltipControl(parentControl, showPins);
- this.contentControl.containingPopup = this;
- this.Child = this.contentControl;
- this.IsLeaf = false;
-
- //this.KeyDown += new KeyEventHandler(DebuggerPopup_KeyDown);
-
- //this.contentControl.Focusable = true;
- //Keyboard.Focus(this.contentControl);
- //this.AllowsTransparency = true;
- //this.PopupAnimation = PopupAnimation.Slide;
- }
-
- // attempt to propagate shortcuts to main windows when Popup is focusable (needed for keyboard scrolling + editing)
- /*void DebuggerPopup_KeyDown(object sender, KeyEventArgs e)
- {
- LoggingService.Debug("Unhandled popup key down: " + e.Key);
- RaiseEventPair(WorkbenchSingleton.MainWindow, PreviewKeyDownEvent, KeyDownEvent,
- new KeyEventArgs(e.KeyboardDevice, e.InputSource, e.Timestamp, e.Key));
- }
-
- // copied from CompletionWindowBase
- static bool RaiseEventPair(UIElement target, RoutedEvent previewEvent, RoutedEvent @event, RoutedEventArgs args)
- {
- if (target == null)
- throw new ArgumentNullException("target");
- if (previewEvent == null)
- throw new ArgumentNullException("previewEvent");
- if (@event == null)
- throw new ArgumentNullException("event");
- if (args == null)
- throw new ArgumentNullException("args");
- args.RoutedEvent = previewEvent;
- target.RaiseEvent(args);
- args.RoutedEvent = @event;
- target.RaiseEvent(args);
- return args.Handled;
- }*/
-
- public IEnumerable ItemsSource
- {
- get { return this.contentControl.ItemsSource; }
- set { this.contentControl.SetItemsSource(value); }
- }
-
- private bool isLeaf;
- public bool IsLeaf
- {
- get { return isLeaf; }
- set
- {
- isLeaf = value;
- // leaf popup closes on lost focus
- this.StaysOpen = !isLeaf;
- }
- }
-
- protected override void OnClosed(EventArgs e)
- {
- base.OnClosed(e);
- if (isLeaf) {
- this.contentControl.CloseOnLostFocus();
- }
- }
-
- public void Open()
- {
- this.IsOpen = true;
- }
-
- public void CloseSelfAndChildren()
- {
- this.contentControl.CloseChildPopups();
- this.IsOpen = false;
- }
- }
-}
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml
deleted file mode 100644
index b6bd8d756a..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml
+++ /dev/null
@@ -1,225 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml.cs b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml.cs
deleted file mode 100644
index eb94a606b5..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/DebuggerTooltipControl.xaml.cs
+++ /dev/null
@@ -1,403 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-
-using ICSharpCode.Core;
-using ICSharpCode.NRefactory;
-using ICSharpCode.SharpDevelop.Bookmarks;
-using ICSharpCode.SharpDevelop.Editor;
-using ICSharpCode.SharpDevelop.Gui;
-using Services.Debugger.Tooltips;
-
-namespace ICSharpCode.SharpDevelop.Debugging
-{
- ///
- /// Default Control used as content of SharpDevelop debugger tooltips.
- ///
- public partial class DebuggerTooltipControl : UserControl, ITooltip
- {
- private const double ChildPopupOpenXOffet = 16;
- private const double ChildPopupOpenYOffet = 15;
- private const int InitialItemsCount = 12;
- private const int VisibleItemsCount = 11;
-
- private bool showPins = true;
- private LazyItemsControl lazyGrid;
- private IEnumerable itemsSource;
-
- public DebuggerTooltipControl()
- {
- InitializeComponent();
-
- Loaded += new RoutedEventHandler(OnLoaded);
- }
-
- public DebuggerTooltipControl(ITreeNode node)
- : this(new ITreeNode[] { node })
- {
-
- }
-
- public DebuggerTooltipControl(IEnumerable nodes)
- : this()
- {
- this.itemsSource = nodes;
- }
-
- public DebuggerTooltipControl(DebuggerTooltipControl parentControl, bool showPins = true)
- : this()
- {
- this.parentControl = parentControl;
- this.showPins = showPins;
- }
-
- private void OnLoaded(object sender, RoutedEventArgs e)
- {
- if (!showPins) {
- dataGrid.Columns[5].Visibility = Visibility.Collapsed;
- }
-
- SetItemsSource(this.itemsSource);
- }
-
- public event RoutedEventHandler Closed;
- protected void OnClosed()
- {
- if (this.Closed != null) {
- this.Closed(this, new RoutedEventArgs());
- }
- }
-
- public IEnumerable ItemsSource {
- get { return this.itemsSource; }
- }
-
- public void SetItemsSource(IEnumerable value) {
- this.itemsSource = value;
- this.lazyGrid = new LazyItemsControl(this.dataGrid, InitialItemsCount);
-
- // HACK for updating the pins in tooltip
- var observable = new List();
- this.itemsSource.ForEach(item => observable.Add(item));
-
- // verify if at the line of the root there's a pin bookmark
- ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider;
- var editor = provider.TextEditor;
- if (editor != null) {
- var pin = BookmarkManager.Bookmarks.Find(
- b => b is PinBookmark &&
- b.Location.Line == LogicalPosition.Line &&
- b.FileName == editor.FileName) as PinBookmark;
-
- if (pin != null) {
- observable.ForEach(item => { // TODO: find a way not to use "observable"
- if (pin.ContainsNode(item))
- item.IsPinned = true;
- });
- }
- }
-
- var source = new VirtualizingIEnumerable(observable);
- lazyGrid.ItemsSource = source;
- this.dataGrid.AddHandler(ScrollViewer.ScrollChangedEvent, new ScrollChangedEventHandler(handleScroll));
-
- if (this.lazyGrid.ItemsSourceTotalCount != null) {
- // hide up/down buttons if too few items
- btnUp.Visibility = btnDown.Visibility =
- this.lazyGrid.ItemsSourceTotalCount.Value <= VisibleItemsCount ? Visibility.Collapsed : Visibility.Visible;
- }
- }
-
- public Location LogicalPosition { get; set; }
-
- ///
- public bool ShowAsPopup
- {
- get
- {
- return true;
- }
- }
-
- ///
- public bool Close(bool mouseClick)
- {
- if (mouseClick || (!mouseClick && !isChildExpanded)) {
- CloseChildPopups();
- return true;
- } else {
- return false;
- }
- }
-
- private DebuggerPopup childPopup { get; set; }
- private DebuggerTooltipControl parentControl { get; set; }
- internal DebuggerPopup containingPopup { get; set; }
-
- bool isChildExpanded
- {
- get
- {
- return this.childPopup != null && this.childPopup.IsOpen;
- }
- }
-
- private ToggleButton expandedButton;
-
- ///
- /// Closes the child popup of this control, if it exists.
- ///
- public void CloseChildPopups()
- {
- if (this.expandedButton != null) {
- this.expandedButton.IsChecked = false;
- this.expandedButton = null;
- // nice simple example of indirect recursion
- this.childPopup.CloseSelfAndChildren();
- }
- }
-
- public void CloseOnLostFocus()
- {
- // when we close, parent becomes leaf
- if (this.containingPopup != null) {
- this.containingPopup.IsLeaf = true;
- }
- if (!this.IsMouseOver) {
- if (this.containingPopup != null) {
- this.containingPopup.IsOpen = false;
- this.containingPopup.IsLeaf = false;
- }
- if (this.parentControl != null) {
- this.parentControl.CloseOnLostFocus();
- }
- OnClosed();
- } else {
- // leaf closed because of click inside this control - stop the closing chain
- if (this.expandedButton != null && !this.expandedButton.IsMouseOver) {
- this.expandedButton.IsChecked = false;
- this.expandedButton = null;
- }
- }
- }
-
- private void btnExpander_Click(object sender, RoutedEventArgs e)
- {
- var clickedButton = (ToggleButton)e.OriginalSource;
- var clickedNode = (ITreeNode)clickedButton.DataContext;
- // use device independent units, because child popup Left/Top are in independent units
- Point buttonPos = clickedButton.PointToScreen(new Point(0, 0)).TransformFromDevice(clickedButton);
-
- if (clickedButton.IsChecked.GetValueOrDefault(false)) {
- CloseChildPopups();
- this.expandedButton = clickedButton;
-
- // open child Popup
- if (this.childPopup == null) {
- this.childPopup = new DebuggerPopup(this);
- this.childPopup.Placement = PlacementMode.Absolute;
- this.childPopup.contentControl.LogicalPosition = LogicalPosition;
- }
- if (this.containingPopup != null) {
- this.containingPopup.IsLeaf = false;
- }
- this.childPopup.IsLeaf = true;
- this.childPopup.HorizontalOffset = buttonPos.X + ChildPopupOpenXOffet;
- this.childPopup.VerticalOffset = buttonPos.Y + ChildPopupOpenYOffet;
- this.childPopup.ItemsSource = clickedNode.ChildNodes;
- this.childPopup.Open();
- } else {
- CloseChildPopups();
- }
- }
-
- private void handleScroll(object sender, ScrollChangedEventArgs e)
- {
- btnUp.IsEnabled = !this.lazyGrid.IsScrolledToStart;
- btnDown.IsEnabled = !this.lazyGrid.IsScrolledToEnd;
- }
-
- void BtnUp_Click(object sender, RoutedEventArgs e)
- {
- this.lazyGrid.ScrollViewer.ScrollUp(1);
- }
-
- void BtnDown_Click(object sender, RoutedEventArgs e)
- {
- this.lazyGrid.ScrollViewer.ScrollDown(1);
- }
-
- #region Edit value in tooltip
-
- void TextBox_KeyUp(object sender, KeyEventArgs e)
- {
- if (e.Key == Key.Escape) {
- dataGrid.Focus();
- return;
- }
-
- if (e.Key == Key.Enter) {
- dataGrid.Focus();
- // set new value
- var textBox = (TextBox)e.OriginalSource;
- var newValue = textBox.Text;
- var node = ((FrameworkElement)sender).DataContext as ITreeNode;
- SaveNewValue(node, textBox.Text);
- }
- }
-
- void TextBox_LostFocus(object sender, RoutedEventArgs e)
- {
- var textBox = (TextBox)e.OriginalSource;
- var newValue = textBox.Text;
- var node = ((FrameworkElement)sender).DataContext as ITreeNode;
- SaveNewValue(node, textBox.Text);
- }
-
- void SaveNewValue(ITreeNode node, string newValue)
- {
- if(node != null && node.SetText(newValue)) {
- // show adorner
- var adornerLayer = AdornerLayer.GetAdornerLayer(dataGrid);
- var adorners = adornerLayer.GetAdorners(dataGrid);
- if (adorners != null && adorners.Length != 0)
- adornerLayer.Remove(adorners[0]);
- SavedAdorner adorner = new SavedAdorner(dataGrid);
- adornerLayer.Add(adorner);
- }
- }
-
- #endregion
-
- #region Pining checked/unchecked
-
- void PinButton_Checked(object sender, RoutedEventArgs e)
- {
- ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider;
- var editor = provider.TextEditor;
- if (editor == null) return;
- var node = (ITreeNode)(((ToggleButton)(e.OriginalSource)).DataContext);
-
- if (!string.IsNullOrEmpty(editor.FileName)) {
-
- // verify if at the line of the root there's a pin bookmark
- var pin = BookmarkManager.Bookmarks.Find(
- b => b is PinBookmark &&
- b.LineNumber == LogicalPosition.Line &&
- b.FileName == editor.FileName) as PinBookmark;
-
- if (pin == null) {
- pin = new PinBookmark(editor.FileName, LogicalPosition);
- // show pinned DebuggerPopup
- if (pin.Popup == null) {
- pin.Popup = new PinDebuggerControl();
- pin.Popup.Mark = pin;
- Rect rect = new Rect(this.DesiredSize);
- var point = this.PointToScreen(rect.TopRight);
- pin.Popup.Location = new Point { X = 500, Y = point.Y - 150 };
- pin.Nodes.Add(node);
- }
-
- // do actions
- pin.Popup.Open();
- BookmarkManager.AddMark(pin);
- }
- else
- {
- if (!pin.ContainsNode(node))
- pin.Nodes.Add(node);
- }
-
- pin.Popup.ItemsSource = pin.Nodes;
- }
- }
-
- void PinButton_Unchecked(object sender, RoutedEventArgs e)
- {
- ITextEditorProvider provider = WorkbenchSingleton.Workbench.ActiveViewContent as ITextEditorProvider;
- var editor = provider.TextEditor;
- if (editor == null) return;
-
- if (!string.IsNullOrEmpty(editor.FileName)) {
- // remove from pinned DebuggerPopup
- var pin = BookmarkManager.Bookmarks.Find(
- b => b is PinBookmark &&
- b.LineNumber == LogicalPosition.Line &&
- b.FileName == editor.FileName) as PinBookmark;
- if (pin == null) return;
-
- ToggleButton button = (ToggleButton)e.OriginalSource;
- pin.RemoveNode((ITreeNode)button.DataContext);
- pin.Popup.ItemsSource = pin.Nodes;
- // remove if no more data pins are available
- if (pin.Nodes.Count == 0) {
- pin.Popup.Close();
-
- BookmarkManager.RemoveMark(pin);
- }
- }
- }
-
- #endregion
-
- #region Saved Adorner
-
- class SavedAdorner : Adorner
- {
- public SavedAdorner(UIElement adornedElement) : base(adornedElement)
- {
- Loaded += delegate { Show(); };
- }
-
- protected override void OnRender(DrawingContext drawingContext)
- {
- Rect adornedElementRect = new Rect(this.AdornedElement.DesiredSize);
-
- // Some arbitrary drawing implements.
- var formatedText = new FormattedText(StringParser.Parse("${res:ICSharpCode.SharpDevelop.Debugging.SavedString}"),
- CultureInfo.CurrentCulture,
- FlowDirection.LeftToRight,
- new Typeface(new FontFamily("Arial"),
- FontStyles.Normal,
- FontWeights.Black,
- FontStretches.Expanded),
- 8d,
- Brushes.Black);
-
-
- drawingContext.DrawText(formatedText,
- new Point(adornedElementRect.TopRight.X - formatedText.Width - 2,
- adornedElementRect.TopRight.Y));
- }
-
- private void Show()
- {
- DoubleAnimation animation = new DoubleAnimation();
- animation.From = 1;
- animation.To = 0;
-
- animation.Duration = new Duration(TimeSpan.FromSeconds(2));
- animation.SetValue(Storyboard.TargetProperty, this);
- animation.SetValue(Storyboard.TargetPropertyProperty, new PropertyPath(Rectangle.OpacityProperty));
-
- Storyboard board = new Storyboard();
- board.Children.Add(animation);
-
- board.Begin(this);
- }
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/LazyItemsControl.cs b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/LazyItemsControl.cs
deleted file mode 100644
index d769bfafb8..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/LazyItemsControl.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using System;
-using System.Collections.Generic;
-using System.Windows.Controls;
-
-namespace ICSharpCode.SharpDevelop.Debugging
-{
- ///
- /// ItemsControl wrapper that takes VirtualizingIEnumerable as source,
- /// and adds additional items from the source to underlying ItemsControl when scrolled to bottom.
- ///
- public class LazyItemsControl
- {
- private ItemsControl itemsControl;
- private int initialItemsCount;
-
- ///
- /// Creates new instance of LazyItemsControl.
- ///
- /// ItemsControl to wrap and add items to it when scrolled to bottom.
- /// Number of items to be initially displayed in wrapped ItemsControl.
- public LazyItemsControl(ItemsControl wrappedItemsControl, int initialItemsCount)
- {
- if (wrappedItemsControl == null)
- throw new ArgumentNullException("wrappedItemsControl");
-
- this.initialItemsCount = initialItemsCount;
- this.itemsControl = wrappedItemsControl;
- this.itemsControl.AddHandler(ScrollViewer.ScrollChangedEvent, new ScrollChangedEventHandler(handleScroll));
- }
-
- private ScrollViewer scrollViewerCached;
- public ScrollViewer ScrollViewer
- {
- get
- {
- if (this.scrollViewerCached == null)
- this.scrollViewerCached = this.itemsControl.GetScrollViewer();
- return this.scrollViewerCached;
- }
- }
-
- public bool IsScrolledToStart
- {
- get
- {
- if (ScrollViewer == null) // Visual tree not initialized yet
- return false;
- return ScrollViewer.VerticalOffset == 0;
- }
- }
-
- public bool IsScrolledToEnd
- {
- get
- {
- if (itemsSourceTotalCount == null) {
- // not scrolled to end of IEnumerable yet
- return false;
- }
- // already scrolled to end of IEnumerable
- int totalItems = itemsSourceTotalCount.Value;
- return (ScrollViewer.VerticalOffset >= totalItems - ScrollViewer.ViewportHeight);
- }
- }
-
- private int? itemsSourceTotalCount = null;
- /// Items count of underlying IEnumerable. Null until scrolled to the end of IEnumerable.
- public int? ItemsSourceTotalCount
- {
- get
- {
- return this.itemsSourceTotalCount;
- }
- }
-
- private VirtualizingIEnumerable itemsSource;
- /// The collection that underlying ItemsControl sees.
- public VirtualizingIEnumerable ItemsSource
- {
- get { return itemsSource; }
- set
- {
- this.itemsSource = value;
- addNextItems(this.itemsSource, initialItemsCount);
- this.itemsControl.ItemsSource = value;
- }
- }
-
- private void addNextItems(VirtualizingIEnumerable sourceToAdd, int nItems)
- {
- sourceToAdd.AddNextItems(nItems);
- if (!sourceToAdd.HasNext) {
- // all items from IEnumerable have been added
- this.itemsSourceTotalCount = sourceToAdd.Count;
- }
- }
-
- private void handleScroll(object sender, ScrollChangedEventArgs e)
- {
- if (e.VerticalChange > 0) {
- // scrolled to bottom
- if (e.VerticalOffset >= this.itemsSource.Count - e.ViewportHeight) {
- addNextItems(this.itemsSource, (int)e.VerticalChange);
- }
- }
- }
- }
-}
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinCloseControl.xaml b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinCloseControl.xaml
deleted file mode 100644
index 9b97989108..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinCloseControl.xaml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinCloseControl.xaml.cs b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinCloseControl.xaml.cs
deleted file mode 100644
index 669e722d13..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinCloseControl.xaml.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using System;
-using System.Windows;
-using System.Windows.Controls;
-
-using ICSharpCode.SharpDevelop.Bookmarks;
-using ICSharpCode.SharpDevelop.Debugging;
-
-namespace Services.Debugger.Tooltips
-{
- public class ShowingCommentEventArgs : EventArgs
- {
- public bool ShowComment { get; private set; }
-
- public ShowingCommentEventArgs(bool showComment)
- {
- ShowComment = showComment;
- }
- }
-
- public partial class PinCloseControl : UserControl
- {
- public event EventHandler Closed;
-
- public event EventHandler PinningChanged;
-
- public event EventHandler ShowingComment;
-
- public PinCloseControl()
- {
- InitializeComponent();
- }
-
- public bool IsChecked {
- get {
- return UnpinButton.IsChecked.GetValueOrDefault(false);
- }
- }
-
- void CloseButton_Click(object sender, RoutedEventArgs e)
- {
- var handler = Closed;
- if (handler != null)
- handler(this, EventArgs.Empty);
- }
-
- void CommentButton_Checked(object sender, RoutedEventArgs e)
- {
- var handler = ShowingComment;
- if (handler != null)
- handler(this, new ShowingCommentEventArgs(true));
- }
-
- void CommentButton_Unchecked(object sender, RoutedEventArgs e)
- {
- var handler = ShowingComment;
- if (handler != null)
- handler(this, new ShowingCommentEventArgs(false));
- }
-
- void UnpinButton_Checked(object sender, RoutedEventArgs e)
- {
- var handler = PinningChanged;
- if (handler != null)
- handler(this, EventArgs.Empty);
- }
-
- void UnpinButton_Unchecked(object sender, RoutedEventArgs e)
- {
- var handler = PinningChanged;
- if (handler != null)
- handler(this, EventArgs.Empty);
- }
- }
-}
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinControlsDictionary.xaml b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinControlsDictionary.xaml
deleted file mode 100644
index e228d20657..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinControlsDictionary.xaml
+++ /dev/null
@@ -1,337 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinDebuggerControl.xaml b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinDebuggerControl.xaml
deleted file mode 100644
index bee17790ee..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinDebuggerControl.xaml
+++ /dev/null
@@ -1,258 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinDebuggerControl.xaml.cs b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinDebuggerControl.xaml.cs
deleted file mode 100644
index e92b3df19f..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinDebuggerControl.xaml.cs
+++ /dev/null
@@ -1,338 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using System;
-using System.Collections.Generic;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Controls.Primitives;
-using System.Windows.Input;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-
-using Debugger;
-using ICSharpCode.SharpDevelop;
-using ICSharpCode.SharpDevelop.Bookmarks;
-using ICSharpCode.SharpDevelop.Debugging;
-using ICSharpCode.SharpDevelop.Editor;
-using ICSharpCode.SharpDevelop.Gui;
-
-namespace Services.Debugger.Tooltips
-{
- public partial class PinDebuggerControl : UserControl, IPinDebuggerControl
- {
- private const double ChildPopupOpenXOffet = 16;
- private const double ChildPopupOpenYOffet = 15;
- private const int InitialItemsCount = 12;
- private const double MINIMUM_OPACITY = 0.3;
-
- private DebuggerPopup childPopup;
- private LazyItemsControl lazyExpandersGrid;
- private LazyItemsControl lazyGrid;
- private LazyItemsControl lazyImagesGrid;
- private IEnumerable itemsSource;
-
- public PinDebuggerControl()
- {
- InitializeComponent();
-
- if (!DebuggerService.IsDebuggerRunning)
- Opacity = MINIMUM_OPACITY;
- PinCloseControl.Opacity = 0;
-
- Loaded += OnLoaded;
- this.PinCloseControl.Closed += PinCloseControl_Closed;
- this.PinCloseControl.ShowingComment += PinCloseControl_ShowingComment;
- this.PinCloseControl.PinningChanged += PinCloseControl_PinningChanged;
-
- BookmarkManager.Removed += BookmarkManager_Removed;
-
- if (DebuggerService.DebuggedProcess != null)
- DebuggerService.DebuggedProcess.Paused += DebuggerService_CurrentDebugger_DebuggedProcess_Paused;
-
- DebuggerService.ProcessSelected += delegate {
- Opacity = 1.0;
- DebuggerService.DebuggedProcess.Paused += DebuggerService_CurrentDebugger_DebuggedProcess_Paused;
- };
- }
-
- #region Properties
-
- public PinBookmark Mark { get; set; }
-
- public IEnumerable ItemsSource {
- set {
- itemsSource = value;
- var items = new VirtualizingIEnumerable(value);
- lazyExpandersGrid = new LazyItemsControl(this.ExpandersGrid, InitialItemsCount);
- lazyExpandersGrid.ItemsSource = items;
-
- lazyGrid = new LazyItemsControl(this.dataGrid, InitialItemsCount);
- lazyGrid.ItemsSource = items;
-
- lazyImagesGrid = new LazyItemsControl(this.ImagesGrid, InitialItemsCount);
- lazyImagesGrid.ItemsSource = items;
- }
- }
-
- ///
- /// Relative position of the pin with respect to the screen.
- ///
- public Point Location { get; set; }
-
- #endregion
-
- #region Main operations
-
- public void Open()
- {
- Pin();
- }
-
- public void Close()
- {
- Unpin();
- }
-
- void Pin()
- {
- var provider = WorkbenchSingleton.Workbench.ActiveContent as ITextEditorProvider;
- if (provider != null) {
- PinningBinding.GetPinlayer(provider.TextEditor).Pin(this);
- }
- }
-
- void Unpin()
- {
- var provider = WorkbenchSingleton.Workbench.ActiveContent as ITextEditorProvider;
- if (provider != null) {
- PinningBinding.GetPinlayer(provider.TextEditor).Unpin(this);
- }
- }
-
- #endregion
-
- #region Expand buton
-
- private ToggleButton expandedButton;
-
- ///
- /// Closes the child popup of this control, if it exists.
- ///
- void CloseChildPopups()
- {
- if (this.expandedButton != null) {
- this.expandedButton = null;
- // nice simple example of indirect recursion
- this.childPopup.CloseSelfAndChildren();
- }
- }
-
- void BtnExpander_Checked(object sender, RoutedEventArgs e)
- {
- var clickedButton = (ToggleButton)e.OriginalSource;
- var clickedNode = (ITreeNode)clickedButton.DataContext;
- // use device independent units, because child popup Left/Top are in independent units
- Point buttonPos = clickedButton.PointToScreen(new Point(0, 0)).TransformFromDevice(clickedButton);
-
- if (clickedButton.IsChecked.GetValueOrDefault(false)) {
-
- this.expandedButton = clickedButton;
-
- // open child Popup
- if (this.childPopup == null) {
- this.childPopup = new DebuggerPopup(null, false);
- this.childPopup.PlacementTarget = this;
- this.childPopup.Closed += new EventHandler(PinDebuggerControl_Closed);
- this.childPopup.Placement = PlacementMode.Absolute;
- }
-
- this.childPopup.IsLeaf = true;
- this.childPopup.HorizontalOffset = buttonPos.X + ChildPopupOpenXOffet;
- this.childPopup.VerticalOffset = buttonPos.Y + ChildPopupOpenYOffet;
- this.childPopup.ItemsSource = clickedNode.ChildNodes;
- this.childPopup.Open();
- } else {
-
- }
- }
-
- void PinDebuggerControl_Closed(object sender, EventArgs e)
- {
- if (expandedButton != null && expandedButton.IsChecked.GetValueOrDefault(false))
- expandedButton.IsChecked = false;
- }
-
- void BtnExpander_Unchecked(object sender, RoutedEventArgs e)
- {
- CloseChildPopups();
- }
-
- #endregion
-
- #region PinCloseControl
-
- void PinCloseControl_Closed(object sender, EventArgs e)
- {
- BookmarkManager.RemoveMark(Mark);
- CloseChildPopups();
- Unpin();
- }
-
- void PinCloseControl_PinningChanged(object sender, EventArgs e)
- {
- if (this.PinCloseControl.IsChecked) {
- BookmarkManager.RemoveMark(Mark);
- } else {
- if (BookmarkManager.Bookmarks.Contains(Mark))
- BookmarkManager.RemoveMark(Mark);
-
- BookmarkManager.AddMark(Mark);
- }
- }
-
- void PinCloseControl_ShowingComment(object sender, ShowingCommentEventArgs e)
- {
- ShowComment(e.ShowComment);
- }
-
- void AnimateCloseControl(bool show)
- {
- DoubleAnimation animation = new DoubleAnimation();
- animation.From = show ? 0 : 1;
- animation.To = show ? 1 : 0;
- animation.BeginTime = new TimeSpan(0, 0, show ? 0 : 1);
- animation.Duration = new Duration(TimeSpan.FromMilliseconds(500));
- animation.SetValue(Storyboard.TargetProperty, this.PinCloseControl);
- animation.SetValue(Storyboard.TargetPropertyProperty, new PropertyPath(Rectangle.OpacityProperty));
-
- Storyboard board = new Storyboard();
- board.Children.Add(animation);
-
- board.Begin(this);
- }
-
- #endregion
-
- void BookmarkManager_Removed(object sender, BookmarkEventArgs e)
- {
- // if the bookmark was removed from pressing the button, return
- if (this.PinCloseControl.IsChecked)
- return;
-
- if (e.Bookmark is PinBookmark) {
- var pin = (PinBookmark)e.Bookmark;
- if (pin.Location == Mark.Location && pin.FileName == Mark.FileName) {
- Close();
- }
- }
- }
-
- void OnLoaded(object sender, RoutedEventArgs e)
- {
- this.CommentTextBox.Text = Mark.Comment;
- }
-
- #region Comment
-
- void ShowComment(bool show)
- {
- if (show && BorderComment.Height != 0)
- return;
- if (!show && BorderComment.Height != 40)
- return;
-
- DoubleAnimation animation = new DoubleAnimation();
- animation.From = show ? 0 : 40;
- animation.To = show ? 40 : 0;
-
- animation.Duration = new Duration(TimeSpan.FromMilliseconds(300));
- animation.SetValue(Storyboard.TargetProperty, BorderComment);
- animation.SetValue(Storyboard.TargetPropertyProperty, new PropertyPath(Border.HeightProperty));
-
- Storyboard board = new Storyboard();
- board.Children.Add(animation);
- board.Begin(this);
- }
-
- void CommentTextBox_TextChanged(object sender, TextChangedEventArgs e)
- {
- Mark.Comment = this.CommentTextBox.Text;
- }
-
- #endregion
-
- void DebuggerService_CurrentDebugger_DebuggedProcess_Paused(object sender, ProcessEventArgs e)
- {
- var observable = new List();
-
- foreach (var node in lazyGrid.ItemsSource) {
- var resultNode = DebuggerService.CurrentDebugger.GetNode(node.FullName);
- // HACK for updating the pins in tooltip
- observable.Add(resultNode);
- }
-
- // update UI
- var newSource = new VirtualizingIEnumerable(observable);
- lazyGrid.ItemsSource = newSource;
- lazyExpandersGrid.ItemsSource = newSource;
- }
-
- void RefreshContentImage_MouseDown(object sender, MouseButtonEventArgs e)
- {
- // refresh content
- ITreeNode node = ((Image)sender).DataContext as ITreeNode;
-
- if (!DebuggerService.IsDebuggerRunning)
- return;
-
- var resultNode = DebuggerService.CurrentDebugger.GetNode(node.FullName);
- // HACK for updating the pins in tooltip
- var observable = new List();
- var source = lazyGrid.ItemsSource;
- source.ForEach(item =>
- {
- if (item.CompareTo(node) == 0)
- observable.Add(resultNode);
- else
- observable.Add(item);
- });
- // update UI
- var newSource = new VirtualizingIEnumerable(observable);
- lazyGrid.ItemsSource = newSource;
- lazyExpandersGrid.ItemsSource = newSource;
- }
-
- #region Overrides
-
- protected override void OnMouseEnter(System.Windows.Input.MouseEventArgs e)
- {
- AnimateCloseControl(true);
- Opacity = 1.0;
- Cursor = Cursors.Arrow;
- base.OnMouseEnter(e);
- }
-
- protected override void OnMouseMove(MouseEventArgs e)
- {
- Opacity = 1.0;
- Cursor = Cursors.Arrow;
- base.OnMouseMove(e);
- }
-
- protected override void OnMouseLeave(System.Windows.Input.MouseEventArgs e)
- {
- if (DebuggerService.IsDebuggerRunning)
- Opacity = 1;
- else
- Opacity = MINIMUM_OPACITY;
-
- AnimateCloseControl(false);
-
- Cursor = Cursors.IBeam;
- base.OnMouseLeave(e);
- }
-
- #endregion
- }
-}
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinningBinding.cs b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinningBinding.cs
deleted file mode 100644
index 1cd3080cba..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/PinningBinding.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using System;
-using System.Collections.ObjectModel;
-using System.Windows;
-
-using Editor.AvalonEdit;
-using ICSharpCode.AvalonEdit;
-using ICSharpCode.AvalonEdit.Rendering;
-using ICSharpCode.SharpDevelop;
-using ICSharpCode.SharpDevelop.Bookmarks;
-using ICSharpCode.SharpDevelop.Debugging;
-using ICSharpCode.SharpDevelop.Editor;
-
-namespace Services.Debugger.Tooltips
-{
- public class PinningBinding : DefaultLanguageBinding
- {
- ITextEditor _editor;
-
- public PinningBinding()
- {}
-
- public override void Attach(ITextEditor editor)
- {
- if (editor == null)
- return;
-
- var textEditor = editor.GetService(typeof(TextEditor)) as TextEditor;
- if (textEditor != null) {
- textEditor.TextArea.TextView.InsertLayer(
- new PinLayer(textEditor.TextArea),
- KnownLayer.Caret,
- LayerInsertionPosition.Above);
- }
-
- _editor = editor;
- CreatePins(_editor);
-
- base.Attach(editor);
- }
-
- public override void Detach()
- {
- ClosePins(_editor);
-
- base.Detach();
- }
-
- public static void CreatePins(ITextEditor editor)
- {
- // load pins
- var pins = BookmarkManager.Bookmarks.FindAll(
- b => b is PinBookmark && b.FileName == editor.FileName);
-
- foreach (var bookmark in pins) {
- var pin = (PinBookmark)bookmark;
- pin.Popup = new PinDebuggerControl();
- pin.Popup.Mark = pin;
-
- var nodes = new ObservableCollection();
- foreach (var tuple in pin.SavedNodes) {
- var node = new TreeNode();
- node.IconImage =
- new ResourceServiceImage(
- !string.IsNullOrEmpty(tuple.Item1) ? tuple.Item1 : "Icons.16x16.Field");
- node.FullName = tuple.Item2;
- node.Text = tuple.Item3;
- nodes.Add(node);
- }
-
- pin.SavedNodes.Clear();
- pin.Popup.ItemsSource = nodes;
- pin.Nodes = nodes;
- pin.Popup.Open();
-
- GetPinlayer(editor).Pin(pin.Popup);
- }
- }
-
- public static void ClosePins(ITextEditor editor)
- {
- // save pins
- var pins = BookmarkManager.Bookmarks.FindAll(
- b => b is PinBookmark && b.FileName == editor.FileName);
-
- foreach (var bookmark in pins) {
- var pin = (PinBookmark)bookmark;
- if (!pin.PinPosition.HasValue)
- pin.PinPosition = pin.Popup.Location;
-
- // nodes
- if (pin.SavedNodes == null)
- pin.SavedNodes = new System.Collections.Generic.List>();
-
- foreach (var node in pin.Nodes) {
- pin.SavedNodes.Add(
- new Tuple(
- "Icons.16x16.Field",
- node.FullName,
- node.Text));
- }
-
- GetPinlayer(editor).Unpin(pin.Popup);
- pin.Popup = null;
- }
- }
-
- public static PinLayer GetPinlayer(ITextEditor editor) {
- var textEditor = editor.GetService(typeof(TextEditor)) as TextEditor;
- if (textEditor != null) {
- foreach(var layer in textEditor.TextArea.TextView.Layers)
- if(((Layer)layer).LayerType == KnownLayer.DataPins)
- return (PinLayer)layer;
- }
-
- return null;
- }
- }
-}
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VirtualizingIEnumerable.cs b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VirtualizingIEnumerable.cs
deleted file mode 100644
index c18209b02f..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VirtualizingIEnumerable.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-
-namespace ICSharpCode.SharpDevelop.Debugging
-{
- ///
- /// A wrapper around IEnumerable<T> with AddNextItems method for pulling additional items
- /// from underlying IEnumerable<T>.
- /// Can be used as source for .
- ///
- public class VirtualizingIEnumerable : ObservableCollection
- {
- private IEnumerator originalSourceEnumerator;
-
- public VirtualizingIEnumerable(IEnumerable originalSource)
- {
- if (originalSource == null)
- throw new ArgumentNullException("originalSource");
-
- this.originalSourceEnumerator = originalSource.GetEnumerator();
- }
-
- private bool hasNext = true;
- ///
- /// False if all items from underlying IEnumerable have already been added.
- ///
- public bool HasNext
- {
- get
- {
- return this.hasNext;
- }
- }
-
- ///
- /// Requests next items from underlying IEnumerable source and adds them to the collection.
- ///
- public void AddNextItems(int count)
- {
- for (int i = 0; i < count; i++) {
- if (!originalSourceEnumerator.MoveNext()) {
- this.hasNext = false;
- break;
- }
- this.Add(originalSourceEnumerator.Current);
- }
- }
- }
-}
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.cs b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.cs
deleted file mode 100644
index 7b418a5429..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
-
-using ICSharpCode.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Windows.Controls;
-
-namespace ICSharpCode.SharpDevelop.Debugging
-{
- ///
- /// Control displaying and executing visualizer commands.
- ///
- public class VisualizerPicker : ComboBox
- {
- public VisualizerPicker()
- {
- this.SelectionChanged += VisualizerPicker_SelectionChanged;
- }
-
- void VisualizerPicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- if (this.SelectedItem == null) {
- return;
- }
- var clickedCommand = this.SelectedItem as IVisualizerCommand;
- if (clickedCommand == null) {
- throw new InvalidOperationException(
- string.Format("{0} clicked, only instances of {1} must be present in {2}.",
- this.SelectedItem.GetType().ToString(), typeof(IVisualizerCommand).Name, typeof(VisualizerPicker).Name));
- }
-
- clickedCommand.Execute();
- // Make no item selected, so that multiple selections of the same item always execute the command.
- // This triggers VisualizerPicker_SelectionChanged again, which returns immediately.
- this.SelectedIndex = -1;
- }
-
- public new IEnumerable ItemsSource
- {
- get { return (IEnumerable)base.ItemsSource; }
- set { base.ItemsSource = value; }
- }
- }
-}
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.xaml b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.xaml
deleted file mode 100644
index ecd25b595b..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/VisualizerPicker.xaml
+++ /dev/null
@@ -1,135 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- M 0 0 L 2 3 L 4 0 Z
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/magnifier.png b/src/Main/Base/Project/Src/Services/Debugger/Tooltips/magnifier.png
deleted file mode 100644
index cfd9e15cbd..0000000000
Binary files a/src/Main/Base/Project/Src/Services/Debugger/Tooltips/magnifier.png and /dev/null differ
diff --git a/src/Main/Base/Project/Src/Services/Debugger/TreeNode.cs b/src/Main/Base/Project/Src/Services/Debugger/TreeNode.cs
deleted file mode 100644
index d99a7d6e3b..0000000000
--- a/src/Main/Base/Project/Src/Services/Debugger/TreeNode.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
-// This code is distributed under the BSD license (for details please see \src\AddIns\Debugger\Debugger.AddIn\license.txt)
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Drawing;
-using System.Linq;
-using System.Windows.Media;
-
-using ICSharpCode.SharpDevelop;
-using ICSharpCode.SharpDevelop.Debugging;
-
-namespace ICSharpCode.SharpDevelop.Debugging
-{
- ///
- /// A node in the variable tree.
- /// The node is imutable.
- ///
- public class TreeNode: IComparable, ITreeNode
- {
- IImage iconImage = null;
- string name = string.Empty;
- string text = string.Empty;
- string type = string.Empty;
- IEnumerable childNodes = null;
-
- ///
- /// The image displayed for this node.
- ///
- public IImage IconImage {
- get { return iconImage; }
- set { iconImage = value; }
- }
-
- ///
- /// System.Windows.Media.ImageSource version of .
- ///
- public ImageSource ImageSource {
- get {
- return iconImage == null ? null : iconImage.ImageSource;
- }
- }
-
- ///
- /// System.Drawing.Image version of .
- ///
- public Image Image {
- get {
- return iconImage == null ? null : iconImage.Bitmap;
- }
- }
-
- public string Name {
- get { return name; }
- set { name = value; }
- }
-
- public virtual string FullName {
- get { return name; }
- set { name = value; }
- }
-
- public virtual string Text
- {
- get { return text; }
- set { text = value; }
- }
-
- public virtual string Type {
- get { return type; }
- protected set { type = value; }
- }
-
- public virtual IEnumerable ChildNodes {
- get { return childNodes; }
- protected set { childNodes = value; }
- }
-
- IEnumerable ITreeNode.ChildNodes {
- get { return childNodes; }
- }
-
- public virtual bool HasChildNodes {
- get { return childNodes != null; }
- }
-
- public virtual bool CanSetText {
- get { return false; }
- }
-
- public virtual IEnumerable VisualizerCommands {
- get {
- return null;
- }
- }
-
- public virtual bool HasVisualizerCommands {
- get {
- return (VisualizerCommands != null) && (VisualizerCommands.Count() > 0);
- }
- }
-
- public bool IsPinned { get; set; }
-
- public TreeNode()
- {
- }
-
- public TreeNode(IImage iconImage, string name, string text, string type, IEnumerable childNodes)
- {
- this.iconImage = iconImage;
- this.name = name;
- this.text = text;
- this.type = type;
- this.childNodes = childNodes;
- }
-
- public int CompareTo(TreeNode other)
- {
- return this.Name.CompareTo(other.Name);
- }
-
- public virtual bool SetText(string newValue) {
- return false;
- }
- }
-}