A few lessons from IntelliJ IDEA - ISerializable - Roy Osherove's Blog

A few lessons from IntelliJ IDEA

My wife is currently taking Java classes as part of her curriculum at the university. I've played with Java a couple of times in the past, but because I never got a real chance of “working” with it, it never really grew into anything more than fiddling with it a little bit and then forgetting everything.

Fast forward a couple of years, and now I've been “playing” with C# for quite a while, and loving every minute of it. Now my wife has to play with Java, and I'm thinking, “What the hey, I might help her out with homework a little, just to get my feet wet again in this java thing”, besides, I really wanted to get a good look at the new IntelliJ IDEA java IDE, which some of my friends have been raving about like mad. Sure, I promised to help out with homework, but that doesn’t mean I can’t take a couple of hours and just play with the world of snazzy features that just fell into my lap, right?  Oh man. The refactoring features in the IDE are dreamy. Take every piece of code you ever wrote, and make changes to it with the ease of a few mouse clicks. One of my favorites is the ability to write private/public fields and then hit ALT+INSERT and select “Implement getters/setters” from the menu that pops up. Then I just check off the fields I want and they automatically get Getters and setters (and are turned private). Do the same routine again, but select “Create constructors”, and again, you get the ability to just check off the  fields that will be initialized automatically inside the constructors.

You also get tips that act like smart tags:

Here you can see what happens when I write a variable name in my method that is not declared. How cool is that? You get these tags when you do all sorts of things like not implement an interface correctly and so on.  Another favorite of mine: “Refactoring->Rename” allows you to change a field’s name and automatically make all the other code conform to the new name. You can do the same with class names, method signatures and so on. You can also extract code into a separate method, extract interfaces, extract superclasses, move members between class hierarchies… very nifty.

Now, what I’ve outlined here is just the tip of the iceberg. There are literally hundreds of useful refactorings available in the IDE, and I love the amount of thought that went into creating this usability heaven. I don’t know just how good Whidbey will be at refactorings, but if it offers just half of this, it will be very cool (still, you have to wonder, why just half? How hard is it to implement all those features? Not very hard. It’s all pure nitty gritty work of search and replace mostly, that’s all).

Published Sunday, October 26, 2003 1:27 PM by RoyOsherove
Filed under:

Comments

Sunday, October 26, 2003 6:59 AM by Frans Bouma

# re: A few lessons from IntelliJ IDEA

The one thing that tells me IntelliJ is much better than VS.NET is that it seems that the IDE knows what's inside the editor: it's aware of the meaning of the code, it's not looking at it as ascii characters.

In other words: the IDE views the world in an editor but works with the world inside itself, the editor's contents is a view on that world and the developer alters that world, not the contents of the viewer (the editors contents) although for the developer it seems that the developer is altering texts.

The big advantage of this is that the IDE can be ultra smart and still be fully able to present the developer the code in whatever format he wants and persist that format. I get the feeling in VS.NET this is not the case: the editor looks at the text as text, it doesn't use a set of elements inside that are represented by text in an editor, which results in all kinds of crap, like the lack of serious functionality to alter code inside a texteditor from a macro, using intelligent knowledge (f.e. create a region for properties and one for member variables and add a property in one region and a member which is used by that property in the other. This is clumbsy in VS.NET now, because hte editor isn't aware of what's inside itself: every character is the same. IntelliJ seems to work totally different (no wonder, the MVC pattern is a cornerstone of the Java API).

Whidbey seems to change this a bit, lets hope it will be on par with IDEA.
Friday, November 07, 2003 6:50 PM by Benjamin Mitchell

# re: A few lessons from IntelliJ IDEA

This is a great piece of work Roy. I'm glad that someone in the Microsoft community is highlighting the innovations in the Java IDE's. I love competition like this when it leads to improvements in developer tools. Like you say, I hope the Visual Studio team are tracking these changes. It looks like Whidbey's refactoring support is a little less than half of what IntelliJ provides, hopefully the Longorn version (Orcas?) will go the rest of the distance.
Wednesday, November 19, 2003 7:27 AM by senkwe chanda

# re: A few lessons from IntelliJ IDEA

Woah, those are really cool features :-) Can't those features be added via addins to VS7? Afterall, if MS do it, they'll be killing some poor component vendor somewhere.
Monday, March 08, 2004 6:20 AM by TrackBack

# ReSharper

ReSharper
Friday, September 03, 2004 12:48 PM by TrackBack

# Review - JetBrains Resharper

Friday, September 03, 2004 12:50 PM by TrackBack

# Review - JetBrains Resharper

Monday, January 31, 2005 12:49 AM by TrackBack

# ReSharper