⬆️ ⬇️

Release CLion 2016.1: new tools and new languages

Hi, Habr!



We have great news today - the next release of our cross-platform environment for development in C and C ++, CLion 2016.1 has been released.





Version 2016.1



You are probably a little surprised by the version number. The upcoming releases of our other desktop tools, by the way, has the same version, starting with IntelliJ IDEA 2016.1. What is the point? In short, now all products within the JetBrains All Products package (that is, all desktop tools) receive updates approximately at the same time several times a year. Thus, the version is just the year and the sequential number of the “pack” of releases. The main features implemented in the platform fall into all IDEs at the same time, and this unification of versions makes it easier to navigate in platform changes.

')

In addition, we decided to abandon the scheme of release of major-minor releases. Now each release is aimed at bringing benefits both to new features, and permanent bug fixes and performance improvements. Details about the reasons for the transition and the newest scheme can be found in the article on the company's English-language blog.



And now - directly about the new features!





C ++ parser and improvements to work with C ++ code



For a long time, CLion supported C ++ 11 with limitations: variadic templates , constexpr , user-defined literals were not correctly processed. In this version, we took up what, as it seemed to us, “hinders” the majority of our users - the variadic templates . The code underlined in red, incorrect notifications from the code analyzer, incorrect autocompletion, and other problems were often associated with this particular C ++ 11 feature. The implementation of variadic templates allowed to close the order of hundreds of bugs in our tracker! In particular, we hasten to please users of the Qt library - connect calls are now handled correctly, and the built-in code analyzer does not warn about incorrect types:





There are still some related problems, but they are already much smaller. And if suddenly we still do not know about something, be sure to add reports to our tracker .



Among other things, we finally achieved the correct operation of automatic import for characters from STL (unfortunately, there are still problems when working with MinGW-w64 ). Now, if the corresponding header file is not included, and the character is already in use, CLion suggests adding the necessary #include directive:





If you put a cursor on a character in CLion and call the documentation window ( Ctrl+Q for Linux / Windows, F1 for OS X), you can see the definition of the corresponding character and the place where it is defined. In the new version, the documentation window supports hyperlinks to related topics, which greatly simplifies the process of reading and understanding the code:





Separately, we mention new code generation features in C ++ code. Previously, there were two possibilities for creating new functions - Override and Implement. Now there is also Generate Definitions. How are they different? In essence, we isolated the creation of the function body from Implement, and the Implement left only the possibility of generating a definition for pure-virtual functions of the base classes. The new function is available from the generation menu ( Alt+Insert on Windows / Linux, ⌘N on OS X), directly ( Shift+Ctrl+D on Windows / Linux, ⇧⌘D on OS X) and through the intention actions ( Alt+Enter ) :





But the main thing is not even that. The most important improvement is the ability to generate in-place functions (no matter via Override / Implement or via Generate Definitions), that is, where the cursor is. If you want to get the function body in the header file - call the function in the corresponding class in this header file, if you want in the .cpp file - go there and call the generation there. If there are several options, CLion will specify exactly where you want the definition of the function:





Directory management



CLion relies on the project structure that CMake sets. That is, the files are included or not included in the project, where to look for files from #include directives, etc. And what if there are also log files or assembly artifacts among the files that should be included in the project? How to explain CLion, that it is not necessary to spend time for indexation of such directories? Or how to exclude the library from the context in which the refactorings work (it is unlikely that you would like the refactorings to influence the library code, which, although it lies inside your project, but is still third-party)?



For all these purposes, a new feature Mark Directory as has been implemented:





It provides the ability to manually label directories accordingly. The choice will affect the work:





For example, refactorings and code generation will not work in directories excluded from the project (Excluded) or in libraries (Library Files). And navigation and search have special options for displaying library search results.

A little more detail is described in a separate post in our English-language blog.



In addition to this, if you are developing a project on one machine and are collecting / running on another, in CLion 2016.1 you can configure automatic file synchronization via FTP, FTPS or SFTP.



Debugger



One of the most welcome features is debugging a process running on a local machine from the IDE. Of course, many will ask, but what about remote debugging ? Not yet, but we'll get to her too!



You can connect to the process by specifying its name or identifier (pid). After the connection is established and with the source code open in CLion, you will have access to all the features of the built-in debugger - breakpoints, scans of variables, expressions, etc.





New languages



In CLion 2016.1, there is built-in support for Python, and a plugin to support Swift is also available for installation. If you have a mixed project in Python / C / C ++ or you are interested in Swift IDE on Linux, then you are welcome! In plugins supported:





For more information about the possibilities of plug-ins, see our blog: Python , Swift . And for short review we offer two videos:







And much more



This release also includes the following changes:





And finally, a short video showing the new features of CLion 2016.1:





You can read about these and other features of the new version on the product site . Follow also the articles in our English-language blog . As usual, there is a 30-day free trial , and in the price section you can find out about the cost. We will be happy to answer any of your questions in the comments.



Your JetBrains CLion Team

The Drive to Develop

Source: https://habr.com/ru/post/279625/



All Articles