Archive for June, 2008

Type Migration Refactoring

Wednesday, June 11th, 2008

If you care about performance of your project and development productivity, there is no any way to overestimate automated refactorings. They are in fact a powerful tool that allows improving your code without spending plenty of time.

In addition to IntelliJ IDEA rich set of refactorings, one of the latest EAPs offers a new one, called Type Migration. Let’s take a look on it.

Consider we have some code like the following one:
Before Type Migration
Here, myID is declared as String. You might encounter such situation while working on some legacy projects, for example. As our application apparently uses a database, we need to make myID int instead of String. Formerly, this could be a real headache, if we work on a quite large and complex project. Although, we can simply search and replace the type, we’ll definitely end up with a project full of red-underlined code such way. We need more intelligent and easy way to change the type, and now we’ve got it - type migration refactoring.

Just place the caret at the type to be refactored and press Ctrl+Shift+F6. Alternatively, select Refactor | Type Migration on the main menu.
In the Type Migration dialog specify the new type and the scope to be refactored, then click Preview to investigate the usages to be affected and conflicts, if found. In the preview you can also exclude some nodes from the refactoring, for instance, if they affect your API.
Type Migration Preview
In our example, there is a conflict, since getID() will return int, and equals() is not applicable to primitives. We can easily fix this part manually in the editor. Then, the only thing we need to do is rerun the refactoring from the preview, and voila, myID is now int.
After Type Migration

Technorati tags: , ,

Discussing the Future of Programming Languages and IDEs

Thursday, June 5th, 2008

After the latest JavaOne event, Dmitry Jemerov — the lead IntelliJ IDEA developer — was interviewed by Frank Sommers, Editor-in-Chief at Artima Developer Community.

Read the interview to get the insight into the latest trends in the world of programming languages, learn about new cool features to be expected in the upcoming IntelliJ IDEA 8.0, or just to stay in tune with the world developer community.

By the way, if any of the new IntelliJ IDEA features has caught your eye, you can try it for yourself by joining IntelliJ IDEA Early Access Program at http://www.intellij.net/eap, where you can find the latest features, discussion forums and lots of other useful stuff to explore.

Technorati tags: , ,

Erlang Exchange

Wednesday, June 4th, 2008

The first International Erlang eXchange 2008 will be held on June 26th-27th in London. We at JetBrains are very much interested in all sorts of modern programming languages, and a couple of developers from the IntelliJ IDEA team, Peter Gromov and Ilya Sergey, decided to participate in the conference.

The First International Erlang eXchange 2008 will be held on June 26th-27th. Aimed at Erlang Architects, Programmers, Project managers, Software and Platform Innovators, existing Erlang users as well as Erlang newbies and anyone interested in Erlang, concurrent and sequential programming, the Erlang eXchange 2008 promises to be an event not to be missed!

Registration is now open, so please join us at the event if interested.