CLion 2016.1 released: Better language support and new dev tools

Hi,

It’s a big day today, since we are rolling out CLion 2016.1 release. Please, welcome!

This is the version that was previously tagged 1.5 – we hope our new versioning scheme doesn’t confuse you too much.

We’re nearly done with the announced roadmap, though some CMake items are left for future updates. Many extra features have also found their way into this release. Read on for more details, and then download and try the new version right now!

CLion2016_1_splash@2x

C++ language support

This release brings long-awaited support for variadic templates (C++11). With the related fixes in the function overload resolution, this makes it possible to resolve the code correctly and avoid many false positives in code analysis. This also means that Qt C++11 connect calls are resolved correctly in CLion:
variadics_qt
Auto-import has been improved greatly for symbols from STL, and the quick documentation popup (Ctrl+Q on Linux/Windows, F1 on OS X) now shows lambda expressions, namespace aliases and explicit instantiation, as well as accurately redirecting hyperlinks:
quick_doc

Code generation

In addition to Override that generates stubs for virtual member functions from any of base classes and Implement that overrides pure virtual functions from base classes, we’ve added Generate definitions (Shift+Ctrl+D on Windows/Linux, ⇧⌘D on OS X) which, as you would expect, generate definitions for existing declarations (in the previous versions you could use Implement action to get it). All three actions now put the code in the place the caret is positioned, in case it’s inside the class, or ask for a destination (if several options are available):
generate_definitions
Thus CLion 2016.1 makes the code generation behaviour quite simple and straightforward – if you want the function to be generated in a header file – locate the caret in that class in your header file, and if you want it in the source file – execute action there.

‘Generate definitions’ can be called up in three different ways:

  • By pressing Shift+Ctrl+D on Windows/Linux, ⇧⌘D on OS X.
  • Under the Generate menu (Alt+Insert in Windows/Linux, ⌘N on OS X).
  • As an intention action (Alt+Enter).

Read more details in the corresponding blog post.

CMake and directories control

On the CMake side, a new feature called Reset CMake Cache is now available which allows you to clear the CMake Cache without dropping all of IDE indexes and caches.

Sometimes your project folders may contain binaries, logs, generated data or build artifacts (that you surely don’t want CLion to index) or simply libraries (that you don’t want to touch with refactorings). To handle this, a new feature was introduced – ‘Mark directory As’, which allows you to manually set directory as:

  • Excluded
  • Library files
  • Project sources and headers

Read how code completion, code generation, navigation and search features and refactorings are working for each of these cases.

The bundled Remote Host Access plugin will help you synchronize your sources with the remote host from time to time, for example if you develop on one machine but build/run on another. You can configure a FTP, FTPS or SFTP server together with the path mappings and excluded paths (to avoid downloading/uploading any files in particular):
remote_server

Debug

In case you have a process running locally on your machine that you’d like to debug, you can do this within CLion. You just need to have the sources and open them in CLion, then call Attach to local process (from the Run menu or Find Action dialog) – and benefit from the built-in debugger. Processes can be searched by process name or process pid: just start typing and select a match from the list:
attach_to_local

New languages

CLion 2016.1 comes with support for two additional languages: Python and Swift. The Python plugin is bundled into the IDE and is on by default. To easily start working on your mixed Python and C/C++ code project, install the Python SDK and point CLion to the Python interpreter for your project.
python_settings

The feature set corresponds to the PyCharm IDE Community Edition and includes all the essential Python editing features, like code completion, formatting, navigation, etc., as well as Python refactorings, code analysis, and running/debugging/testing the Python part of your project. Get more details and watch a demo in this blog post.

Another addition is support for Swift language. As Apple has open sourced Swift, developers on Linux can now try the language, and for their work an IDE is essential. CLion is cross-platform, so version 2016.1 can be used as a Swift IDE on Linux. You can find the plugin in our repository.

The feature set of the Swift plugin comes from AppCode (our IDE for iOS/OS X development which is based on Xcode toolchain and runs on OS X only). Swift code can be properly highlighted, formatted and completed; navigation and search actions are also available. If you’re looking for more high-level features, welcome the familiar Rename refactoring for Swift:
refactoring

The plugin also includes Override/Implement for functions and protocols, and a built-in debugger. More details and short demo can be found in a related blog post.

Other improvements

Other fixes and enhancements in this release include:

  • By-word difference highlighting option.
  • Support for multiple Git working trees and Checkout with Rebase Git action.
  • Right-to-left languages (Arabic and Hebrew) are now supported in the editor.
  • Automatic detection of Google Test configurations on project loading.
  • Custom bundled JRE on Linux with fixes from the JetBrains team.
  • And lots more.

To learn more, please visit the What’s new in CLion 2016.1 page on our website, view our demo below and download CLion for your operating system.

Try CLion 2016.1 now and let us know what you think in the comments section below!

The CLion Team
JetBrains
The Drive to Develop

This entry was posted in Announcement and tagged , , , , , . Bookmark the permalink.

79 Responses to CLion 2016.1 released: Better language support and new dev tools

  1. It’s nice CLion now supports Python and Swift out of the box. I hope CPP-744 will be implemented very soon as well.

    • Anastasia Kazakova says:

      We’ll consider it for sure when planning the next release. We’ll share the plans as soon as we get the roadmap for 2016.2 version.

      • Olof says:

        That might be non-trivial to get to work well. But if you can it is _the_ killer feature.

        Another feature request is to support ninja as the build tool. I’m really trying to get my red/green/refactor cycle down to the fastest possible.

        https://youtrack.jetbrains.com/issue/CPP-870

      • Olof says:

        Regarding CPP-744, I’d suggest that there are some potential incremental deliveries here. Remote compile and execution but _without_ remote debugging is still a useful feature. I’d go even further and say that remote compilation without even execution would be a useful feature for me.

        • Anastasia Kazakova says:

          That’s interesting, thanks a lot

          • Olof says:

            I had one more thought. I don’t really know the complexities from your side, but from where I’m sitting, remote compile is rather similar to distributed compilation where the remote compile is the special case of compiling on only one remote server.

            I do understand that there is a big difference between whether the code can compile locally or not, but maybe there is some synergy here?

            It would be very cool if CLion would support distributed compilation without needing to have a Phd in compilerology.

          • Anastasia Kazakova says:

            Thanks) Interesting thought. We need to consider for sure.

          • Simon says:

            OTOH, for us, it’s the full cross-compile to another architecture, copy over to target, remote run/debug or it’s nothing. Compiling on our weak target machine is a non-starter. Of course, if some are helped by the partial implementation that’s nice for them so it’s certainly better than nothing. Just remember not everyone has a powerful enough remote target to run a full tool chain :)

            I can definitely live without disassembly though (considering the issue of different remote arch)

            Also, this is the reason we currently don’t use clion.

          • Anastasia Kazakova says:

            Thanks for sharing!

  2. Roman says:

    Clion is now my favorite IDE for C++ coding, but not yet for C++ debug.

    Please consider GDB debugging speed-up and Makefile/Custom build support for 2016.2!
    https://youtrack.jetbrains.com/issue/CPP-2920
    https://youtrack.jetbrains.com/issue/CPP-494
    https://youtrack.jetbrains.com/issue/CPP-1607

    • Anastasia Kazakova says:

      Thanks, we’ll consider. We’ll publish the approximate roadmap as soon as we are ready. Stay tuned and thank you for your support!

  3. Bob Kocisko says:

    Thanks for the hard work! I’m looking forward to variadic templates and some of the other features.

    I noticed that the editor font appearance has changed and now has slightly more weight. I loved the old way that the default font (DejaVu Sans Mono) was displayed in 2.2. Is there any way to go back to that? I’m running elementaryOS Linux.

    • Anastasia Kazakova says:

      Thanks a lot! We appreciate your support.

      CLion currently uses bundled JDK on Linux, it’s our custom version with the fixes from the JetBrains team. To change it you can call Find Action (Shift+Ctrl+A) and type ‘Switch IDE boot JDK’, then change it in the dialog that appears. Alternatively, you can set CL_JDK env var with your preferred Java version.

      • Bob Kocisko says:

        Thanks Anastasia. If I switch to a non-bundled JDK what fixes will I be losing?

        • Anastasia Kazakova says:

          Mostly it’s font rendering. Some crashes maybe related, but just report to us if you meet any (we’ll check if it’s related).

          • Bob Kocisko says:

            Ok. I installed the Oracle JDK on my system but when I invoke the Switch IDE boot JDK command it only gives me one option, the ‘bundled’ option. I followed this post http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux, am I missing anything?

          • Anastasia Kazakova says:

            Probably it was searched in the wrong place… Feel free to share where it was installed so that we could check.

          • Anastasia Kazakova says:

            Bob, we suppose it’s a bug finally. So could you please kindly provide us some extra info to investigate and fix:
            – OS version
            – version output: call java (that is not seen by the switcher inside CLion) by the absolute path with -version option

          • Bob Kocisko says:

            Success! Towards the top of clion.sh I added this line and now my fonts are beautiful again. It seems kind of hackish but at least it’s working and I’m happy. :) Thanks!

            CL_JDK=$JAVA_HOME

          • Bob Kocisko says:

            It was installed to /usr/local/java/jdk1.8.0_73 and the $JAVA_HOME variable was set to that path. Do I need to set the $JDK_HOME variable also?

          • Anastasia Kazakova says:

            I believe no, but let us check.

          • Bob Kocisko says:

            elementaryOS Freya 0.3 (based on Ubuntu 14.04 LTS)

            which java
            /usr/bin/java

            /usr/bin/java -version
            java version “1.8.0_73”
            Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
            Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)

          • Anastasia Kazakova says:

            Thanks. I’ve put this into the tracker: https://youtrack.jetbrains.com/issue/IDEA-153380
            Feel free to follow the ticket to get updates.

          • Arun Venkataraman says:

            Hi Anastasia,

            If at all possible, can you guys decouple the font rendering from the rest of the JDK fixes? I’d love to use the bundled JDK except for the font part (looks really bad for the one I use). I was putting off the upgrade till Bob’s hack helped me (thanks, Bob!).

          • Anastasia Kazakova says:

            I’m really not sure this can be done, but please leave it as a feature request here: https://youtrack.jetbrains.com/issues/IDEA. The team will consider then. Or at least find some solution via settings.

            If you could maybe attach some screenshots of what you dislike about font rendering, it would be perfect. Thanks in advance.

    • Yury V. Zaytsev says:

      Hi Bob,

      I’ve reported this as IDEA-151425, please subscribe, vote & share your experiences :-)

      –Yury.

  4. Vic Luo says:

    User-defined literals(https://youtrack.jetbrains.com/issue/CPP-1727) have been a problem since 2014, and it is still broken now.

  5. Maxim says:

    Amazing!
    I hope will soon you will add a cmake support

  6. Konstantin Zhukov says:

    Thank you for the great product! Just want to know whether it is possible to add support for different project model via 3rd party plugins. I think to add support for IAR based projects by myself because i know it will has very low priority for you. Is there a chance i can do it now?

    Also, there are some annoying bugs in the C development: https://youtrack.jetbrains.com/issue/CPP-4991 Any ETA for them?

    • Anastasia Kazakova says:

      Currently it’s not possible since there is no public interface or API for this. We do hope to have it when start working on at least seconf project model/build-system support. With only CMake on board it’s quite unstable to make it public.

      We’ll check the issue linked and consider for the upcoming fixes/new release.

  7. Still waiting for better preprocessor support, e.g. CPP-1100.

  8. Michiel Fortuin says:

    I have just updated to Clion 2016.1 and I can’t find the cmake toolbar anywhere.
    Did I miss something??

    • Michiel Fortuin says:

      Did already fixed the issue.
      There was something wrong in my .idea directory.
      The result was that no cmake files were generated.
      It was just an empty directory.
      When I renamed the .idea directory to something else, the problem solved.

      • Anastasia Kazakova says:

        Hm. Interesting. In case your project is CMake-based and something goes wrong with CMake in CLion next time you can try Tools | CMake | Reset Cache and Reload

    • Anastasia Kazakova says:

      How about View | Toolwindows | CMake?

  9. Nuno Nunes says:

    I have a project that uses Qt and runs in Windows, Linux and OSX.
    I use QtCreator to develop in all platforms. In windows I must use microsoft tool chain (I do not use visual studio editor, only compiler, debuger, etc..) because i use some libs that not compile with gcc in windows.

    QtCreator is Ok but I was looking for something to speed up the work. I was willing to give CLion a shot, but for what I notice (correct me if I’ wrong) in windows I cannot use microsoft tool chain with CLion, I must use Reshaper for that, and more, in windows I have to start using Visual Studio editor with Reshaper and not Clion.
    If this is correct instead of using CLion + QtCreator in all platforms I need a different one in windows (Visual Studio + Reshaper) and the cost will be 199€ x 2.
    If this is the case I prefer to stick with QtCreator only.

  10. lmiguelmh says:

    I recently updated to CLion 2016.1. I have some problems with Google Test: The macro EXPECT_TRUE() which is used to assert trueness is being marked as red in the code editor with message “Error after macro substitution: Class ‘testing::AsertionResult’ doesn’t have a constructor ‘AssertionResult(bool)'”. The weird thing is that the test compiles and executes succesfully. I was using CLion 1.2 before and never had this problem.

  11. Roman says:

    Anastasia,
    Do you want to push Clion into embedded systems and electronic design domain?
    Currently it is completely dominated by Eclipse CDT-based solutions that are quite good, but not perfect imo.

    I’m using Clion for hardware design and it works reasonably well.

    • Anastasia Kazakova says:

      We do plan this for sure.
      It will be great if you share some typical issues that maybe need to be fixed especially for this area. Or just some specific feedback.

      • Roman says:

        Embedded market is extremely diverse and there is no chance to create “one size fits all” solution, like JetBrains did for Java/Web world (Java/Web world is very diverse too (dozen of frameworks, database systems, multiple languages etc), but I think embedded is more diverse :) ).

        Eclipse, the current king of embedded has different model: there is a common opensource core that anyone can contribute to and dozen of proprietary IDEs build on top of it. Eclipse-based products are supplied by Intel, TI, Xilinx, Altera, Synopsys, Analog devices, Mentor Graphics and many other companies. I’ve seen couple of Netbeans and QtCreator-based IDEs for embedded, but they are much less common.
        But it was not like that 7-10 years ago, at that time most of those companies provided some custom-build IDEs or command-line tools only.

        So to fight for this market Jetbrains will need to promote Clion as a better platform for plugin development then Eclipse. You will also need to win hobbyist market: looks like Arduino and Raspberry PI are two most common platforms in this area.

        Now speaking about particular bugs:
        Cross-compilation, remote debug
        https://youtrack.jetbrains.com/issue/CPP-744
        https://youtrack.jetbrains.com/issue/CPP-871
        Assembly-level edit and debug
        https://youtrack.jetbrains.com/issue/CPP-1742
        https://youtrack.jetbrains.com/issue/CPP-1743

        You will also need to create gui for embedded debug with CPU registers view, and memory area view (to observe memory-mapped IO)

        But IMO debug is not yet there even for native linux projects. Its still slow, gdb-python pretty printers are not rendered correctly. I think you should fix this before implementing more debugger features.

        • Anastasia Kazakova says:

          Thanks Roman. We completely agree that the market is diverse and your ideas here are really valuable to us.

          We also agree that we need a big work to be done in the debugger area to fit this market (and in general to satisfy our users needs). Especially those tickets you’ve mentioned. And I really hope we’ll be able to handle them in the upcoming releases. Let’s see.

        • Jan Van den Bergh says:

          I completely agree and even talked with JetBrains about this. A community / hobbyist edition of CLion that could be used to develop software for Raspberry Pi and Arduino would be great.

          When these developers later land in the professional software business they won’t think twice about what tool to use.

  12. Sergey says:

    I would like to ask where I can find see the roadmap CLion 2016.1?
    Just wondering if it would be possible what QT support will be considered soon?
    And of course support of UE4 is the same as in Visual Studio when you can create project in UE4 and Studio recognize project file and finally you can write a code?

  13. Ernst says:

    didn’t know about Quick Documentation feature before this post.
    very useful. but not completely clear for me –
    I see this shows , in addition to definition, an info from a comments as well , e.g. for STL types,
    however it does not do this for my project types/methods/members.
    even these are having doxygen formated doc
    for project level, quick documentation just shows basic info like a header file, parent type, etc.

    am I doing something wrong? maybe need to enable something in settings?
    how to fix this?

    • Anastasia Kazakova says:

      Doxygen is not yet supported but is planned for 2016.2 and is currently in development.

      > it does not do this for my project types/methods/members.
      Could you please provide a sample?

      • Ernst says:

        just an examples from test project:

        1. go to line like this:
        std::this_thread::sleep_for(3s);
        step on this_thread and press Ctrl+Q
        I see something like this :
        “…
        @namespace std::this_thread
        Brief
        ISO C++ 2011 entities sub-namespace for thread. 30.3.2 Namespace this_thread.
        …”
        which was parsed from header:
        “…
        /** @namespace std::this_thread
        * @brief ISO C++ 2011 entities sub-namespace for thread.
        * 30.3.2 Namespace this_thread.
        */
        namespace this_thread
        …”

        It looks good.
        ——————————————–
        try the same for something in our project:
        usage:

        shm_server server;

        declaration:
        “…
        * \class shm_server xxx.hpp “src/xxx.hpp”
        * \brief processes incoming data and dump this to files
        *
        * class works as a wrapper for a worker thread (operator () ) which receives a data via shared memory
        * server receives a data chunks from various clients until get empty vector of bytes, which is a flag of end of this client transfer
        *
        * \warning using std::cerr and std::clog is potentially thread unsafe, has to be replaced */
        class shm_server : public base_interview_task {
        ….”

        however Ctrl+Q gives me only:
        “…
        Declared In: searchinform.hpp namespace interview_tasks::searchinform class shm_server : public
        …”

  14. Ivan says:

    Is there any way to change the display value of custom types in Clion? I have custom containers and it would be very useful to see a custom representation of the stored value.

  15. liang says:

    I am a Clion user in China.When I need update,patch or install file from Jetbrains’ server,downloading speed will be very slow,sometimes can not complete successfully.Could you think about solutions?Such as cdn or something else?

    • Anastasia Kazakova says:

      We are currently working on such. Hope to have some in nearest future. Sorry for the inconvenience.

  16. liang says:

    Thanks for your reply.Everything about Clion is good,but network speed causes much problem.

  17. Bob says:

    Installed today on windows and it’s unfortunate that only gdb7.8.x is supported, meanwhile, cygwin has only easy support to install gdb7.9x/7.10.x, so right away need to fight the install on windows.

    The result is one needs to go through this convoluted install routine as posted on stackoverflow: http://stackoverflow.com/questions/35826635/clion-gdb-current-version-is-gnu-gdb-gdb-cygwin-7-10-1-1-7-10-1-supporte

    Posting this to call your attention to save some future potential users from hours of work to get it running.

  18. A Dev says:

    Hello

    On Ubuntu 16.04 with clion there is no code completion for swift core libraries Foundation https://github.com/apple/swift-corelibs-foundation/tree/master/Foundation

    Is it planned?

    Thanks

  19. Paulo Faria says:

    Is there any plans to support the Swift Package Manager? This would be a HUGE win! I mean really HUGE! Is there an issue I can upvote or something? make a campaign!

Leave a Reply

Your email address will not be published. Required fields are marked *