Today we are starting the new CLion 2018.3 Early Access Program! There are big plans for this release, and we will do our best to achieve as much as possible. We welcome all of you to give the new features and enhancements a try, and share your feedback with us.
Find below a detailed description of the following new features and improvements:
- Initial remote development support
- Unit testing improvements
- Quick Documentation: formatted macro expansion
- A scheme to validate compile_command.json files
- New Search Everywhere
- Universal Run Anything
- Other improvements: C++17 features, mark as plain text, and more
Initial remote development support
A while ago we started working on remote development support in CLion. And in this EAP we are excited to announce that we have already been able to add initial support which is ready for you to try! It works for Unix-like (macOS, Linux) local client machines and Linux as a remote host. We assume that your source files are on the local machine and that CLion will automatically synchronize them to the remote host. With just a simple configuration step you can get CLion, which runs locally, to build, run, and debug your application and its tests on a remote machine. For more details, please, refer to this detailed blog post.
CLion integrates with Google Test, Boost.Test, and Catch frameworks for unit testing. The integration provides you with a built-in test runner, framework specific Run/Debug configurations, icons in the left gutter which report the status of the tests. In the case of Google Test, there is also a test generating feature that helps to create test and test fixture stubs. In this EAP we’ve reworked the whole integration in order to resolve dozens of performance issues (UI freezes when navigating to test results, performance issues when completing test macros, etc.). There has been a huge amount of work gone into reworking the whole integration which will hopefully make your work with unit tests in CLion much more pleasant thanks to the more responsive UI.
Show Test List
Test detection in CLion is implemented in a lazy manner to reduce indexing times. Thus for diagnostic purposes, we’ve implemented a new action “Show Test List”. You can call it from the Find Action dialog, and it will open a text file with a list of all the tests (Google Test, Boost.Test or Catch frameworks are detected) currently detected in the project. Note, the action currently doesn’t trigger test indexing.
We have introduced a few fixes in this build to get more accurate test results’ processing:
- Google Test: Problems with the colored output (CPP-10823)
- Google test:
cerroutput not shown in UI (CPP-10821)
- Tests with a non-ascii name are now recognized (CPP-11497)
- Google Test: printing in stdout/err breaks output (CPP-4780)
- CLion now supports OpenCV GTest modification (CPP-13680)
Quick Documentation: formatted macro expansion
The Quick Documentation popup is really handy when you work with macros, as it shows you the final macro replacement, so you can quickly understand the code that will be substituted after the preprocessor pass. But when you have a complicated deeply nested macro, the final replacement might not work for you if not formatted properly. That’s why CLion now formats the macro replacement in the Quick Documentation popup and also highlights strings and keywords used in the final substitution. For example, this is how it looks for the Boost.Test macro:
And here is the replacement for the Catch test macro:
Validation for compilation database files
CLion 2018.2 introduced compilation database project model support. Which meant that you could now open compile_command.json files, created in advance, as project files in CLion. In this version, we’ve added specific inspections to check the compliance with the compilation database JSON schema. For example, it notices when you use a wrong type:
or miss the property completely:
New Search Everywhere
The new Search Everywhere popup was introduced in all IntelliJ-based IDEs in 2018.3 EAP. Our main goal was to solve a lot of the annoying issues with dialog performance, losing focus, incorrect resize, and other things like this.
Moreover, now this popup incorporates several actions at once: Search Everywhere (
Double Shift), Find Action (
⇧⌘A), Go to class (
⌘O), Go to file (
⇧⌘O), and Go to symbol (
⌥⌘O) action. Each one has its own separate tab in the dialog, and you can use
TAB to switch between these tabs. And all the specific action shortcuts still work, so for example,
⌘O will open Classes tab:
Universal Run Anything dialog
Another universal dialog in IntelliJ-platform IDEs is called Run Anything, and you can open it with
Double Ctrl. It allows you to:
- Search and launch any configuration
- Open a project (just type “Open” and select the desired project from the list)
- And even debug any configuration of your choice (hold down the
Shiftkey, and the dialog will switch to Debug Anything mode)
Among the other important changes we’d like to highlight:
- The “Mark as Plain Text” action is now available in CLion. It allows you to remove big and complicated files from indexing, so disabling smart assistance for such files (for example, code completion, navigation, refactorings) and improving the IDE’s performance. And you can easily revert the files back at any time from the context menu.
- CLion now parses C++17 fold expressions and C++17 deduction guides correctly. For the user this means not only less false code highlighting, but also better code assistance, for example, for the user-defined deduction guides:
- Bundled GDB version was updated to 8.2.
- An important issue with CMAKE_TOOLCHAIN_FILE was fixed in this version. A bug caused system include directories and system #defines to be incorrectly detected, which lead to the incorrect coding assistance (CPP-11250).
Your CLion Team
The Drive to Develop