IntelliJ IDEA 14 RC1 is Available

Today we’re excited to finally announce the availability of the first release candidate of the upcoming IntelliJ IDEA 14, in which in addition to numerous enhancements and bugfixes you will find the bundled 8u25 JRE version for both the Windows and Mac installers.

You’re very welcome to download the new build right away, give it a try, and share your feedback with us at the discussion forum, and in our issue tracker because the release is a matter of two weeks from now.

Develop with Pleasure!

Posted in EAP Releases, Release Candidates | Tagged , | 1 Comment

Java Annotated Monthly – October 2014

This month, we had the chance to meet thousands of you at the 19th annual JavaOne conference in San Francisco, and learn how developers from around the world are helping build a better Java ecosystem. Today is a tremendously exciting time to be a Java developer, and we can’t wait to see you next Fall for twenty years of Java. Get ready.


Continue reading

Posted in News & Events | Leave a comment

Inspection Connection – Issue #5, Encapsulation Examination

Encapsulation is a simple but powerful concept in software engineering that often goes hand-in hand with abstraction. In OOP, we use these two principles to help model mundane and complex systems, from physical processes to digital transactions, however these terms can often mean different things to different people.

Encapsulation often refers to information hiding, a key principle of OOP that seeks to collect and contain common data and functionality, effectively hiding those internal components, while exposing methods to interact with them in a safe and well-defined manner. This reflects how we interact with the world around us.

Continue reading

Posted in Tips & Tricks | Tagged | Leave a comment

Touring Plugins – String Manipulation

The String Manipulation plugin allows us to perform a variety of tasks on strings, from capitalizing, converting to camel case, to escaping strings in Java, JavaScript, XML or HTML amongst others.

The plugin itself is pretty straightforward. Once installed, it creates a new entry under the Edit menu as well as a contextual popup.


Operating on it is merely a matter of selecting the string (defaults to current line if no text is selected) and choosing the operation.

Escaping HTMl

Important: The default key binding for the popup is Shift+Alt+M which doesn’t work well with MacOS, but it can be mapped to some other keyboard binding, such as Ctrl+Alt+M, easily via Preferences | Keymaps . Using the context menu is key to efficiency with this plugin so it’s highly recommended to make this change.

Posted in Tips & Tricks | 2 Comments

IntelliJ IDEA 14 EAP 139.69 is Out

If you haven’t noticed yet, a freshly-baked IntelliJ IDEA 14 EAP build is already here with new portion of bugfixes and enhancements.

Hurry and give IntelliJ IDEA 14 EAP a try before its official release. Then share your feedback with us via our discussion forum or the issue tracker!

Develop with Pleasure!

Posted in EAP Releases | 1 Comment

IntelliJ IDEA 14 Will Detect Code Styles on the Fly

If you’ve already tried the latest IntellIJ IDEA 14 EAP build, you might’ve noticed that the Code Style settings offers a new option: Detect and use existing file indents for editing (enabled by default.)

This new option lets IntelliJ IDEA detect certain Code Style settings (such as Use Tab character and Indent size) in the currently edited file on the fly. It means that even if a file has a code style different from your current settings, they will still be preserved.

So now you don’t need to worry about losing the formatting in files that are specific to certain files in your project that differ from the others.

We hope you’ll find these improvements useful. Your feedback as always is welcome, so don’t hesitate to share it in our discussion forum as well as report any bugs directly to the issue tracker.

Develop with Pleasure!

Posted in New Features | Tagged , , | 8 Comments

Live Webinar: IntelliJ IDEA and Vaadin, October 21st

We are pleased to invite you to join Breandan Considine from JetBrains and Matti Tahvonen from Vaadin on how to use the full power of Vaadin and IDEA together. Learn all the tips and tricks and get started with your new IDE in no time!

Sign up and we’ll email you instructions on how to join the webinar closer to the event – all you need is your web browser. Yes, it’s completely free to join.

Matti TahvonenMatti Tahvonen is a Vaadin “R&D veteran” who has been working with our products for over 6 years. His current responsibility is to keep you up to date with latest and greatest Vaadin related technologies. You can follow him on Twitter – @MattiTahvonen
Breandan ConsidineAs a Java developer and technical evangelist at JetBrains, Breandan Considine is interested in human computer interaction, natural language processing, particularly in low-power applications such as mobile phones and wearable devices. You can follow him on Twitter – @breandan

Develop with Pleasure!

Posted in Webinars | Tagged | Leave a comment

Touring Plugins – GitIgnore

I always have a .gitignore file in my Dropbox folder that I copy over for new projects, knowing that any subsequent update to the copy isn’t always synced with the original. Of course, it’s not always necessary either, but it’s something that’s always bugged me.

Recently I ran across a plugin for IntelliJ IDEA (and family) that solves my issue with ignore files.

It’s called GitIgnore Support and as its name suggests it provides support for .gitignore files, but it goes way beyond what you’d imagine at first. Let’s take a look. Continue reading

Posted in Featured Plugins, Tips & Tricks | Tagged | Leave a comment

IntelliJ IDEA 14 EAP 139.1 available, from a release branch already

A fresh update to IntelliJ IDEA 14 EAP is released and you may note we’ve switched to a “release” branch (139) already, so the release is not far away already and we’re in a “stabilization phase” mostly.

We urge you to check the full release notes to compare this build to the previous one.

A number of not so big but important features for everyone was added recently to the editor, including “Go to Next Edit” command, which is the opposite to a very useful “Go to Last Edit”, an additional options to show white-spaces only in front and/or behind and a number of other changes.

We need your feedback now even more than before. It is very welcome in our discussion forum or directly in the issue tracker.

Develop with Pleasure!

Posted in Beta Releases | Tagged , | 13 Comments

The Inspection Connection – Issue #4, Duplication Detection

One of the core principles of computer programming is eliminating manual repetition. Not only is repeated code time-consuming to read and review, it is disproportionately complex to maintain and provides a ready source of bugs when one copy changes. Yet in spite of this, duplicating some code in a large project may be inevitable. IntelliJ IDEA offers a powerful inspection for detecting and deduplicating repetitive code. You can activate this inspection by navigating to the menu entry Analyze|Locate Duplicates, or by pressing Ctrl/⌘+Alt/⌥+Shift+I then typing, “Duplicated Code.”

As it turns out, “Don’t Repeat Yourself” has some notable exceptions, especially when writing unit tests, and occasionally in some rare cases when attempting to outsmart the compiler. IntelliJ IDEA gives you the opportunity to exclude test sources, since many prefer a little duplication in their tests to improve overall readability. Nevertheless, the choice is yours.

duplicates_scopeWhen analyzing a large set of files, you should carefully consider the scope of the inspection you are going to apply. There are a number of algorithms for detecting duplicate code – this one will scan for duplicates by comparing AST fragments. On an Intel i7-2640M with 8GB of RAM, scanning a codebase with 53,000 LOC will take about 3 minutes, or ~300 LOC/second. However your mileage may vary depending on the minimum duplicates length, line density and other factors. When searching for exact matches, the time complexity is effectively linear w.r.t. the number of nodes in your AST.

duplication_analysis_settingsWhen searching for duplicate code, we may want to discard duplicates shorter than some minimum threshold or add a similarity metric in order to detect fuzzy-matches. IntelliJ IDEA lets us define these values, but keep in mind they do not correspond to characters or lines, but rather arbitrary weights. If “Visible from outside of the current scope only” is selected, only subexpressions which are valid outside of their parent construct are anonymized. If you would like to learn more how all of this works, head over to the source.

duplicates_viewAfter scanning, the Duplicates Tool Window is a convenient area to browse through duplicate regions and view a side-by-side diff at each location. From here you can clearly see which sections are structurally similar and flag them for review or refactor them immediately. The highlighter will help you quickly identify which blocks are different.


When you have found a duplicate block of code, it can be easily simplified by pressing Ctrl/⌘+Alt/⌥+M to apply the Extract → Method refactoring. IntelliJ IDEA will transform all inbound variables inside the selected region with parameters and provide a helpful dialog to extract the method, which you can use to replace any other duplicates inside the analysis scope.

extract_method_windowThis inspection is also available in TeamCity, where you can assign a dedicated build runner to periodically scan your project for duplicate code. This may be an even better option if your organization needs regular assurance audits for clean-room engineering. Plagiarism detection is another important use case for the academic community, and if you are a student or teacher, IntelliJ IDEA is now completely free.

Posted in Tips & Tricks | Tagged , , | Leave a comment