Eclipse Code Formatter – IntelliJ IDEA

When working with a team of developers spread across globe, one challenge is to maintain code formatting.

Most of teams using Eclipse as their primary IDE, rely on Eclipse code formatter that can be configured by enabling project specific setting and then adding /.settings directory to version control system. This directory contains org.eclipse.jdt.core.prefs which has formatting details.

Since these files are part of version control, all developers now has these settings file and formatting changes gets applied automatically on saving file.

But if you are an IDEA user, then there is was no way to use these Eclipse code formatting.

To make life somewhat easy, over the weekend I created a small plugin which basically let you use the Eclipse Code Formatter from IDEA. The main feature of this is that you can apply these on a Change List. Change List in IDEA is basically list of files that you have modified/created and are going to commit.

For more details visit project page – eclipse-code-formatter-on-change-list

The plugin is also available in IDEA plugin repository.

More



Making Eclipse more like IntelliJ IDEA

I really like both Eclipse and IntelliJ IDEA. But at work I had to use Eclipse and for my personal coding I prefer IntelliJ IDEA.

The main pain point here is remembering keyboard shortcuts. I didn’t wanted to remember different keystrokes for same functionality in Eclipse and IDEA.

There are some features from IDEA which are not supported by Eclipse out of box. But now-a-days, the gap is closing/widening depending upon which release you use.

So here I provide instructions on how to make Eclipse as much close like IDEA from usage perspective.

Click to continue reading “Making Eclipse more like IntelliJ IDEA”

More



TestDox and IntelliJ IDEA 9

I really missed TestDox plugin for IDEA. There is no official version as of now for IDEA 9.0

I tried to install latest available version but its not compatible. I played around with plugin.xml by removing until-build=”IU-93.94″, it got enabled but then threw following exception,

Caused by: java.lang.NumberFormatException: For input string: "IU-93.94"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
	at java.lang.Integer.parseInt(Integer.java:449)
	at java.lang.Integer.parseInt(Integer.java:499)
	at org.codehaus.testdox.intellij.IntelliJApiFactory.<init>(IntelliJApiFactory.java:24)

I had patched the IntelliJApiFactory and updated .class file in the testdox-plugin-1.1.12-diana.jar. I am using it for some time and my usage is limited to navigate between class and its test. Not seeing any exceptions but overall IDEA 9.x plugin api are changed a lot and using a patched plugin might crash IDEA.

But for those who can’t live without it, can download it here. Extract it to your IDEA plugins directory.

More