📜 ⬆️ ⬇️

CLion 1.0 - a powerful tool for powerful language

Last September, we were pleased with the news about the start of the Public Early Access Program of our new cross-platform IDE for C and C ++ development - CLion. And today we are ready to say - the release of CLion 1.0 has taken place! Two years from the first (half-joking) announcement of the start of C ++ IDE development, we have come a long way - we rethought our skills and abilities to work with C ++ code, we learned CMake together, expanded the team, tested CLion on dozens of large C and C ++ projects.

But the most important thing is the daily support of the C ++ community, which (thank you!) Received us very favorably. Thanks for the words of support, bug reports, suggestions for new features, hundreds of retweets and reposts of our news and announcements! Today we are ready to show you and tell you what is included in CLion 1.0.



Languages, platforms, tools


Some of you already know that support for development in C and C ++ is offered by three of our products at once - ReSharper C ++ , AppCode and CLion itself. CLion is focused on cross-platform development using GCC or Clang (for Windows, you need Cygwin or MinGW for this). CMake is used as a design model, GDB is used for debugging. This set will probably change in the future - we plan to support other build systems (Makefiles, qmake, etc.), and use LLDB for debugging. For your convenience, the assembly CLion includes CMake 3.1.3 and GDB 7.8 (an exception is the case of using Cygwin - there GDB is not included in the assembly CLion). If these versions do not suit you, you can easily change to any other versions of the corresponding tools - in the settings you need to open Build, Execution, Deployment | Toolchains and specify the path to the desired versions. There is also a small test for the specified set of tools - if everything is in order, you will see:
')


CMake support


As mentioned above, CLion uses CMake as a design model. All the information about which files are included in the project, which C ++ standard should be used, which libraries and compilation flags will be used, etc. CLion takes it from CMake. So far, little of this has been rendered into a separate UI:



There is also a special window for editing CMakeCache settings.

If you already have a CMake-based project, to start working with CLion, simply open the top level CMakeLists.txt in IDE. If not, then you can try importing the project in CMake using File | Import Project ... CLion will help create the simplest CMakeLists.txt.

For easy editing of CMake files, autocompletion of CMake commands works:



It also comes in handy with single-line (using Ctrl+/ on Windows / Linux, ⌘/ on OS X) or block commenting ( Ctrl+Shift+/ on Windows / Linux, ⌥⌘/ on OS X) in CMake files. All changes can be applied right there automatically, allowing CLion to overload the project automatically after the changes.

For each target, CMake CLion creates a configuration that can be built and run (in case an executable file is specified). The executable file can be changed in the configuration settings in Run | Edit Configurations ... This can be useful if you want to specify an executable file for the all configuration, available by default. When adding new files and C ++ classes to the project via the New context menu, CLion offers you to automatically update the CMake targets — you will be shown a list to select the required one (s).

Smart features


Built on our open IntelliJ platform, CLion includes many traditional smart features that help developers be more productive:

Refactoring


Of course, CLion has a lot of refactorings that automatically update all the necessary places in your code:




Code analysis


CLion not only gives you the opportunity to write code, but also tries to literally understand what you have written, and whether there are any problems in this code. By analyzing the code on the fly, not only potential problems are highlighted, but methods for fixing them (quick-fixes) are immediately suggested. CLion provides over 40 C and C ++ code inspections, including searching for unused code; missing cases in switch-case statement; creating variables that overlap other variables available in the same context, with the same name; search for infinite recursion and infinite loops (here CLion uses full Data Flow Analysis); type inconsistencies, etc .:



Debugging


Built-in debugger (using GDB) will help to thoroughly understand the code. There are several types of breakpoints available in CLion:


During debugging, the immediate values ​​of the variables will appear in the editor (directly opposite their declaration), and the debugger window will allow you to view the values ​​of the variables, add watches, and run any command in the GDB console. You can also calculate the value of any expression during debugging, and autocompletion will help in writing the expression that interests you directly:



And finally


CLion, like our other IDEs, includes integration with various version control systems (Subversion, Git, GitHub, Mercurial, CVS, Perforce, TFS) and bug trackers (Jira, YouTrack , PivotalTracker, Bugzilla, and many others), stores local history . Many additional functions are available through the plugin system: for CLion there are already about a hundred.

And for those who are accustomed to a simple console and vi, there is a built-in terminal and an IdeaVim plugin for emulating Vim mode.

And a small demo at the end:



Come to our site , read more about the possibilities of CLion, watch the video , be interested in prices and license options .

And on May 6, 2015 we will hold a free webinar , where we will show the most interesting features of CLion. Sign up today! During the webinar, you can ask questions. We will try to answer them on the air, and what we do not have time - we will answer in the mail and blog.

Program with pleasure!
Your JetBrains CLion Team

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


All Articles