Why Write Automated Tests?

After writing a post for the Upsource blog about evaluating tests during code review, I found myself compelled to write something more general on why we should be writing automated tests. If you already know the value of tests, you might find something here that will help convince your colleagues who are less sold on the idea.

Why do we write automated tests?
In my first post about code reviews, I mention that a lot of activities we often do in a code review can be automated - checking style, formatting, code coverage etc. The nice thing about automating these things is that, once automated, you no longer need a human to give you confidence that your code meets certain criteria.

Tests provide us with a similar level of security. Once you’ve written some automated tests that prove your code behaves in a particular way, provided they are running in some sort of Continuous Integration environment like TeamCity, they continue to give us confidence in the code well into the future, as long as they are passing.

Another reason to have automated tests is that often the tests can be easier to reason about than the production code – they should state the desired functionality clearly, they should be readable, and they should provide insight into which things the author of the code has
considered (and possibly hint at areas they have not thought about).

What sort of tests are we talking about?
Continue reading

Posted in Tips & Tricks | Tagged , , | 6 Comments

Experimental Zero-latency Typing in IntelliJ IDEA 15 EAP

From what we usually hear, the fans of Vim, Emacs, Sublime and other nice editors often explain their choice by performance concerns. IntelliJ IDEA for example may feel laggy (comparing to a text editor) when you type, and the usual justification for that is some variation of “an intelligent IDE thinks while you’re typing to provide smart coding assistance”. While this is true, should it really be the case? We’ve tried to figure this out.

Continue reading

Posted in EAP Releases, New Features | Tagged , , , | 29 Comments

IntelliJ IDEA 15 EAP: Groovy @Builder AST Transformation Support

Those who use Groovy in their projects will be glad to know that the new IntelliJ IDEA 15 EAP build comes with the long-awaited support for the @Builder annotation, introduced in Groovy 2.3:


The support includes code completion and quick navigation for all 4 strategies.

Apart from that we’ve also added the Undo action support in the Merge dialog to make editing of the resulting code easier.

Download the latest EAP build right away, and don’t forget to share your feedback with us in our EAP discussion forum or issue tracker.

Develop with Pleasure!

Posted in EAP Releases, New Features | Tagged , | Leave a comment

Java Annotated Monthly – August 2015

At 20 years old, Java remains the world’s most popular programming language this August, with nearly 10 million active developers. If accurate, this figure puts Java slightly ahead of Swedish. While only slightly easier to read, Java has a number of compelling features, including lambdas and streams, intersection types, multiple inheritance, and unrivaled tools and frameworks. If you haven’t seen Java lately, you haven’t seen what Java can do. Join us each month, and stretch your idea of modern Java development.


Continue reading

Posted in News & Events | Leave a comment

IntelliJ IDEA 15 EAP Adds On-the-Fly Code Duplicates Detection

It’s been a while since we added the Analyze → Locate Duplicates feature. If you’ve had a chance to use it, you know how helpful it is: by eliminating duplicates in your code, you make it more concise and stable. If you’ve never used it, you definitely should; it’s truly surprising how many duplicates an average codebase usually contains.

The fresh IntelliJ IDEA 15 EAP build released today takes the duplicates analysis to an entirely new level by allowing you to spot them on-the-fly. Now, if you stumble upon an existing duplicate, or somehow create one either by writing or pasting code, you will know it instantly:


The analysis comes with quick-fixes, so you can navigate to duplicates or have them shown in a tool window: Continue reading

Posted in New Features | Tagged , , | 18 Comments

IntelliJ IDEA 14.1.5 EAP 141.2311 is Available

If you’re using IntelliJ IDEA 14.1.4 but can’t wait when a new update is out, you’re welcome to give a try to IntelliJ IDEA 14.1.5 EAP. The latest build, among its numerous bugfixes and enhancements, includes important performance and stability fixes, and SVN 1.9 compatibility. If you decide to update, note that the PHP plugin v141.1534 is not compatible with this build.

As always we keep handling your feedback in our EAP discussion forum and issue tracker.

Develop with Pleasure!

Posted in EAP Releases | Tagged , | 1 Comment

IntelliJ IDEA 15 EAP Adds Indication for Running Configurations

Today we have released a fresh IntelliJ IDEA 15 EAP build, as always with lots of enhancements and new features, one of which is the brand new indicator for the running configurations, that I am going to describe in more detail.

Usually, running several instances of a run configuration makes little sense as every one of them may require individual parameters (e.g. you can’t run several web applications on the same port.), so it’s easier to just define separate configurations with different parameters. To prevent possible conflicts and make it simpler to re-run them, IntelliJ IDEA offers the Single instance only option, that takes care of such situations. Still, until now, you couldn’t tell the actual state of your configuration: whether it’s running or not, there was simply no way of doing that. In IntelliJ IDEA 15 we decided to fix it:


Now every run configuration has a small green indicator that tells you if it’s running. If your run configuration is a Single instance only, IntelliJ IDEA will show you the Restart action instead of the Run action on the toolbar. Otherwise, if there are several running instances of your run configuration, there’ll be a small digit indicator with the number of running instances instead of a small green circle.

If you go to the SettingsAppearance & BehaviourMenus and Toolbars, and add the Stop action to the toolbar, it will let you stop the current running configuration, and if there are more than one running configurations, it will offer you to choose which one you’d like to stop:


We hope these small enhancements will make your life easier, and help you deal with run configurations no matter how many of them you have in your project.

The last but not least is that the Windows installer now uses JRE 1.8 Update 51.

To give the new feature a try, download the latest IntelliJ IDEA 15 EAP build. And don’t forget to share your feedback with us in our EAP discussion forum and issue tracker.

Posted in New Features | Tagged , | 8 Comments

IntelliJ Platform SDK Documentation Available

At JetBrains we rely on many open source projects, and provide a few of our own as well. Six years ago, we open sourced IntelliJ IDEA and since then, a growing number of developers have chosen the IntelliJ Platform to support their tooling needs, including Android Studio, RoboVM, Cursive Clojure, and hundreds of plugins available on the plugin repository. We are grateful to so many people who trust and contribute to the IntelliJ Platform every day.

As part of our commitment to supporting the growing number of developers who depend on these tools at JetBrains and around the world, today we are pleased to introduce a new home for the IntelliJ Platform documentation. There, you will find developer docs for writing plugins within IntelliJ IDEA, and advice for building applications on the same SDK that powers many of JetBrains’ tools.

The IntelliJ Platform documentation covers many topics from creating your first plugin to understanding the platform. You will find detailed examples on supporting custom languages, implementing editor features, and customizing other parts of the platform architecture.

Having current documentation is a goal we have worked towards for some time. It allows us to be more agile and enable talented contributors. It allows would-be plugin developers to understand the platform’s capabilities and follow best practices during implementation. And it allows you to leverage fifteen years of applied research at JetBrains. We hope you will take part in contributing your expertise and join us in building the next generation of smart developer tools.

Develop with pleasure!

Posted in News & Events, Plugin Development, Releases | 5 Comments

IntelliJ IDEA 15 EAP Comes with True HiDPI Support for Windows and Linux

As you might remember, IntelliJ IDEA 14.1 shipped with the initial HiDPI support for Windows and Linux which could be enabled via the -Dhidpi=true key in the idea.vmoptions file. The support was somewhat limited and only allowed to use a 2x scale factor (and some displays do have other scale factors, so some of them were not supported.) A partial solution was to change the default font size, although it still did nothing about scaling icons.

We promised a pleasant surprise in each new IntelliJ IDEA 15 EAP, and today we’re delivering on that promise with the newly released EAP build, that, among other enhancements, comes with the complete HiDPI support for Windows and Linux, with fractional scaling of both fonts and icons according to your system DPI settings. It means that you don’t have to tweak the idea.vmoptions file anymore, just use your favorite font (make sure to restore the defaults if you changed them), and enjoy the high resolution IDE completely.

Enough reading already, go ahead and download the latest IntelliJ IDEA 15 EAP, and try it all for yourself.

Any feedback is welcome in our EAP discussion forum and issue tracker.

Develop with Pleasure!

Posted in New Features | Tagged , , , | 32 Comments

IntelliJ IDEA 15 EAP Improves ReactJS and Gradle/SBT Support

No single week without the news about IntelliJ IDEA 15 EAP and the new features we are working on to ship in the next major release coming this fall. Some of you may already have given the preview a try, some are just getting ready to it. You can find an extensive list of the new features in the EAP announcement. Today we are happy to let you know that a fresh preview build is out bringing more goodies.


Now when importing a Gradle/SBT project, you can select which modules to import instead of importing the whole project:


If you’re not sure about the dependencies between modules, click Select Required and the IDE will make sure the required modules are selected.

This dialog is also available from the Gradle/SBT tool window, which enables you to add/remove modules at any time.


Those who use React for building user interfaces in web applications will be happy to know about its support improvements.

Continue reading

Posted in EAP Releases, New Features | Tagged , , , , | 14 Comments