Code Monkey home page Code Monkey logo

codenav's Introduction

Hi ๐Ÿ‘‹, I'm Samir L. Boulema

A passionate backend developer from The Netherlands

  • ๐Ÿ”ญ Iโ€™m currently working on CodeNav

  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on RepoZ

  • ๐Ÿค Iโ€™m looking for help with TGit

  • ๐Ÿ‘จโ€๐Ÿ’ป All of my projects are available at https://github.com/sboulema

  • ๐Ÿ’ฌ Ask me about C#

  • ๐Ÿ“ซ How to reach me [email protected]

  • ๐Ÿ“„ Know about my experiences https://www.sboulema.nl

  • โšก Fun fact I brew my own beer ๐Ÿบ

Connect with me:

Linktree

sboulema

codenav's People

Contributors

2mas avatar azure-pipelines[bot] avatar sboulema avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codenav's Issues

System.NullReferenceException

{
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.NullReferenceException",
      "Message":"Object reference not set to an instance of an object.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 113\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 70",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nMapDocument\nCodeNav, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4bb830b01d479d3f\nCodeNav.Mappers.SyntaxMapper\nSystem.Collections.Generic.List`1[CodeNav.Models.CodeItem] MapDocument(EnvDTE.Document)",
      "HResult":-2147467261,
      "Source":"CodeNav",
      "WatsonBuckets":null
   },
   "timestamp":"2017-08-22T17:34:06.3103423+02:00"
}

A couple of enhancement requests regarding current method

  1. It would be helpful if there is option to scroll automatically to the current method when it is outside the visible portion.

  2. The blue highlight is not easily recognisable, at least on my monitor. It needs to be darker under the Light theme, and lighter under the Dark theme.
    Below are comparisons with a similar commercial extension. I have assigned the same fonts to both of them. The left is CodeNav, and the right is SuperCharger.

    light
    dark

Null AsClause

In CodeNav.dll!CodeNav.Mappers.PropertyMapper.MapProperty(Microsoft.CodeAnalysis.VisualBasic.Syntax.PropertyBlockSyntax member, CodeNav.CodeViewUserControl control, Microsoft.CodeAnalysis.SemanticModel semanticModel) Line 50 C#

member.PropertyStatement.AsClause

Code:
Public Property _Titulo1$

(You can use $ instead of ' As String')

CodeNav crashes VS 2017 when navigating to a bound property from a xaml file

Hello,

First a quick intro: I'm a seasoned .NET / C# developer and I moved from VS 2015 to 2017 a couple of months ago. At that time, I was desperately looking for a freeware code overview VS extension that would be compatible with VS 2017 and I found your CodeNav, which does a very good job. Unfortunately this extension is sometimes unstable. I'm now taking the time to report a few issues I've found so far.

The first blocking issue I had was related to nested #regions, but this has been fixed recently in CodeNav.
The other blocking issues I face crash VS, no less. I've been able to find a 100% repro scenario for only 1 of them, but I'll report all of them anyway.

For the record, I'm using the most recent CodeNav (2.6.141) and the most recent VS 2017 (26430.14).

  1. Crash when navigating to a bound property from a xaml file.
    For this one, I've a repro scenario. VS 2017 has a new feature that allows to navigate to a bound property from a xaml file. When you do this with CodeNav installed and active, VS crashes. I'm attaching a very simple WPF app solution that demonstrates this bug. Just unzip the file, open the solution, open the file "MainWindow.xaml", select the bound property "Greetings" (at line 11) and press F12 ==> VS 2017 crashes! Here's the corresponding EventLog entry:

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.InvalidOperationException
at System.Windows.Threading.Dispatcher.VerifyAccess()
at System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty, System.Object)
at CodeNav.Helpers.VisibilityHelper.SetMarginWidth(System.Windows.Controls.ColumnDefinition, System.Collections.Generic.List`1<CodeNav.Models.CodeItem>)
at CodeNav.CodeViewUserControl.BackgroundWorker_RunWorkerCompleted(System.Object, System.ComponentModel.RunWorkerCompletedEventArgs)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(System.ComponentModel.RunWorkerCompletedEventArgs)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
CodeNavCrash1.zip

  1. For the other crashes, I've no repro scenario, but I'll give you the corresponding EventLog entries. This might help you identify the other problems.

2.1) Crash 2:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ObjectDisposedException
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32, IntPtr)
at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32, Int32[])
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_DocCookie()
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_Document()
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.<get_Document>b__27_0()
at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.get_Document()
at CodeNav.CodeViewUserControl.BackgroundWorker_RunWorkerCompleted(System.Object, System.ComponentModel.RunWorkerCompletedEventArgs)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(System.ComponentModel.RunWorkerCompletedEventArgs)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

2.2) Crash 3:
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ObjectDisposedException
at Microsoft.VisualStudio.Text.Outlining.OutliningManager.EnsureValid()
at Microsoft.VisualStudio.Text.Outlining.OutliningManager.EnsureValid(Microsoft.VisualStudio.Text.SnapshotSpan)
at Microsoft.VisualStudio.Text.Outlining.OutliningManager.GetAllRegions(Microsoft.VisualStudio.Text.SnapshotSpan)
at CodeNav.Helpers.OutliningHelper.FindCollapsibleFromCodeItem(CodeNav.Models.CodeItem, Microsoft.VisualStudio.Text.Outlining.IOutliningManager, Microsoft.VisualStudio.Text.Editor.IWpfTextView)
at CodeNav.Helpers.OutliningHelper.OnIsExpandedChanged(System.Object, System.EventArgs)
at CodeNav.Models.CodeClassItem.set_IsExpanded(Boolean)
at CodeNav.Helpers.OutliningHelper.SetRegionIsExpanded(System.Collections.Generic.IEnumerable1<CodeNav.Models.CodeItem>, Microsoft.VisualStudio.Text.Outlining.ICollapsible, Boolean) at CodeNav.Helpers.OutliningHelper.RegionsExpanded(Microsoft.VisualStudio.Text.Outlining.RegionsExpandedEventArgs, System.Collections.Generic.IEnumerable1<CodeNav.Models.CodeItem>)
at CodeNav.CodeNavMargin.OutliningManager_RegionsExpanded(System.Object, Microsoft.VisualStudio.Text.Outlining.RegionsExpandedEventArgs)
at System.EventHandler`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Invoke(System.Object, System.__Canon)
at Microsoft.VisualStudio.Text.Outlining.OutliningManager.Expand(Microsoft.VisualStudio.Text.Outlining.ICollapsed)
at Microsoft.VisualStudio.Text.Editor.Implementation.CollapsedAdornment.HandleMouseDoubleClick(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs)
at System.Windows.Controls.Control.OnMouseDoubleClick(System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Controls.Control.HandleDoubleClick(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
at System.Windows.UIElement.OnMouseDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

I hope this will help you fix the issues.

Best regards,
Didier Prgomet

Error HRESULT E_FAIL has been returned from a call to a COM component.

{
   "version":{
      "Major":3,
      "Minor":2,
      "Build":148,
      "Revision":0,
      "MajorRevision":0,
      "MinorRevision":0
   },
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.Runtime.InteropServices.COMException",
      "Message":"Error HRESULT E_FAIL has been returned from a call to a COM component.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at EnvDTE.TextDocument.get_StartPoint()\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 113\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 70",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nget_StartPoint\nCodeNav, Version=3.2.148.0, Culture=neutral, PublicKeyToken=4bb830b01d479d3f\nEnvDTE.TextDocument\nEnvDTE.TextPoint get_StartPoint()",
      "HResult":-2147467259,
      "Source":"CodeNav",
      "WatsonBuckets":null
   },
   "timestamp":"2017-09-06T11:13:55.1455076+03:00"
}

NullReferenceException when closing file tabs.

Following error occurs randomly on closing tabs. I also experienced full Visual Studio crash after closing last tab.

System.NullReferenceException: Object reference not set to an instance of an object. at CodeNav.CodeNav..ctor(IWpfTextViewHost textViewHost, DTE dte) in C:\projects\codenav\CodeNav\CodeNav.cs:line 64 at CodeNav.CodeNavRightFactory.CreateMargin(IWpfTextViewHost wpfTextViewHost, IWpfTextViewMargin marginContainer) in C:\projects\codenav\CodeNav\CodeNavFactory.cs:line 78 at Microsoft.VisualStudio.Text.Utilities.ContainerMargin.<AddMargins>b__25_1(IWpfTextViewMarginProvider mp) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InstantiateExtension[TExtension,TMetadata,TExtensionInstance](Object errorSource, Lazy2 provider, Func2 getter)

Font size option and search/filter box are needed.

  1. The default font is too small. Please let users select the font size.

  2. There is no search/filter box. For example, sometimes I need to list only the methods whose name contains "_Click". If there is a search/filter box at the top, it would be helpful.

Feature Request - Preferred Sort Order

Would it be possible for the CodeNav to save the sorting preference?

At times, opening a file will generate the nav in a strange way and I'll have to set the sort order every time.

Text filter is not working

  1. Text filter is not working at all. I typed a few letters, nothing happened. I pressed the enter key, still nothing happened.

  2. After typing something, clicking the "Clear text filter" twice crashes Visual Studio.

  3. Under Dark theme, text and the cursor inside the text filter are practically invisible because they are black.

Installation issue

So I installed this, and... nothing. I thought a navigation was supposed to appear on left side of VS?

VS version: 2015 Enterprise Update 3.

NullReferenceException when clicked on refresh button.

Exception Info: System.NullReferenceException
   at CodeNav.Helpers.VisibilityHelper.SetCodeItemVisibility(System.Collections.Generic.List`1<CodeNav.Models.CodeItem>)
   at CodeNav.CodeViewUserControl.ButtonFilter_OnClick(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   at System.Windows.UIElement.OnMouseUpThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   at System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)

When clicked on refresh button.

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02036

Installed Version: Enterprise

Architecture and Modeling Tools   00322-90150-00888-AA929
Microsoft Architecture and Modeling Tools
    
UMLยฎ and Unified Modeling Languageโ„ข are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

Visual Basic 2015   00322-90150-00888-AA929
Microsoft Visual Basic 2015

Visual C# 2015   00322-90150-00888-AA929
Microsoft Visual C# 2015

Visual C++ 2015   00322-90150-00888-AA929
Microsoft Visual C++ 2015

Visual F# 2015   00322-90150-00888-AA929
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-90150-00888-AA929
Windows Phone SDK 8.0 - ENU

.ignore   1.2.71
A language service that makes it painless to handle all types of .ignore files such as .gitignore, .tfignore, etc.

ASP.NET and Web Tools 2015.1   14.1.21111.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9.6   14.0.21111.0
Azure App Service Tools v2.9.6

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.2100.0
Microsoft Azure Data Lake Tools for Visual Studio

BrowseInRemoteGitRepoCommand Extension   1.0
BrowseInRemoteGitRepoCommand Visual Studio Extension Detailed Info

Bundler & Minifier   2.2.307
Adds support for bundling and minifying JavaScript, CSS and HTML files in any project.

Clear MEF Component Cache   1.3.1
Clears the Visual Studio MEF component cache to fix issues with cache corruption.

CodeLineage   1.0
Information about my package

CodeMaid   10.2.7
CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.

CodeRush for Roslyn   16.2.4.0
DevExpress CodeRush for Roslyn package.

Common Azure Tools   1.8
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

DeviceFamily Adaptive XAML Tool Extension   1.0
DeviceFamily Adaptive XAML Tool Visual Studio Extension Detailed Info

EditProj   1.0
This packages allows you to edit project and solution files without the need to unload them first.

EventHandler Naming   1.2.0
EventHandler Naming

Creates better default names for event handling methods.

http://einaregilsson.com/better-eventhandler-names-in-visual-studio-2010/

Extensibility Tools   1.10.188
Contains numerous tools and helpers that makes it easier than ever to build Visual Studio extensions.

Fabric.DiagnosticEvents   1.0
Fabric Diagnostic Events

File Icons   2.5
Adds icons for files that are not recognized by Solution Explorer

File Nesting   1.0
Automatically nest files based on file name and enables developers to nest and unnest any file manually

Flatten Packages   1.1.15
Flattens the node_modules folder hierarchy by using the "flatten-packages" npm package behind the scenes. Works with long paths

GhostDoc   5.4.16325.0
GhostDoc automatically generates XML documentation comments.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

Markdown Editor   1.10.186
A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.

Microsoft .NET Core Tools (Preview 2)   14.1.21111.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Hive Query Language Service   2.2.2100.0
Language service for Hive query

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.41104.6

Multilingual App Toolkit   4.0.1795.0
Multilingual App Toolkit helps you localize your Windows Store app by providing file management, pseudo and machine translation, translation editor, and build integration. http://aka.ms/matinstall

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Open Command Line   2.1.179
Opens a command line at the root of the project. Support for all consoles such as CMD, PowerShell, Bash etc. Provides syntax highlighting, Intellisense and execution of .cmd and .bat files.

Package Installer   2.0.99
Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project

Package Security Alerts   1.0.17
Identifies npm and Bower packages that contains known security vulnerabilities to ensure your project is always using the most secure package versions.

Paket.VisualStudio   1.0
Manage your Paket dependencies from Visual Studio!

Paste-to-target   1.0
Speeds-up Copy/Paste operations by navigating back to the selected target once the Clipboard Copy (Ctrl+C) operation is performed. 

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

QuickLaunch Commands   1.5
Commands search provider integrating with Visual Studio's Quick Launch

SolutionIcon   1.0
Provides a drop-down box to attach to a running process.

SQL Server Analysis Services   13.0.1701.8
Microsoft SQL Server Analysis Services Designer 
Version 13.0.1701.8

SQL Server Data Tools   14.0.61021.0
Microsoft SQL Server Data Tools

Syntax Highlighting Pack   2.5.113
Adds syntax highlighting and snippet support for a wide variety of programming languages such as Clojure, Go, Jade, Lua, Swift, Ruby and many more...

ToastNotifier   1.0
Show Toast Notification when Bulid completed.

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   2.0.6.0
TypeScript tools for Visual Studio

Visual F# Power Tools   2.5.6
A collection of additional commands for F# in Visual Studio

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Web Compiler   1.11.326
Compiler for LESS, Sass and CoffeeScript files

Web Deploy Parameters Toolkit   1.6
Tools to make it easy to work with parameters in Web Deploy (MSDeploy).  This includes automatically generating a Parameters.xml file from a web.config file, generating SetParameters.xml file from Parameters.xml

WebPack Task Runner   1.5.79
Adds support for WebPack in Visual Studio 2015's Task Runner Explorer.

Xamarin Forms Player   1.0
Preview Xamarin.Forms XAML on devices and simulators, with support for data-binding via JSON dummy view models.

XamlStylerVSPackage   1.0
XAML Styler.

Exception: OutOfMemoryException thrown

Hi, I have a c# class that has way over 100 elements declared. When I try to view it's [CodeNav] associated window, it hangs VS 2017 Pro, every time.
Hint: When [CodeNav] extension is enabled, and I try to [Collapse/Expand] everything on this referenced class, VS throws an exception:
Exception of type 'System.OutOfMemoryException' was thrown.

This doesn't happen when [CodeNav] is disabled.

VC 2015 crash, if an interface has properties only

If i have an interface with Properties, VS does crash.

    interface ITestable
    {
            string Area { get; }
            string Name { get; }
            string Value { get; }
            DateTime LastChanged { get; }
    }

I tried to fix this, this code does help me (public static class CodeItemMapper, private static CodeItem MapFunction(CodeElement element), line: 66):

 private static CodeItem MapFunction(CodeElement element)
        {
            var function = element as CodeFunction;

            var item = MapBase<CodeFunctionItem>(element);
            if (function != null)
            {
                item.Type = MapReturnType(function.Type);
                item.Parameters = MapParameters(function);
                item.IconPath = function.FunctionKind == vsCMFunction.vsCMFunctionConstructor
                    ? "Icons/Method/MethodAdded_16x.xaml"
                    : MapIcon<CodeFunction>(element);
                item.Tooltip = $"{MapAccess(element)} {function.Type.AsString} {item.Name}{MapParameters(function, true)}";
                item.Id = item.Name + MapParameters(function, true, false);
                item.Kind = function.FunctionKind == vsCMFunction.vsCMFunctionConstructor
                    ? CodeItemKindEnum.Constructor
                    : CodeItemKindEnum.Method;

                return item;
            }
            else
            {
                item = MapProperty(element);
            }
            return item;
        }

I dont know if this is a correct fix, but i have no crashes.

Greetings

Issue with regions

Hi! I have found an issue with regions.

image

Test2 must be in #R1 region on the map.

Class for test

public class Class1
{
    #region R1
    public void Test1()
    {

        #region R11
        int i1 = 0;
        #endregion

        #region R12
        int i2 = 0;
        #endregion

        #region R13
        int i3 = 0;
        #endregion

        #region R14
        int i4 = 0;
        #endregion
    }

    public void Test2()
    {

    }

    #endregion
}

Switch sentence inside curly bracket doesn't get parsed.

In this example:

class SwitchClass1
    {
        void SwitchTest(int aParam)
        {
            {
                switch (aParam)
                {
                    case 0:
                        {
                            break;
                        }
                    case 1:
                        {
                            break;
                        }
                    case 2:
                        {
                            break;
                        }
                    default:
                        {
                            break;
                        }

                }
            }
        }
    }

CodeNav doesn't parse the switch statement. If you remove the enclosing brackets, and refresh CodeNav window, switch will appear there. Maybe it's kinda useless example, but it has same effect if you put switch sentence into a try-catch block.

Sequence contains no matching element

{
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.InvalidOperationException",
      "Message":"Sequence contains no matching element",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at CodeNav.Mappers.RegionMapper.MapRegions(SyntaxTree tree, TextSpan span) in C:\\projects\\codenav\\CodeNav\\Mappers\\RegionMapper.cs:line 30\r\n   at CodeNav.Mappers.SyntaxMapper.MapClass(ClassDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 260\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 155\r\n   at CodeNav.Mappers.SyntaxMapper.MapNamespace(NamespaceDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 544\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 155\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 102\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 73",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nLast\nSystem.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Linq.Enumerable\nTSource Last[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Boolean])",
      "HResult":-2146233079,
      "Source":"System.Core",
      "WatsonBuckets":null
   },
   "timestamp":"2017-09-01T20:24:04.6315563+02:00"
}

Double-clicking a method in CodeNav sometimes crashes Visual Studio 2017

I do not know the exact condition, but at least two times, when I double-clicked a method in CodeNav crashed Visual Studio 2017. I am sorry that I cannot provide the exact condition, but if possible, please examine the code for possible exceptions.

In addition, I suspect that CodeNav caused Visual Studio to hang for several seconds on several occasions. I remember those happened while I was typing in the code editor, so it is not 100% that they were caused by CodeNav, but I had not experienced such long hang while typing before installing CodeNav.

Dark theme support

Please add dark Visual Studio theme support. When used with dark theme white strip on the left just blinds the coder ;)

Syntax node is not within syntax tree

{
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.ArgumentException",
      "Message":"Syntax node is not within syntax tree",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at Microsoft.CodeAnalysis.CSharp.CSharpSemanticModel.CheckSyntaxNode(CSharpSyntaxNode syntax)\r\n   at Microsoft.CodeAnalysis.CSharp.SyntaxTreeSemanticModel.GetDeclaredSymbol(BaseTypeDeclarationSyntax declarationSyntax, CancellationToken cancellationToken)\r\n   at CodeNav.Mappers.SyntaxMapper.MapImplementedInterfaces(ClassDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 305\r\n   at CodeNav.Mappers.SyntaxMapper.MapClass(ClassDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 254\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 148\r\n   at CodeNav.Mappers.SyntaxMapper.MapNamespace(NamespaceDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 524\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 148\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 102\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 73",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nCheckSyntaxNode\nMicrosoft.CodeAnalysis.CSharp, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\nMicrosoft.CodeAnalysis.CSharp.CSharpSemanticModel\nVoid CheckSyntaxNode(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode)",
      "HResult":-2147024809,
      "Source":"Microsoft.CodeAnalysis.CSharp",
      "WatsonBuckets":null,
      "ParamName":null
   },
   "timestamp":"2017-08-22T21:12:57.8890072+02:00"
}

Set cursor to code when clicking on a function

When clicking on a function in the CodeNav window, it would be nice to set the cursor to the function in the text-editor so we can start typing without clicking again in the text-editor window.

Add parser for cases in switch statement

Thank you for your great addon, but i have suggestions for improvement:

It would be great if you added parsing of switch statement in a method and all statement's cases, it would make navigating through big monster switches, which are not so uncommon much easier ( at least i think so ;) ).

I'd also suggest to add decoration for CodeNav window, so it could be used as tabbed document, be pinned and be auto hidable as are other information windoes in visual studio.

Visual Studio 2017 Community Crashes when Collapse All Regions

When clicking on the 'Collapse All Regions' button at the top right of the control VS2017 Community crashes and restarts.
This happens after the CodeNav has been detached from a window by selecting the 'none' option as opposed to 'right' or 'left'.

Using Windows 10 Pro 64Bit ver 1703 OS Build 15063.483

This is the method that causes the crash in OutliningHelper.cs
manager and textView are null.

    private static ICollapsible FindCollapsibleFromCodeItem(CodeItem item, IOutliningManager manager, IWpfTextView textView)
    {
            if (item.Kind == CodeItemKindEnum.ImplementedInterface) return null;
            if (item.StartLine > textView.TextBuffer.CurrentSnapshot.LineCount) return null;

            var snapshotLine = textView.TextBuffer.CurrentSnapshot.GetLineFromLineNumber(item.StartLine);
            var collapsibles = manager.GetAllRegions(snapshotLine.Extent);

            return (from collapsible in collapsibles
                    let startLine = GetStartLineForCollapsible(collapsible)
                    where startLine == item.StartLine
                    select collapsible).FirstOrDefault();
    }

System.Transactions Critical: 0 :
http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled
Unhandled exceptionDefaultDomain
System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Object reference not set to an instance of an object.
at CodeNav.Helpers.OutliningHelper.FindCollapsibleFromCodeItem(CodeItem item, IOutliningManager manager, IWpfTextView textView) in C:\projects\codenav\CodeNav\Helpers\OutliningHelper.cs:line 123
at CodeNav.Helpers.OutliningHelper.SetAllRegions(IEnumerable1 document, Boolean isExpanded) in C:\projects\codenav\CodeNav\Helpers\OutliningHelper.cs:line 48 at CodeNav.Controls.MainToolbar.ButtonRegion_OnClick(Object sender, RoutedEventArgs e) in C:\projects\codenav\CodeNav\Controls\MainToolbar.xaml.cs:line 61 at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) at System.Windows.Controls.Primitives.ButtonBase.OnClick() at System.Windows.Controls.Primitives.ToggleButton.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e) at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp;amp; handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)</StackTrace><ExceptionString>System.NullReferenceException: Object reference not set to an instance of an object. at CodeNav.Helpers.OutliningHelper.FindCollapsibleFromCodeItem(CodeItem item, IOutliningManager manager, IWpfTextView textView) in C:\projects\codenav\CodeNav\Helpers\OutliningHelper.cs:line 123 at CodeNav.Helpers.OutliningHelper.SetAllRegions(IEnumerable1 document, Boolean isExpanded) in C:\projects\codenav\CodeNav\Helpers\OutliningHelper.cs:line 48
at CodeNav.Controls.MainToolbar.ButtonRegion_OnClick(Object sender, RoutedEventArgs e) in C:\projects\codenav\CodeNav\Controls\MainToolbar.xaml.cs:line 61
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Primitives.ToggleButton.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean&amp; handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)

Structure is not shown for a source code reconstructed from metadata

If you try to jump to the definition of a method that is inside of a DLL, Visual Studio shows the reconstructed source code from its metadata. The structure is currently not shown, but it would be helpful it is shown.

Below is a comparison with "SuperCharger" (on the right), when navigated to a BCL class.
metadata

new 4.0 version make VS 2017 to crash

To reproduce it:
Previously install and 3.x version, use it and then update to the 4. version.
Open a fresh VS session (VS 15.4.4)
Open any c# file, (even via new file VS menu)
The VS crash (open a small dialog with an error msg and clicking ok shutdown VS)

Goes back to 3.9.157 solve the problem

Sequence contains no matching element

{
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.InvalidOperationException",
      "Message":"Sequence contains no matching element",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source, Func`2 predicate)\r\n   at CodeNav.Mappers.RegionMapper.MapRegions(SyntaxTree tree, TextSpan span) in C:\\projects\\codenav\\CodeNav\\Mappers\\RegionMapper.cs:line 27\r\n   at CodeNav.Mappers.SyntaxMapper.MapClass(ClassDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 253\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 148\r\n   at CodeNav.Mappers.SyntaxMapper.MapNamespace(NamespaceDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 524\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 148\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 102\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 73",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nLast\nSystem.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Linq.Enumerable\nTSource Last[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Boolean])",
      "HResult":-2146233079,
      "Source":"System.Core",
      "WatsonBuckets":null
   },
   "timestamp":"2017-08-22T15:15:54.2125747-04:00"
}

System.NullReferenceException

{
   "version":{
      "Major":3,
      "Minor":3,
      "Build":149,
      "Revision":0,
      "MajorRevision":0,
      "MinorRevision":0
   },
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.NullReferenceException",
      "Message":"Object reference not set to an instance of an object.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at CodeNav.Mappers.RegionMapper.AddToRegion(List`1 members, CodeItem item) in C:\\projects\\codenav\\CodeNav\\Mappers\\RegionMapper.cs:line 133\r\n   at CodeNav.Mappers.RegionMapper.AddToRegion(List`1 members, CodeItem item) in C:\\projects\\codenav\\CodeNav\\Mappers\\RegionMapper.cs:line 128\r\n   at CodeNav.Mappers.RegionMapper.AddToRegion(List`1 regions, CodeItem item) in C:\\projects\\codenav\\CodeNav\\Mappers\\RegionMapper.cs:line 101\r\n   at CodeNav.Mappers.SyntaxMapper.MapClass(ClassDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 290\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 179\r\n   at CodeNav.Mappers.SyntaxMapper.MapNamespace(NamespaceDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 568\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 179\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 111\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 73",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nAddToRegion\nCodeNav, Version=3.3.149.0, Culture=neutral, PublicKeyToken=4bb830b01d479d3f\nCodeNav.Mappers.RegionMapper\nBoolean AddToRegion(System.Collections.Generic.List`1[CodeNav.Models.CodeItem], CodeNav.Models.CodeItem)",
      "HResult":-2147467261,
      "Source":"CodeNav",
      "WatsonBuckets":null
   },
   "timestamp":"2017-09-20T12:56:36.2575393+02:00"
}

vs15.3 crash

ๅบ”็”จ็จ‹ๅบ: devenv.exe
Framework ็‰ˆๆœฌ: v4.0.30319
่ฏดๆ˜Ž: ็”ฑไบŽๆœช็ปๅค„็†็š„ๅผ‚ๅธธ๏ผŒ่ฟ›็จ‹็ปˆๆญขใ€‚
ๅผ‚ๅธธไฟกๆฏ: System.NullReferenceException
   ๅœจ Microsoft.VisualStudio.Shell.TableControl.Implementation.TrackingListGridViewHeaderRowPresenter.IsColumnMovable(Microsoft.VisualStudio.Shell.TableControl.Implementation.TableHeaderControl)
   ๅœจ Microsoft.VisualStudio.Shell.TableControl.Implementation.TrackingListGridViewHeaderRowPresenter.OnMouseLeftButtonDown(System.Windows.Input.MouseButtonEventArgs)
   ๅœจ System.Windows.UIElement.OnMouseLeftButtonDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   ๅœจ System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   ๅœจ System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   ๅœจ System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   ๅœจ System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   ๅœจ System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent)
   ๅœจ System.Windows.UIElement.OnMouseDownThunk(System.Object, System.Windows.Input.MouseButtonEventArgs)
   ๅœจ System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(System.Delegate, System.Object)
   ๅœจ System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object)
   ๅœจ System.Windows.RoutedEventHandlerInfo.InvokeHandler(System.Object, System.Windows.RoutedEventArgs)
   ๅœจ System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean)
   ๅœจ System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs)
   ๅœจ System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs)
   ๅœจ System.Windows.UIElement.RaiseEvent(System.Windows.RoutedEventArgs, Boolean)
   ๅœจ System.Windows.Input.InputManager.ProcessStagingArea()
   ๅœจ System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs)
   ๅœจ System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport)
   ๅœจ System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32)
   ๅœจ System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef)
   ๅœจ System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   ๅœจ MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   ๅœจ MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   ๅœจ System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   ๅœจ System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   ๅœจ System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   ๅœจ MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   ๅœจ MS.Win32.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr, Int32, IntPtr, IntPtr)
   ๅœจ MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
ๆ— ๆณ•ๆ‰พๅˆฐๆฅ่‡ชๆบ Application ็š„ไบ‹ไปถ ID 0 ็š„ๆ่ฟฐใ€‚ๆœฌๅœฐ่ฎก็ฎ—ๆœบไธŠๆœชๅฎ‰่ฃ…ๅผ•ๅ‘ๆญคไบ‹ไปถ็š„็ป„ไปถ๏ผŒๆˆ–่€…ๅฎ‰่ฃ…ๅทฒๆŸๅใ€‚ๅฏไปฅๅฎ‰่ฃ…ๆˆ–ไฟฎๅคๆœฌๅœฐ่ฎก็ฎ—ๆœบไธŠ็š„็ป„ไปถใ€‚

ๅฆ‚ๆžœ่ฏฅไบ‹ไปถไบง็”ŸไบŽๅฆไธ€ๅฐ่ฎก็ฎ—ๆœบ๏ผŒๅˆ™ๅฟ…้กปๅœจ่ฏฅไบ‹ไปถไธญไฟๅญ˜ๆ˜พ็คบไฟกๆฏใ€‚

ไปฅไธ‹ๆ˜ฏๅŒ…ๅซๅœจไบ‹ไปถไธญ็š„ไฟกๆฏ: 

้”™่ฏฏๅค„็†็จ‹ๅบๅผ‚ๅธธ: System.ServiceModel.CommunicationException: ่ฏปๅ–็ฎก้“ๆ—ถๅ‡บ้”™: ็ฎก้“ๅทฒ็ป“ๆŸใ€‚ (109, 0x6d)ใ€‚ ---> System.IO.IOException: ่ฏปๅ–ๆ“ไฝœๅคฑ่ดฅ๏ผŒ่ฏทๅ‚่งๅ†…้ƒจๅผ‚ๅธธใ€‚ ---> System.ServiceModel.CommunicationException: ่ฏปๅ–็ฎก้“ๆ—ถๅ‡บ้”™: ็ฎก้“ๅทฒ็ป“ๆŸใ€‚ (109, 0x6d)ใ€‚ ---> System.IO.PipeException: ่ฏปๅ–็ฎก้“ๆ—ถๅ‡บ้”™: ็ฎก้“ๅทฒ็ป“ๆŸใ€‚ (109, 0x6d)ใ€‚
   ๅœจ System.ServiceModel.Channels.PipeConnection.OnAsyncReadComplete(Boolean haveResult, Int32 error, Int32 numBytes)
   --- ๅ†…้ƒจๅผ‚ๅธธๅ †ๆ ˆ่ทŸ่ธช็š„็ป“ๅฐพ ---
   ๅœจ System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   ๅœจ System.ServiceModel.Channels.ConnectionStream.EndRead(IAsyncResult asyncResult)
   ๅœจ System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
   --- ๅ†…้ƒจๅผ‚ๅธธๅ †ๆ ˆ่ทŸ่ธช็š„็ป“ๅฐพ ---
   ๅœจ System.Net.Security.NegotiateStream.EndRead(IAsyncResult asyncResult)
   ๅœจ System.ServiceModel.Channels.StreamConnection.EndRead()
   --- ๅ†…้ƒจๅผ‚ๅธธๅ †ๆ ˆ่ทŸ่ธช็š„็ป“ๅฐพ ---
   ๅœจ System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   ๅœจ System.ServiceModel.Channels.TransportDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message& message)
   ๅœจ System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
   ๅœจ System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext) \r\n    ๅœจ System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   ๅœจ System.ServiceModel.Channels.TransportDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message& message)
   ๅœจ System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
   ๅœจ System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)

ๆถˆๆฏ่ต„ๆบๅญ˜ๅœจ๏ผŒไฝ†ๅœจๅญ—็ฌฆไธฒ/ๆถˆๆฏ่กจไธญๆ‰พไธๅˆฐ่ฏฅๆถˆๆฏ

System.NullReferenceException

{
   "version":{
      "Major":3,
      "Minor":2,
      "Build":148,
      "Revision":0,
      "MajorRevision":0,
      "MinorRevision":0
   },
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.NullReferenceException",
      "Message":"Object reference not set to an instance of an object.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at CodeNav.Mappers.RegionMapper.MapRegions(SyntaxTree tree, TextSpan span) in C:\\projects\\codenav\\CodeNav\\Mappers\\RegionMapper.cs:line 17\r\n   at CodeNav.Mappers.SyntaxMapper.MapClass(ClassDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 260\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 155\r\n   at CodeNav.Mappers.SyntaxMapper.MapNamespace(NamespaceDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 544\r\n   at CodeNav.Mappers.SyntaxMapper.MapMember(MemberDeclarationSyntax member) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 155\r\n   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 102\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 73",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nMapRegions\nCodeNav, Version=3.2.148.0, Culture=neutral, PublicKeyToken=4bb830b01d479d3f\nCodeNav.Mappers.RegionMapper\nSystem.Collections.Generic.List`1[CodeNav.Models.CodeRegionItem] MapRegions(Microsoft.CodeAnalysis.SyntaxTree, Microsoft.CodeAnalysis.Text.TextSpan)",
      "HResult":-2147467261,
      "Source":"CodeNav",
      "WatsonBuckets":null
   },
   "timestamp":"2017-09-05T16:54:16.5492449-04:00"
}

Essential configuration.

Please add basic configuration like displaying on the right side or hiding the control. It would be nice if the user could choose which members are displayed: public, protected, private, static, fields, properties, methods, events. Just a simple filter looking exactly like the one shown by VS 2017 when auto-complete for C# kicks in.

System.InvalidCastException

{
   "version":{
      "Major":3,
      "Minor":2,
      "Build":148,
      "Revision":0,
      "MajorRevision":0,
      "MinorRevision":0
   },
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.InvalidCastException",
      "Message":"Unable to cast object of type 'Microsoft.CodeAnalysis.VisualBasic.Syntax.CompilationUnitSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.CompilationUnitSyntax'.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 100\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 73",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nMapDocument\nCodeNav, Version=3.2.148.0, Culture=neutral, PublicKeyToken=4bb830b01d479d3f\nCodeNav.Mappers.SyntaxMapper\nSystem.Collections.Generic.List`1[CodeNav.Models.CodeItem] MapDocument(Microsoft.CodeAnalysis.Document)",
      "HResult":-2147467262,
      "Source":"CodeNav",
      "WatsonBuckets":null
   },
   "timestamp":"2017-09-06T10:53:20.3562993+01:00"
}

private properties showing as [Public] upon mouse hover

Hi, I've found two minor issues:

1. If I declare:
int LineId { get; set; }

On the [CodeNav] window, upon mouse hover, the extended info shows as:
Public int LineId LineId {get; set; }

2. If I add the [private] keyword in front like:
private int LineId { get; set; }

[LineId] disappears from the [CodeNav] window.


On both cases, I think they could appear on [CodeNav] window as [Private] on mouse hover.

Thanks!

Navigating to a class inside a DLL crashes Visual Studio 2017

Steps to reproduce:

  1. Locate the cursor on a class inside a DLL, such as the Form of the following code.

     public partial class Form1 : Form
    
  2. Press "F12" to navigate to Form.

The exception message is,

System.NullReferenceException: 'Object reference not set to an instance of an object.'

Cannot access a disposed object

{
   "message":"RunWorkerCompleted exception",
   "exception":{
      "ClassName":"System.ObjectDisposedException",
      "Message":"Cannot access a disposed object.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at Microsoft.VisualStudio.Text.Outlining.OutliningManager.EnsureValid()\r\n   at Microsoft.VisualStudio.Text.Outlining.OutliningManager.EnsureValid(SnapshotSpan span)\r\n   at Microsoft.VisualStudio.Text.Outlining.OutliningManager.GetAllRegions(SnapshotSpan span, Boolean exposedRegionsOnly)\r\n   at Microsoft.VisualStudio.Text.Outlining.OutliningManager.GetAllRegions(SnapshotSpan span)\r\n   at CodeNav.Helpers.OutliningHelper.FindCollapsibleFromCodeItem(CodeItem item, IOutliningManager manager, IWpfTextView textView) in C:\\projects\\codenav\\CodeNav\\Helpers\\OutliningHelper.cs:line 128\r\n   at CodeNav.Helpers.OutliningHelper.SyncAllRegions(IOutliningManager manager, IWpfTextView textView, IEnumerable`1 document) in C:\\projects\\codenav\\CodeNav\\Helpers\\OutliningHelper.cs:line 66\r\n   at CodeNav.CodeViewUserControl.BackgroundWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) in C:\\projects\\codenav\\CodeNav\\CodeViewUserControl.xaml.cs:line 257",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nEnsureValid\nMicrosoft.VisualStudio.Platform.VSEditor, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\nMicrosoft.VisualStudio.Text.Outlining.OutliningManager\nVoid EnsureValid()",
      "HResult":-2146232798,
      "Source":"Microsoft.VisualStudio.Platform.VSEditor",
      "WatsonBuckets":null,
      "ObjectName":"OutliningManager"
   },
   "timestamp":"2017-08-22T10:41:30.4811552-05:00"
}

"internal delegate" crashes Visual Studio

Steps to reproduce:

  1. Type internal delegate void Test(int id);
  2. Press Ctrl + S to save it.

System.IO.IOException occurred
Message=Cannot locate resource 'icons/delegate/delegateprotect_16x.xaml'.

Feature Request: Region Sync & Collapse All

Excellent alternative for CodeMap/Supercharger.tools, just missing this one feature to make it complete for me!

  • Sync Region expand/collapse.
  • Add "Collapse All" button to CodeNav.

CodeNav sidebar won't stay disabled

First off, I LOVE this extension.

Now, there's one thing that bugs me: if you turn it off by double clicking on the sidebar dividing line, it seems to stay off only for that particular file (not sure though, didn't look into this extensively). Anyway, I think it'd be more intuitive if it stayed permanently off, across all files. I'm not going to spend a lot of time in one file only, and when you switch to another file, there it is again...
Also, when I go to CodeNav options and switch "Show CodeNav on this side" to "None", nothing happens?

EDIT: Once you close the file and opet it again, there comes the sidebar. Basically it's hard to keep it turned off.

System.ObjectDisposedException

{
   "message":"RunWorkerCompleted exception",
   "exception":{
      "ClassName":"System.ObjectDisposedException",
      "Message":"Cannot access a disposed object.\r\nObject name: 'MarshalingWindowFrame'.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)\r\n   at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_DocCookie()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_Document()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.<get_Document>b__27_0()\r\n   at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[TResult](Func`1 method)\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.get_Document()\r\n   at CodeNav.CodeViewUserControl.BackgroundWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) in C:\\projects\\codenav\\CodeNav\\CodeViewUserControl.xaml.cs:line 224",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nThrowExceptionForHRInternal\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Runtime.InteropServices.Marshal\nVoid ThrowExceptionForHRInternal(Int32, IntPtr)",
      "HResult":-2146232798,
      "Source":"   at Microsoft.VisualStudio.PlatformUI.DisposableObject.ThrowIfDisposed()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<>c__DisplayClass469_0.<GetProperty>b__0()\r\n   at Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(Func`1 method, Boolean reportError, Boolean setShellErrorInfo)",
      "WatsonBuckets":null,
      "ObjectName":""
   },
   "timestamp":"2017-09-01T12:14:13.0283567-05:00"
}
{
   "message":"RunWorkerCompleted exception",
   "exception":{
      "ClassName":"System.ObjectDisposedException",
      "Message":"Cannot access a disposed object.\r\nObject name: 'MarshalingWindowFrame'.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)\r\n   at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_DocCookie()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_Document()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.<get_Document>b__27_0()\r\n   at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[TResult](Func`1 method)\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.get_Document()\r\n   at CodeNav.CodeViewUserControl.BackgroundWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) in C:\\projects\\codenav\\CodeNav\\CodeViewUserControl.xaml.cs:line 235",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nThrowExceptionForHRInternal\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Runtime.InteropServices.Marshal\nVoid ThrowExceptionForHRInternal(Int32, IntPtr)",
      "HResult":-2146232798,
      "Source":"   at Microsoft.VisualStudio.PlatformUI.DisposableObject.ThrowIfDisposed()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<>c__DisplayClass462_0.<GetProperty>b__0()\r\n   at Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(Func`1 method, Boolean reportError, Boolean setShellErrorInfo)",
      "WatsonBuckets":null,
      "ObjectName":""
   },
   "timestamp":"2017-09-01T12:43:02.868012-04:00"
}
{
   "message":"RunWorkerCompleted exception",
   "exception":{
      "ClassName":"System.ObjectDisposedException",
      "Message":"Cannot access a disposed object.\r\nObject name: 'MarshalingWindowFrame'.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)\r\n   at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_DocCookie()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.DocumentWindow.get_Document()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.<get_Document>b__27_0()\r\n   at Microsoft.VisualStudio.Shell.ThreadHelper.Invoke[TResult](Func`1 method)\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.DTE.WindowBase.get_Document()\r\n   at CodeNav.CodeViewUserControl.BackgroundWorker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e) in C:\\projects\\codenav\\CodeNav\\CodeViewUserControl.xaml.cs:line 259",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nThrowExceptionForHRInternal\nmscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Runtime.InteropServices.Marshal\nVoid ThrowExceptionForHRInternal(Int32, IntPtr)",
      "HResult":-2146232798,
      "Source":"   at Microsoft.VisualStudio.PlatformUI.DisposableObject.ThrowIfDisposed()\r\n   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.<>c__DisplayClass462_0.<GetProperty>b__0()\r\n   at Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(Func`1 method, Boolean reportError, Boolean setShellErrorInfo)",
      "WatsonBuckets":null,
      "ObjectName":""
   },
   "timestamp":"2017-09-01T10:54:28.8950259-07:00"
}

Region detection in vb

Hi

In RegionMapper.cs the function "MapRegions"

Exist this code for open region (lambda expressions)
i.Kind() == SyntaxKind.RegionDirectiveTrivia

And this for close (lambda expressions)
j.Kind() == SyntaxKind.EndRegionDirectiveTrivia

But in Visual Basic the open region is SyntaxKind.None for both (I do not know why
) :/

I'm tried this code and it work good, but i don't know if it is the best solution

    public static List<CodeRegionItem> MapRegions(SyntaxTree tree, TextSpan span)
        {
            var regionList = new List<CodeRegionItem>();

            if (tree == null) return regionList;

            var root = tree.GetRoot();

            foreach (var regionDirective in root.DescendantTrivia().Where(i => (i.Kind() == SyntaxKind.RegionDirectiveTrivia || (i.Kind() == SyntaxKind.None && i.ToString().StartsWith("#Region ", System.StringComparison.OrdinalIgnoreCase))) && span.Contains(i.Span)))
            {
                regionList.Add(MapRegion(regionDirective));
            }

            if (!regionList.Any()) return regionList;

            foreach (var endRegionDirective in root.DescendantTrivia().Where(j => (j.Kind() == SyntaxKind.EndRegionDirectiveTrivia || (j.Kind() == SyntaxKind.None && j.ToString().StartsWith("#End Region", System.StringComparison.OrdinalIgnoreCase))) && span.Contains(j.Span)))
            {
                var reg = regionList.LastOrDefault(x => x.StartLine < GetStartLine(endRegionDirective) && x.EndLine == 0);
                if (reg != null)
                {
                    reg.EndLine = GetEndLine(endRegionDirective);
                }
            }

            var list = ToHierarchy(regionList, int.MinValue, int.MaxValue);

            return list.Select(r => r as CodeRegionItem).ToList();
        }

And this update for name detection (Insensitive case)


        private static CodeRegionItem MapRegion(SyntaxTrivia source)
        {
            var name = source.ToString();

            if (name.StartsWith("#Region ", System.StringComparison.OrdinalIgnoreCase))
            {
                name = name.Remove(1,6);
            }

            return new CodeRegionItem
            {
                Name = name,
                FullName = name,
                Id = name,
                Tooltip = name,
                StartLine = GetStartLine(source),
                Foreground = ColorHelper.CreateSolidColorBrush(Colors.Black),
                BorderBrush = ColorHelper.CreateSolidColorBrush(Colors.DarkGray),
                FontSize = Settings.Default.Font.SizeInPoints - 2,
                Kind = CodeItemKindEnum.Region
            };
        }


Thanks and good day!

System.NullReferenceException

{
   "version":{
      "Major":3,
      "Minor":2,
      "Build":148,
      "Revision":0,
      "MajorRevision":0,
      "MinorRevision":0
   },
   "message":"Error during mapping",
   "exception":{
      "ClassName":"System.NullReferenceException",
      "Message":"Object reference not set to an instance of an object.",
      "Data":null,
      "InnerException":null,
      "HelpURL":null,
      "StackTraceString":"   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document document) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 100\r\n   at CodeNav.Mappers.SyntaxMapper.MapDocument(Document activeDocument, CodeViewUserControl control, VisualStudioWorkspace workspace) in C:\\projects\\codenav\\CodeNav\\Mappers\\SyntaxMapper.cs:line 73",
      "RemoteStackTraceString":null,
      "RemoteStackIndex":0,
      "ExceptionMethod":"8\nMapDocument\nCodeNav, Version=3.2.148.0, Culture=neutral, PublicKeyToken=4bb830b01d479d3f\nCodeNav.Mappers.SyntaxMapper\nSystem.Collections.Generic.List`1[CodeNav.Models.CodeItem] MapDocument(Microsoft.CodeAnalysis.Document)",
      "HResult":-2147467261,
      "Source":"CodeNav",
      "WatsonBuckets":null
   },
   "timestamp":"2017-09-06T13:15:00.2478102+04:30"
}

Outlining

It would be great if extensions outlining repeats code outlining, More or less.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.