Tuesday, December 30, 2008

Pure Idea Joy

One of the reasons why I love IntelliJ Idea. Look at the text in red below.

package com.msh.ui;

import java.util.ArrayList;
import java.util.List;

/**
* User: sachinh
* Date: 28-Dec-2008
* Time: 17:22:38
*/
public class ParsedCommand {
private List<Property> props = new ArrayList<Property>(5);
private List<PluginInfo> mojos =
new
ArrayList<PluginInfo>(5);

public ParsedCommand(String cmd) {
parseCommand(cmd);
}

public List<Property> getUnusedProperties() {
for (PluginInfo p : <ctrl+shift+space> fills in mojos) {

}


Just brilliant - the fact that it picks up the right collection field
based on the Iterator's type. I think its called Smart Code Completion.

3 comments:

Anonymous said...

Eclipse does too.

Sachin said...

Thanks. I tried to find it in Eclipse but couldn't. Would appreciate it if you could post the key-bindings for this feature.

Anonymous said...

Quicker would be simply to type:

iter<tab>

and you get a live template selection of iterations.