sboulema / codenav Goto Github PK
View Code? Open in Web Editor NEWVisual Studio extension to show the code structure of your current document
License: MIT License
Visual Studio extension to show the code structure of your current document
License: MIT License
Hi! I have found an issue with regions.
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
}
Refreshing the nav works by showing any new code, but it looks like it isn't applying the selected sort properly. I have to click an option again afterwards e.g "Sort by file order".
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.
Please add dark Visual Studio theme support. When used with dark theme white strip on the left just blinds the coder ;)
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.
Steps to reproduce:
Locate the cursor on a class inside a DLL, such as the Form
of the following code.
public partial class Form1 : Form
Press "F12" to navigate to Form.
The exception message is,
System.NullReferenceException: 'Object reference not set to an instance of an object.'
{
"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"
}
{
"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"
}
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!
Steps to reproduce:
internal delegate void Test(int id);
System.IO.IOException occurred
Message=Cannot locate resource 'icons/delegate/delegateprotect_16x.xaml'.
应用程序: 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)
消息资源存在,但在字符串/消息表中找不到该消息
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.
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')
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.
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.
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.
{
"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"
}
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
Test if VS2015 and VS2017 support is not broken
{
"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"
}
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; 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)</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(IEnumerable
1 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& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& 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)
The default font is too small. Please let users select the font size.
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.
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, Lazy
2 provider, Func
2 getter)
{
"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"
}
{
"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"
}
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.
https://stackoverflow.com/questions/22666144/detect-current-vsix-packages-version-from-code
https://github.com/codecadwallader/codemaid/blob/master/appveyor.yml
{
"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"
}
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.
namespace A
{
namespace B
{
public class C { }
}
}
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).
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
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.IEnumerable
1<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
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!
{
"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"
}
It would be helpful if there is option to scroll automatically to the current method when it is outside the visible portion.
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.
I was expecting a large update from the 4.0 bump, and was surprised to find just minor improvements. Have you considered using Semantic Versioning?
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
To reproduce:
It would be great if extensions outlining repeats code outlining, More or less.
{
"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"
}
Is there any plan to make private fields visible or is there some limitation that prevents it?
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.
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.
2017 rc crashes when clicking on a method name.
Excellent alternative for CodeMap/Supercharger.tools, just missing this one feature to make it complete for me!
Text filter is not working at all. I typed a few letters, nothing happened. I pressed the enter key, still nothing happened.
After typing something, clicking the "Clear text filter" twice crashes Visual Studio.
Under Dark theme, text and the cursor inside the text filter are practically invisible because they are black.
{
"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"
}
{
"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"
}
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.