Skip to content

Commit 66d4883

Browse files
enricosadalatkin
authored andcommitted
Cleanup vs ext 2
- remove `#region`s - removed include of not existing doc in comments (noise) - remove redundant comments (`/// this is a constructor`) - remove commented code - remove an empty file closes dotnet/fsharp#358 commit c34491923f46ecbf2984d58ba3bf4e3391205a6e Author: enricosada <[email protected]> Date: Thu Apr 16 15:03:14 2015 +0200 removed comment commit 6daf02cf3d65c342f4aff8d4bebc1cc2fa0a3506 Author: enricosada <[email protected]> Date: Fri Apr 10 14:56:39 2015 +0200 remove empty file commit 0e736d994beecbec9263808edb04f5170e99fbe0 Author: enricosada <[email protected]> Date: Thu Apr 9 23:10:38 2015 +0200 remove commented code commit b4422b9eef39cccb10a60a0216f313915b10a5eb Author: enricosada <[email protected]> Date: Fri Apr 10 11:26:29 2015 +0200 removed redundant comments commit f8a981dc1f88db773be00bfff7aa993424eab985 Author: enricosada <[email protected]> Date: Thu Apr 9 23:19:34 2015 +0200 remove include external doc in comments commit f59c84cd386ed89e5b99f950e145d33f02913e78 Author: enricosada <[email protected]> Date: Fri Apr 10 14:56:00 2015 +0200 remove #region
1 parent 0bfd80c commit 66d4883

File tree

101 files changed

+9
-2056
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+9
-2056
lines changed

vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.Base/CodeWindowManager.cs

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using Microsoft.VisualStudio.FSharp.LanguageService.Resources;
1515

1616
namespace 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
}

vsintegration/src/vs/FsPkgs/FSharp.LanguageService/FSharp.LanguageService.Base/Colorizer.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public virtual void Resume()
4646
}
4747

4848
#if COLORABLE_ITEM
49-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="ColorableItem"]/*' />
5049
[CLSCompliant(false)]
5150
[System.Runtime.InteropServices.ComVisible(true)]
5251
public class ColorableItem : IVsColorableItem, IVsHiColorItem, IVsMergeableUIItem {
@@ -55,7 +54,6 @@ public class ColorableItem : IVsColorableItem, IVsHiColorItem, IVsMergeableUIIte
5554
Color hiForeColor, hiBackColor;
5655
FONTFLAGS fontFlags;
5756

58-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="ColorableItem.ColorableItem"]/*' />
5957
internal ColorableItem(string name, string displayName, COLORINDEX foreColor, COLORINDEX backColor, Color hiForeColor, Color hiBackColor, FONTFLAGS fontFlags) {
6058
this.name = name;
6159
this.displayName = displayName;
@@ -66,27 +64,20 @@ internal ColorableItem(string name, string displayName, COLORINDEX foreColor, CO
6664
this.hiBackColor = hiBackColor;
6765
}
6866

69-
#region IVsColorableItem methods
70-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="ColorableItem.GetDefaultColors"]/*' />
7167
public virtual int GetDefaultColors(COLORINDEX[] foreColor, COLORINDEX[] backColor) {
7268
if (foreColor != null) foreColor[0] = this.foreColor;
7369
if (backColor != null) backColor[0] = this.backColor;
7470
return NativeMethods.S_OK;
7571
}
76-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="ColorableItem.GetDefaultFontFlags"]/*' />
7772
public virtual int GetDefaultFontFlags(out uint fontFlags) {
7873
fontFlags = (uint)this.fontFlags;
7974
return NativeMethods.S_OK;
8075
}
81-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="ColorableItem.GetDisplayName"]/*' />
8276
public virtual int GetDisplayName(out string name) {
8377
name = this.displayName;
8478
return NativeMethods.S_OK;
8579
}
86-
#endregion
8780

88-
#region IVsHiColorItem methods
89-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="Colorizer.GetColorData"]/*' />
9081
public virtual int GetColorData(int cdElement, out uint crColor)
9182
{
9283
crColor = 0;
@@ -126,32 +117,25 @@ private uint ColorToRgb(Color color)
126117

127118
return (uint)(red | (green << 8) | (blue << 16));
128119
}
129-
#endregion
130120

131121

132-
#region IVsMergeableUIItem Members
133-
134-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="ColorableItem.GetCanonicalName"]/*' />
135122
public virtual int GetCanonicalName(out string name) {
136123
name = this.name;
137124
return NativeMethods.S_OK;
138125
}
139126

140-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="ColorableItem.GetDescription"]/*' />
141127
public virtual int GetDescription(out string desc) {
142128
// The reason this is not implemented is because the core text editor
143129
// doesn't use it.
144130
desc = null;
145131
return NativeMethods.E_NOTIMPL;
146132
}
147133

148-
/// <include file='doc\Colorizer.uex' path='docs/doc[@for="ColorableItem.GetMergingPriority"]/*' />
149134
public virtual int GetMergingPriority(out int priority) {
150135
priority = -1;
151136
return NativeMethods.E_NOTIMPL;
152137
}
153138

154-
#endregion
155139
}
156140
#endif
157141

0 commit comments

Comments
 (0)