1414using Microsoft . VisualStudio . FSharp . LanguageService . Resources ;
1515
1616namespace Microsoft . VisualStudio . FSharp . LanguageService {
17- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager"]/*' />
1817 /// <summary>
1918 /// CodeWindowManager provides a default implementation of the VSIP interface IVsCodeWindowManager
2019 /// and manages the LanguageService, Source, ViewFilter, and DocumentProperties objects associated
@@ -42,7 +41,6 @@ public class CodeWindowManager : IVsCodeWindowManager {
4241 DocumentProperties properties ;
4342#endif
4443
45- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.CodeWindowManager"]/*' />
4644 /// <summary>
4745 /// The CodeWindowManager is constructed by the base LanguageService class when VS calls
4846 /// the IVsLanguageInfo.GetCodeWindowManager method. You can override CreateCodeWindowManager
@@ -58,14 +56,12 @@ internal CodeWindowManager(LanguageService service, IVsCodeWindow codeWindow, IS
5856#endif
5957 }
6058
61- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.Finalize"]/*' />
6259 ~ CodeWindowManager ( ) {
6360#if LANGTRACE
6461 Trace . WriteLine ( "~CodeWindowManager" ) ;
6562#endif
6663 }
6764
68- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.Close"]/*' />
6965 /// <summary>Closes all view filters, and the document properties window</summary>
7066 internal void Close ( ) {
7167#if LANGTRACE
@@ -93,17 +89,14 @@ void CloseFilters() {
9389 }
9490 }
9591
96- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.LanguageService;"]/*' />
9792 /// <summary>Returns the LanguageService object that created this code window manager</summary>
9893 internal LanguageService LanguageService {
9994 get { return this . service ; }
10095 }
101- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.Source;"]/*' />
10296 /// <summary>returns the Source object associated with the IVsTextLines buffer for this code window</summary>
10397 internal ISource Source {
10498 get { return this . source ; }
10599 }
106- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.GetFilter;"]/*' />
107100 /// <summary>
108101 /// Returns the ViewFilter for the given view or null if no matching filter is found.
109102 /// </summary>
@@ -118,7 +111,6 @@ internal ViewFilter GetFilter(IVsTextView view) {
118111 }
119112
120113#if DOCUMENT_PROPERTIES
121- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.Properties;"]/*' />
122114 /// <summary>Returns the DocumentProperties, if any. You can update this property if you want to
123115 /// change the document properties on the fly.</summary>
124116 internal DocumentProperties Properties {
@@ -132,19 +124,15 @@ internal DocumentProperties Properties {
132124 }
133125 }
134126#endif
135- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.DropDownHelper"]/*' />
136127 /// <summary>Return the optional TypeAndMemberDropdownBars object for the drop down combos</summary>
137128 internal TypeAndMemberDropdownBars DropDownHelper {
138129 get { return this . dropDownHelper ; }
139130 }
140- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.CodeWindow"]/*' />
141131 /// <summary>Return the IVsCodeWindow associated with this code window manager.</summary>
142132 internal IVsCodeWindow CodeWindow {
143133 get { return this . codeWindow ; }
144134 }
145135
146- #region IVsCodeWindowManager methods
147- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.AddAdornments"]/*' />
148136 /// <summary>Install the optional TypeAndMemberDropdownBars, and primary and secondary view filters</summary>
149137 public virtual int AddAdornments ( ) {
150138#if LANGTRACE
@@ -182,7 +170,6 @@ public virtual int AddAdornments() {
182170 return NativeMethods . S_OK ;
183171 }
184172
185- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.RemoveAdornments"]/*' />
186173 /// <summary>Remove drop down combos, view filters, and notify the LanguageService that the Source and
187174 /// CodeWindowManager is now closed</summary>
188175 public virtual int RemoveAdornments ( ) {
@@ -212,7 +199,6 @@ public virtual int RemoveAdornments() {
212199 return NativeMethods . S_OK ;
213200 }
214201
215- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.OnNewView"]/*' />
216202 /// <summary>Install a new view filter for the given view. This method calls your
217203 /// CreateViewFilter method.</summary>
218204 public virtual int OnNewView ( IVsTextView newView ) {
@@ -224,11 +210,9 @@ public virtual int OnNewView(IVsTextView newView) {
224210 return NativeMethods . S_OK ;
225211 }
226212
227- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.OnKillFocus"]/*' />
228213 public virtual void OnKillFocus ( IVsTextView textView ) {
229214 }
230215
231- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="CodeWindowManager.OnSetFocus"]/*' />
232216 /// <summary>Refresh the document properties</summary>
233217 public virtual void OnSetFocus ( IVsTextView textView ) {
234218#if DOCUMENT_PROPERTIES
@@ -237,13 +221,11 @@ public virtual void OnSetFocus(IVsTextView textView) {
237221 }
238222#endif
239223 }
240- #endregion
241224
242225 }
243226
244227
245228
246- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars"]/*' />
247229 /// <summary>
248230 /// Represents the two drop down bars on the top of a text editor window that allow
249231 /// types and type members to be selected by name.
@@ -274,14 +256,12 @@ internal abstract class TypeAndMemberDropdownBars : IVsDropdownBarClient {
274256 const int DropClasses = 0 ;
275257 const int DropMethods = 1 ;
276258
277- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.TypeAndMemberDropdownBars"]/*' />
278259 protected TypeAndMemberDropdownBars ( LanguageService languageService ) {
279260 this . languageService = languageService ;
280261 this . dropDownTypes = new ArrayList ( ) ;
281262 this . dropDownMembers = new ArrayList ( ) ;
282263 }
283264
284- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.Done"]/*' />
285265 public void Done ( ) { //TODO: use IDisposable pattern
286266 if ( this . imageList != null ) {
287267 imageList . Dispose ( ) ;
@@ -301,7 +281,6 @@ internal void SynchronizeDropdowns(IVsTextView textView, int line, int col) {
301281
302282
303283
304- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.OnSynchronizeDropdowns"]/*' />
305284 /// <summary>
306285 /// This method is called to update the drop down bars to match the current contents of the text editor window.
307286 /// It is called during OnIdle when the caret position changes. You can provide new drop down members here.
@@ -320,7 +299,6 @@ internal void SynchronizeDropdowns(IVsTextView textView, int line, int col) {
320299
321300
322301 // IVsDropdownBarClient methods
323- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetComboAttributes"]/*' />
324302 public virtual int GetComboAttributes ( int combo , out uint entries , out uint entryType , out IntPtr iList ) {
325303 entries = 0 ;
326304 entryType = 0 ;
@@ -341,7 +319,6 @@ private enum DropDownItemType {
341319 HasImage = 4
342320 }
343321
344- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetComboTipText"]/*' />
345322 public virtual int GetComboTipText ( int combo , out string text ) {
346323 if ( combo == TypeAndMemberDropdownBars . DropClasses )
347324 text = SR . GetString ( SR . ComboTypesTip ) ;
@@ -350,7 +327,6 @@ public virtual int GetComboTipText(int combo, out string text) {
350327 return NativeMethods . S_OK ;
351328 }
352329
353- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetEntryAttributes"]/*' />
354330 public virtual int GetEntryAttributes ( int combo , int entry , out uint fontAttrs ) {
355331 fontAttrs = ( uint ) DROPDOWNFONTATTR . FONTATTR_PLAIN ;
356332 DropDownMember member = GetMember ( combo , entry ) ;
@@ -360,7 +336,6 @@ public virtual int GetEntryAttributes(int combo, int entry, out uint fontAttrs)
360336 return NativeMethods . S_OK ;
361337 }
362338
363- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetEntryImage"]/*' />
364339 public virtual int GetEntryImage ( int combo , int entry , out int imgIndex ) {
365340 // this happens during drawing and has to be fast
366341 imgIndex = - 1 ;
@@ -371,7 +346,6 @@ public virtual int GetEntryImage(int combo, int entry, out int imgIndex) {
371346 return NativeMethods . S_OK ;
372347 }
373348
374- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetEntryText"]/*' />
375349 public virtual int GetEntryText ( int combo , int entry , out string text ) {
376350 text = null ;
377351 DropDownMember member = GetMember ( combo , entry ) ;
@@ -381,12 +355,10 @@ public virtual int GetEntryText(int combo, int entry, out string text) {
381355 return NativeMethods . S_OK ;
382356 }
383357
384- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.OnComboGetFocus"]/*' />
385358 public virtual int OnComboGetFocus ( int combo ) {
386359 return NativeMethods . S_OK ;
387360 }
388361
389- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetMember"]/*' />
390362 public DropDownMember GetMember ( int combo , int entry ) {
391363 if ( combo == TypeAndMemberDropdownBars . DropClasses ) {
392364 if ( this . dropDownTypes != null && entry >= 0 && entry < this . dropDownTypes . Count )
@@ -398,7 +370,6 @@ public DropDownMember GetMember(int combo, int entry) {
398370 return null ;
399371 }
400372
401- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.OnItemChosen"]/*' />
402373 public virtual int OnItemChosen ( int combo , int entry ) {
403374 DropDownMember member = GetMember ( combo , entry ) ;
404375 if ( ! Object . ReferenceEquals ( member , null ) ) {
@@ -417,11 +388,9 @@ public virtual int OnItemChosen(int combo, int entry) {
417388 return NativeMethods . S_OK ;
418389 }
419390
420- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.SetFocus"]/*' />
421391 [ DllImport ( "user32.dll" ) ]
422392 static extern void SetFocus ( IntPtr hwnd ) ;
423393
424- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.OnItemSelected"]/*' />
425394 public int OnItemSelected ( int combo , int index ) {
426395 //nop
427396 return NativeMethods . S_OK ;
@@ -433,15 +402,13 @@ public int SetDropdownBar(IVsDropdownBar bar) {
433402 }
434403 }
435404
436- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember"]/*' />
437405 internal class DropDownMember : IComparable {
438406
439407 private string label ;
440408 private TextSpan span ;
441409 private int glyph ;
442410 private DROPDOWNFONTATTR fontAttr ;
443411
444- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.Label;"]/*' />
445412 public string Label {
446413 get {
447414 return this . label ;
@@ -451,7 +418,6 @@ public string Label {
451418 }
452419 }
453420
454- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.Span;"]/*' />
455421 public TextSpan Span {
456422 get {
457423 return this . span ;
@@ -460,7 +426,6 @@ public TextSpan Span {
460426 this . span = value ;
461427 }
462428 }
463- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.Glyph;"]/*' />
464429 public int Glyph {
465430 get {
466431 return this . glyph ;
@@ -469,7 +434,6 @@ public int Glyph {
469434 this . glyph = value ;
470435 }
471436 }
472- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.FontAttr;"]/*' />
473437 public DROPDOWNFONTATTR FontAttr {
474438 get {
475439 return this . fontAttr ;
@@ -479,7 +443,6 @@ public DROPDOWNFONTATTR FontAttr {
479443 }
480444 }
481445
482- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.DropDownMember"]/*' />
483446 public DropDownMember ( string label , TextSpan span , int glyph , DROPDOWNFONTATTR fontAttribute ) {
484447 if ( label == null ) {
485448 throw new ArgumentNullException ( "label" ) ;
@@ -490,14 +453,12 @@ public DropDownMember(string label, TextSpan span, int glyph, DROPDOWNFONTATTR f
490453 this . FontAttr = fontAttribute ;
491454 }
492455
493- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.CompareTo"]/*' />
494456 public int CompareTo ( object obj ) {
495457 // if this overload is used then it assumes a case-sensitive current culture comparison
496458 // which allows for case-senstive languages to work
497459 return CompareTo ( obj , StringComparison . CurrentCulture ) ;
498460 }
499461
500- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.CompareTo"]/*' />
501462 public int CompareTo ( object obj , StringComparison stringComparison )
502463 {
503464 if ( obj is DropDownMember )
@@ -508,15 +469,13 @@ public int CompareTo(object obj, StringComparison stringComparison)
508469 }
509470
510471 // Omitting Equals violates FxCop rule: IComparableImplementationsOverrideEquals.
511- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.Equals"]/*' />
512472 public override bool Equals ( Object obj ) {
513473 if ( ! ( obj is DropDownMember ) )
514474 return false ;
515475 return ( this . CompareTo ( obj , StringComparison . CurrentCulture ) == 0 ) ;
516476 }
517477
518478 // Omitting getHashCode violates FxCop rule: EqualsOverridesRequireGetHashCodeOverride.
519- /// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DropDownMember.GetHashCode"]/*' />
520479 public override int GetHashCode ( ) {
521480 return this . Label . GetHashCode ( ) ;
522481 }
0 commit comments