{"id":6392,"date":"2015-04-30T03:31:43","date_gmt":"2015-04-30T02:31:43","guid":{"rendered":"http:\/\/sysprogs.com\/w\/?p=6392"},"modified":"2016-07-16T22:22:45","modified_gmt":"2016-07-16T21:22:45","slug":"visualgdb-5-0-beta-1-refactoring-and-c-codemap","status":"publish","type":"post","link":"https:\/\/sysprogs.com\/w\/visualgdb-5-0-beta-1-refactoring-and-c-codemap\/","title":{"rendered":"VisualGDB 5.0 Beta 1 &#8211; Refactoring and C++ CodeMap"},"content":{"rendered":"<p>After several preview builds of VisualGDB 5.0 with the new Clang-based IntelliSense engine\u00a0introducing\u00a0features from\u00a0precise code suggestions to fast find-all-references, we are\u00a0now proud to release the first beta of VisualGDB 5.0. The beta adds a few\u00a0more features\u00a0targeted at C++ development\u00a0productivity:<\/p>\n<ul>\n<li>CodeMap for C++ (requires VS2012+, but\u00a0also works on the free\u00a0Community Edition)<\/li>\n<li>Advanced renaming<\/li>\n<li>Intuitive refactoring<\/li>\n<\/ul>\n<p>Let&#8217;s have a detailed look at those new features.<br \/>\n<!--more--><\/p>\n<h2>CodeMap<\/h2>\n<p>We have added\u00a0support for C++ code to\u00a0the CodeMap feature introduced in Visual Studio 2012 for managed code. It works seamlessly just like for\u00a0C# code: right-click on a function, variable or a field in Visual Studio and select &#8220;Show on Code map&#8221;:<\/p>\n<p><a href=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/codemap.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6393\" src=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/codemap.png\" alt=\"codemap\" width=\"933\" height=\"733\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/codemap.png 933w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/codemap-300x236.png 300w\" sizes=\"(max-width: 933px) 100vw, 933px\" \/><\/a>You can then right-click on the\u00a0CodeMap block to view:<\/p>\n<ul>\n<li>All functions called by a function<\/li>\n<li>All functions calling a given function<\/li>\n<li>All functions accessing a\u00a0field or a global variable<\/li>\n<li>For virtual methods, all methods overridden by a\u00a0method or methods in derived classes overriding it<\/li>\n<li>For classes, all base and derived\u00a0classes<\/li>\n<li>For fields and global variables, all functions\/methods accessing them<\/li>\n<li>All\u00a0fields\/methods inside a class<\/li>\n<\/ul>\n<p>The CodeMap\u00a0uses the same\u00a0heavily optimized code database that we use for go-to-definition and other commands, so\u00a0running a query takes seconds even for huge code bases like the Linux kernel.<\/p>\n<h2>Advanced Renaming<\/h2>\n<p>We have\u00a0added support for\u00a0seamless renaming of C++ entities.\u00a0Each time you edit a name of a C++ declaration, VisualGDB will create a\u00a0smart tag allowing you to rename all references with just one click:<\/p>\n<p><a href=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/rename.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6394\" src=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/rename.png\" alt=\"rename\" width=\"992\" height=\"504\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/rename.png 992w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/rename-300x152.png 300w\" sizes=\"(max-width: 992px) 100vw, 992px\" \/><\/a>Renaming logic automatically discovers overriding\/overridden methods\u00a0in base and derived classes, so renaming a method in an interface won&#8217;t break inheritance.\u00a0Renaming also works for preprocessor macros and\u00a0updates constructors\/destructors when renaming classes.<\/p>\n<h2>Seamless refactorring<\/h2>\n<p>We have\u00a0automated\u00a0the most annoying\u00a0routine tasks associated with C++ coding. First of all, when you type in a new function or method declaration, VisualGDB\u00a0recognizes that and offers to generate implementation in the source file. It takes care of the argument indentation and even prefixes\u00a0nested type names correctly:<a href=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/impl.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6395\" src=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/impl.png\" alt=\"impl\" width=\"954\" height=\"217\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/impl.png 954w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/impl-300x68.png 300w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><\/a>When adding implementations for\u00a0constructors, you can select to generate an initialization list and VisualGDB will automatically create one for you. The\u00a0indentation and positions of commas can be configured via code formatting\u00a0settings.<a href=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/constr.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6396\" src=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/constr.png\" alt=\"constr\" width=\"680\" height=\"270\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/constr.png 680w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/constr-300x119.png 300w\" sizes=\"(max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Finally,\u00a0we have added support for implementing interfaces.\u00a0When VisualGDB detects that a class\u00a0that inherits from another class does not override some of its\u00a0pure virtual methods, it will show a smart tag allowing to implement missing methods with just one click:<br \/>\n<a href=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/iface.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6397\" src=\"http:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/iface.png\" alt=\"iface\" width=\"449\" height=\"191\" srcset=\"https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/iface.png 449w, https:\/\/sysprogs.com\/w\/wp-content\/uploads\/2015\/04\/iface-300x128.png 300w\" sizes=\"(max-width: 449px) 100vw, 449px\" \/><\/a>You can try out the new beta at the <a href=\"http:\/\/visualgdb.com\/download\/\">VisualGDB download page<\/a>. And do not hesitate to send your suggestions and bugreports via\u00a0our <a href=\"http:\/\/sysprogs.com\/support\/\">support form<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After several preview builds of VisualGDB 5.0 with the new Clang-based IntelliSense engine\u00a0introducing\u00a0features from\u00a0precise code suggestions to fast find-all-references, we are\u00a0now proud to release the first beta of VisualGDB 5.0. The beta adds a few\u00a0more features\u00a0targeted at C++ development\u00a0productivity: CodeMap for C++ (requires VS2012+, but\u00a0also works on the free\u00a0Community Edition) Advanced renaming Intuitive refactoring Let&#8217;s &hellip; <a href=\"https:\/\/sysprogs.com\/w\/visualgdb-5-0-beta-1-refactoring-and-c-codemap\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">VisualGDB 5.0 Beta 1 &#8211; Refactoring and C++ CodeMap<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts\/6392"}],"collection":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/comments?post=6392"}],"version-history":[{"count":3,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts\/6392\/revisions"}],"predecessor-version":[{"id":8570,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/posts\/6392\/revisions\/8570"}],"wp:attachment":[{"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/media?parent=6392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/categories?post=6392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sysprogs.com\/w\/wp-json\/wp\/v2\/tags?post=6392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}