envelopmenuskypeburger-menulink-externalfacebooktwitterlinkedin2crossgithub-minilinkedin-minitwitter-miniarrow_rightarrow_leftphonegithubphone-receiverstack-overflow

IntelliJ IDEA Summer Plugin Trawl

Introduction

intro

A competent engineer cares for their tools. As someone who aspires to uphold that qualification, I like to review recent additions to the IDE I use, especially addons/plugins that go beyond the core functionality.

Summer is a good time to do that in the JVM world - in the case of Eclipse, usually a new version had just come out, but there’s also a general uptick of activity due to various seasonal hackathons and other events [1], not to mention people coming up with interesting prototypes for their thesis/diploma projects.

I just mentioned Eclipse, but I have been almost-exclusively using IntelliJ IDEA for the last 3 years or so. As such, I’ll be concentrating on the latter IDE. Specifically, I will highlight a couple of plugins I found while browsing through the "Last Updated" list.

As already said, I’m deliberately eschewing "mainstream" functionality - there’s enough coverage of that floating about. Instead, I’m focusing more on esoterica and innovation.

Promising upstart

For an hors d’oeuvre, here’s a plugin that isn’t really ready yet, but shows potential to be helpful granted some more development time.

Ideolog aims to enhance work with logfiles. There’s not much in there yet apart from basic syntax highlighting, but - if the promised features are implemented - it is shaping up to be a decent "competitor" to e.g. Grep Console.

Now, onto the plugins that allow for tangible benefits right now, classified by similarity.

Warning
Be aware that the plugins listed here are mostly still in development and/or in an unstable state. Always do your own research before adding plugins to your IDE.

Educators

Key Promoter X

First of all, I was quite happy to see that someone has finally published a remake of the very useful, but severely outdated, Key Promoter plugin. The original still works, but is getting a bit long in the tooth - the notification uses an outdated look&feel, and the configuration options are somewhat limited.

As a replacement, Key Promoter X employs modern IDEA APIs to gently remind you of a corresponding keyboard shortcut whenever you execute a relevant action via menu/mouse.

The plugin is configurable to reduce/adjust the level of presence to your liking [2]. Furthermore, notifications can be suppressed on a per-action basis, something I don’t recall being offered by the original.

keypromoter
Figure 1. Key Promoter X preferences.

IDE Features Trainer

And now, here’s a jewel from Jetbrains' own vault. The IDE Features Trainer adds a completely new tool menu with several lesson plans, allowing you to learn about various editing features of the IDE.

ideafeaturestrainer
Figure 2. IDE Feature Trainer overview.

Unlike a web-page-based tutorial, it presents relevant example code in the IDE itself, automatically detects when you have performed the correct actions, and proceeds to the next lesson. This makes it useful as a kata-like exercise for training muscle memory of various editor functionalities.

Textual

Shifter

This plugin is a bit unusual in its scope. Its focus is to "shift" the current selection "up" or "down" - what do these three words mean depends on the inferred context of the selection. For example:

  • for variable identifiers the shift cycles between camelCase and pipe⁠-⁠case,

  • numbers are decremented/incremented,

  • hex RGB colors are shifted in lightness,

  • or is cycled with and, not and xor (same with || / &&),

  • and so on.

It’s really hard to summarize the entire functionality in a couple of words, so instead I invite you to read the feature list.

The plugin isn’t all there yet. Most importantly, it is prone to lose its "shifting context" - for example, when decrementing a positive number, the action will halt at -1 [3].

However, given a bit more polish, it’s shaping up to be one of those plugins you can’t do without, once you get the hang of them.

Advanced Java Folding

Another interesting entry oriented around an unusual concept, this time again from JetBrains. Advanced Java Folding is, by the author’s own words, a Java emulator of features found in languages such as Kotlin, Groovy or Scala (like string interpolation, safe calls on nullables, etc.).

It works by using code folding to show a "cleaner" version of the code transparently in the editor. I personally already mostly write in Scala, but I encourage you to read the accompanying blogpost nevertheless.

AsciiDoc

This one is a bit of a stretch, but arguably fits the "out-of-comfort-zone" concept of the blog entry, so I’m including it anyway.

If you’re using Markdown and wondering "why doesn’t Markdown have feature X/Y/Z out of the box?" you should give AsciiDoc a try. It’s a text markup language similar to MD, but much more feature complete and well-rounded: with floating images, tables, footnotes, code callouts, reusable constants and other stuff available right from the get-go.

The AsciiDoc plugin naturally adds support for this language in IDEA, offering a functional split-pane preview interface [4]. As for AsciiDoc itself, there’s a nice Writer’s Guide to ease you in.

Debugging/Testing

File Watchers

In an ideal world, this plugin would not be needed, since either the IDE would magically discern our intentions, or we would ensure the build system underpinning our projects would do the required work for us.

filewatchers
Figure 3. Adding a file watch action for a generic file.

Otherwise, the the File Watchers plugin provides a possibility to create a quick-and-dirty fix when dealing with fringe use-cases, such as an unsupported build system, and unusual directory structure, and so on. It understands a number of formats/languages (from JavaScript, through generic files, to SBT), and provides several options for triggers, including running arbitrary programs.

Java Stream Debugger

This is something that would have probably saved thousands of person-hours, had it become available earlier. Responding to the peculiarities of the Java 8 Stream API, developers at JetBrains have created a plugin that allows for visualisation and effective debugging of Java Streams.

Judging from the screenshots, the UI is very intuitive and can drill down the stream presentation to the per-element and per-stage level. The plugin is described here. Be sure to take a look at the "General usage instructions" section later down on that page for an animation of how the plugin can be used.

Miscellaneous

Libgdx Inspections

This one piqued my interest due to my own forays into game programming, so I’d thought to include it, in case anyone else with similar interests might have overlooked it. In essence, its two main features are editor support for various Libgdx assets, and linting for the code using the library. You can find the plugin here.

Focus on Active Task

Last - but not least - something for productivity. Devs that have used Eclipse may be familiar with Mylyn. It’s a tool that reduces the view of your projects only to the files that are relevant to your current task. It’s an invaluable utility when dealing with large codebases.

focus on task demo
Figure 4. Demo of the Focus on Active Task plugin in action.

Well, it looks someone has decided to port this functionality into IDEA. The plugin seems to be still in its early stages, but already the core feature (contextually filtering out the Project View) appears to work!

Summary

I hope that I demonstrated that it’s a good idea to occasionally go on a treasure-hunting expedition of your tools' plugin repositories/addon markets, etc. Relying on word of mouth within your team can only get you so far - eventually you will lose out on diamonds in the rough like the ones showcased above, simply because no one among your colleagues has heard of them.

And not only are these kinds of "shopping trips" useful, they’re also fun! So do try one out sometime :). Have a nice summer!


1. As a matter of fact, it seems - from perusing their company-labelled plugins - that JetBrains either has summer hackathons, or at least a lull in regular development, allowing for some prototyping.
2. It’s important for the popups to not appear commonly, lest you tune them out subconsciously.
3. I suppose this is because, on transition from 0 to -1, the - sign appears, changing the selection context.
4. This blog entry was written using it, in fact.

scala times
Interested in Scala news?

Subscribe to Scala Times Newspaper delivered weekly by SoftwareMill straight to your inbox.