This is bloody marvelous! Thank you very much for this contribution. I try to be consistent with providing XML comments for documentation and tooltip help, but these comments do tend to make the code (much) less readable. This extension is a godsend for me.
Perfection for me would be reached if there was an option to (temporarily) hide commented lines completely, so without even the callout icon. For me this would make the (more compact) code even more readable.
"Code should be self documenting" is fine for people reading my code; and that's what I strive to create. But the people consuming my classes should not have to read code to understand what it does. This affords me the best of both worlds.
I installed the tool but it keeps throwing errors, both in VS2010 and 2012.
Activity Monitor Log has these red lines:
SetSite failed for package [HideShow.Package.Package, HideShow.Package, Version=188.8.131.52, Culture=neutral, PublicKeyToken=96af82921a3c7625]
End package load [HideShow.Package.Package, HideShow.Package, Version=184.108.40.206, Culture=neutral, PublicKeyToken=96af82921a3c7625]
System.TypeLoadException: Could not load type 'ICSharpCode.NRefactory.CSharp.dgfnmdfndfn' from assembly 'ICSharpCode.NRefactory.CSharp, Version=220.127.116.11, Culture=neutral, PublicKeyToken=d4bfe873e7598c49'. at HideShow.Implementation.hwwegwebv..ctor(ITextView gwh) at HideShow.Package.CsCommentTaggerProvider.<>c__DisplayClass1.<CreateCSharpTagger>b__0() at Microsoft.VisualStudio.Utilities.PropertyCollection.GetOrCreateSingletonProperty[T](Object key, Func`1 creator) at HideShow.Package.CsCommentTaggerProvider.CreateCSharpTagger(ITextView textView, ITextBuffer buffer) at HideShow.Package.CsCommentTaggerProvider.Microsoft.VisualStudio.Text.Tagging.IViewTaggerProvider.CreateTagger[T](ITextView textView, ITextBuffer buffer) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
For each supported language I need a parser that recognizes comments and provides text positions. This is tricky since most parsers just ignore comments. I do not intend to write my own parsers - way too much work. If anybody knows of such parsers for commonly used languages in VS, please let me know. FYI, for C# I use the excellent parser from NRefactory (SharpDevelop)
Our software requires a lot of "tracing" to file, using the System.Diagnostics Trace class and also some in-house log file provides.
Our code ends up many times with a trace after each line of code and although useful when something goes wrong, makes the code a bit cluttered. I'm sure this is a common problem.
It would be really useful if this extension could accept a custom parameter to also hide lines "starting with" a particular string like "log" or "trace"... would that be possible?
Would it be possible to make this work on collapsed comments? I.o.w. after pressing CTRL+(M,O), I can't see the little callout. Seems like there is no existing addon to collapse everything except comments either.
Whenever I hover over one of the "hidden" comments, vs throws an exception with the following info in the log:
Exception Type : System.ArgumentOutOfRangeException
Exception Message : TimeSpan period must be less than or equal to Int32.MaxValue.
Parameter name: value
Exception Stack Trace: at System.Windows.Threading.DispatcherTimer.set_Interval(TimeSpan value)
at System.Windows.Controls.PopupControlService.OnRaiseToolTipOpeningEvent(Object sender, EventArgs e)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Key: System.Object, Value: [null]