@@ -29,20 +29,26 @@ namespace ICSharpCode.SharpDevelop.Debugging
2929 /// </summary>
3030 public partial class DebuggerTooltipControl : UserControl , ITooltip
3131 {
32- private readonly double ChildPopupOpenXOffet = 16 ;
33- private readonly double ChildPopupOpenYOffet = 15 ;
34- private readonly int InitialItemsCount = 12 ;
35- private readonly int VisibleItemsCount = 11 ;
36-
32+ private const double ChildPopupOpenXOffet = 16 ;
33+ private const double ChildPopupOpenYOffet = 15 ;
34+ private const int InitialItemsCount = 12 ;
35+ private const int VisibleItemsCount = 11 ;
36+
37+ private bool showPins = true ;
38+ private LazyItemsControl < ITreeNode > lazyGrid ;
39+ private IEnumerable < ITreeNode > itemsSource ;
40+
3741 public DebuggerTooltipControl ( )
3842 {
3943 InitializeComponent ( ) ;
44+
45+ Loaded += new RoutedEventHandler ( OnLoaded ) ;
4046 }
4147
4248 public DebuggerTooltipControl ( ITreeNode node )
4349 : this ( new ITreeNode [ ] { node } )
4450 {
45- Loaded += new RoutedEventHandler ( OnLoaded ) ;
51+
4652 }
4753
4854 public DebuggerTooltipControl ( IEnumerable < ITreeNode > nodes )
@@ -51,31 +57,36 @@ public DebuggerTooltipControl(IEnumerable<ITreeNode> nodes)
5157 this . itemsSource = nodes ;
5258 }
5359
54- public DebuggerTooltipControl ( DebuggerTooltipControl parentControl )
60+ public DebuggerTooltipControl ( DebuggerTooltipControl parentControl , bool showPins = true )
5561 : this ( )
5662 {
5763 this . parentControl = parentControl ;
64+ this . showPins = showPins ;
5865 }
5966
6067 private void OnLoaded ( object sender , RoutedEventArgs e )
6168 {
62- ITextEditorProvider provider = WorkbenchSingleton . Workbench . ActiveViewContent as ITextEditorProvider ;
63- var editor = provider . TextEditor ;
64- if ( editor == null ) return ;
65-
66- // verify if at the line of the root there's a pin bookmark
67- var pin = BookmarkManager . Bookmarks . Find (
68- b => b is PinBookmark &&
69- b . Location . Line == LogicalPosition . Line &&
70- b . FileName == editor . FileName ) as PinBookmark ;
71-
72- if ( pin != null ) {
73- foreach ( var node in this . itemsSource ) {
74- if ( pin . ContainsNode ( node ) )
75- node . IsChecked = true ;
69+ if ( showPins ) {
70+ ITextEditorProvider provider = WorkbenchSingleton . Workbench . ActiveViewContent as ITextEditorProvider ;
71+ var editor = provider . TextEditor ;
72+ if ( editor == null ) return ;
73+
74+ // verify if at the line of the root there's a pin bookmark
75+ var pin = BookmarkManager . Bookmarks . Find (
76+ b => b is PinBookmark &&
77+ b . Location . Line == LogicalPosition . Line &&
78+ b . FileName == editor . FileName ) as PinBookmark ;
79+
80+ if ( pin != null ) {
81+ foreach ( var node in this . itemsSource ) {
82+ if ( pin . ContainsNode ( node ) )
83+ node . IsChecked = true ;
84+ }
7685 }
7786 }
78-
87+ else {
88+ dataGrid . Columns [ 5 ] . Visibility = Visibility . Collapsed ;
89+ }
7990 SetItemsSource ( this . itemsSource ) ;
8091 }
8192
@@ -86,10 +97,6 @@ protected void OnClosed()
8697 this . Closed ( this , new RoutedEventArgs ( ) ) ;
8798 }
8899 }
89-
90- private LazyItemsControl < ITreeNode > lazyGrid ;
91-
92- IEnumerable < ITreeNode > itemsSource ;
93100
94101 public IEnumerable < ITreeNode > ItemsSource {
95102 get { return this . itemsSource ; }
@@ -131,8 +138,8 @@ public bool Close(bool mouseClick)
131138 }
132139 }
133140
134- DebuggerPopup childPopup { get ; set ; }
135- DebuggerTooltipControl parentControl { get ; set ; }
141+ private DebuggerPopup childPopup { get ; set ; }
142+ private DebuggerTooltipControl parentControl { get ; set ; }
136143 internal DebuggerPopup containingPopup { get ; set ; }
137144
138145 bool isChildExpanded
0 commit comments