August 12, 2004

Eclipse plug-in for generics

I have just added support for concrete collections to J15:  use Ctrl-1 on the creation of a concrete collection and J15 will add the correct Generic parameters.

Before:
List l2 = new ArrayList();
Float n2 = new Float(42); 
l2.add(n2);
After:
ArrayList<Float> l2 = new ArrayList<Float>();
Float n2 = new Float(42); 
l2.add(n2);
Before:
Map m = new HashMap();
m.put(new Integer(42), "Cedric");
After:
HashMap<Integer, String> m = new HashMap<Integer, String>();
m.put(new Integer(42), "Cedric");
Let me know if you can think of other conversions that this plug-in could make for you.

Posted by cedric at August 12, 2004 09:42 AM

Comments

Any hopes of an IntelliJ Version?

Posted by: mjasnowski at August 13, 2004 11:09 AM
Post a comment






Remember personal info?