Clang IntelliSense with Visual Assist?

Sysprogs forums Forums VisualGDB Clang IntelliSense with Visual Assist?

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #22067
    Seidleroni
    Participant

    I really like using VisualGDB, but it is frustrating that I cannot get the static analysis capability of Clang while using Visual Assist to help navigate the project. The syntax highlighting and navigation of a project using Visual Assist is really great. Is there any way to get Visual Assist and Clang IntelliSense to work together on the same project? It appears that Visual Assist becomes disabled when Clang IntelliSense gets enabled.

    #22071
    support
    Keymaster

    Hi,

    Sorry, this issue happens because Visual Assist does not recognize Clang IntelliSense-powered projects as compatible projects and hence doesn’t work with them. The only way to resolve it would be to get the Visual Assist vendor to update their code to recognize VisualGDB projects. We are willing to provide any necessary assistance from our side to get this to work, however it would still require a change on their side.

    #22116
    Seidleroni
    Participant

    I have emailed back and forth with Visual Asist. They are aware of this issue; no idea if/when it will be fixed. Does Resharper work well with VisualGDB or does it have its own issues as well?

    #22124
    support
    Keymaster

    Hi,

    Unfortunately Resharper has the same problem. As it’s designed to work on top of the VC++ IntelliSense engine, it won’t work properly with the Clang IntelliSense unless JetBrains explicitly adds support for this.

    If you are missing any specific features from our Clang IntelliSense engine, please don’t hesitate to share them here. Although it would take some time on our end, we should be able to support many of them if they increase the productivity when working with VisualGDB projects.

    #22154
    Seidleroni
    Participant

    Downloading the latest version of Resharper, it looks like it now works with VisualGDB (look at release notes here). The reason I’m looking into Visual Assist and Resharper is for the ease of navigation and syntax highlighting.

    #22158
    Seidleroni
    Participant

    Nevermind, you are right. Resharper syntax highlighting doesn’t work properly with Clang IntelliSense enabled.

    #22162
    support
    Keymaster

    Hi,

    Thanks for your feedback. The syntax highlighting with Clang IntelliSense is fully under VisualGDB’s control, so we should be able to add options that would allow tweaking it (unless you are looking for something very specific that will only work for a handful of projects). Freel free to let us know the exact functionality you are looking for and we could see if this is something that can be added easily.

    Also with the navigation, we are working on a mechanism that will allow quickly searching in the global symbol cache of Clang IntelliSense, letting you quickly find definitions of symbols anywhere in the project. Let us know if this is something you would find helpful and we could share a link to a preview build with this feature once it is available.

    #22165
    Seidleroni
    Participant

    Here is a fairly comprehensive list of what I use in Visual Assist on a daily basis and would love to have as part of Clang IntelliSense:

    1. Syntax Highlighting (colors listed are those spec’ed by Visual Assist, but presumably should be configurable):
      1. Gold for <span style=”text-decoration: underline;”>classes</span>, <span style=”text-decoration: underline;”>structs</span>, <span style=”text-decoration: underline;”>interfaces</span>, <span style=”text-decoration: underline;”>namespaces</span>, <span style=”text-decoration: underline;”>typedefs</span>
      2. DarkKhaki for <span style=”text-decoration: underline;”>variables</span>
      3. BD63C5 for <span style=”text-decoration: underline;”>Enums</span>, <span style=”text-decoration: underline;”>preprocessor macros</span>
      4. FF8000 for <span style=”text-decoration: underline;”>functions</span> and <span style=”text-decoration: underline;”>methods</span>
    2. Quick Search global symbol cache “Find Symbol” (Alt+Shift+S in VA)
    3. Open File in Solution (Alt+Shift+O)
    4. Toggle between source + header (Alt+O)
    5. Go to implementation (Alt+G)
    6. List Methods in File (Alt+M)
    7. Find References (Alt+Shift+F). Finds all references for that symbol, even when it is used in an inherited class.

    I’ve resorted to using VisualGDB without Clang IntelliSense, and with Visual Assist enabled for navigation, plus Resharper for their amazing Static Analysis. I don’t mind the expense of having these three components, but the lack of interoperability with each other and Clang IntelliSense is a bit of a bother. Basically I had to disable Clang IntelliSense, and disable Resharper for live Code Analysis. I just use Resharper for Code Inspection which finds more than your Static Analysis, but that could likely be how it is configured through the GUI. Happy to discuss further.

    • This reply was modified 6 years, 2 months ago by Seidleroni.
    #22174
    support
    Keymaster

    Hi,

    Thanks for the detailed description. VisualGDB actually supports most of the features you described:

    1. You can tweak the colors of various C++-related items via Tools->Options->Environment->Fonts and Colors->C/C++ <…>. Visual Studio itself now supports separate colors for various C++ entity types and VisualGDB adds even more (e.g. template non-type parameters vs. type parameters).
    2. This is not yet supported, although is planned for the final v5.4.
    3. Open File in Solution is somewhat replaced in VS2017 via the “Search Solution Explorer” command (ctrl + ;). If it is not as useful, we would appreciate if you could share the details.
    4. This is also supported (Ctrl+K, then Ctrl-O).
    5. This is supported via the override hierarchy viewer (right click -> View Override Hierarchy).
    6. VisualGDB has 2 features similar to it: the navigation bar that lists all scopes and symbols (with filtering) and right click -> Explore Source File.
    7. This is supported via the regular Find References command (Shift-F12). Unlike the regular VC++ IntelliSense that searches by name and than slowly validates each reference, the Clang IntelliSense maintains a highly optimized reference cache that can find the exact locations of all references of a certain symbol almost instantly (building the initial cache might take time for large projects, but once built, the search is very fast).
    #22217
    b.timofte
    Participant

    I tried resharper and Visualdb as MsBuild projects . Works very nice ! The only issue is that Cmake  visualgdb uses clang which disables most of resharper c++ features . Maybe is there a way to disable clang intellisense for cmake prjects ?

    #22219
    support
    Keymaster

    Hi,

    Nope, sorry. The CMake projects have a fundamentally different structure from the regular VC++ projects, so the regular VC++ IntelliSense won’t recognize them. Please consider filing a feature request with JetBrains. On our side we will be more than happy to provide a public interface for them to query the include paths and other compiler settings, but we need someone from them to modify Resharper to actually use this interface.

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.