Autocomplete for generic types in Eclipse
- by AvrDragon
"Refer to objects by their interfaces" is a good practise, as mentioned in Effective Java.
So for example i prefer
List<String> al = new ArrayList<String>();
over
ArrayList<String> al = new ArrayList<String>();
in my code. One annoying thing is that if i type ArrayList<String> al = new and then hit Ctrl+Space in Eclipse i get ArrayList<String>() as propostal. But if i type List al = new and then hit Ctrl+Space i will get only propostal to define anonymous inner class, but not propostals such as new ArrayList<String>(), what is 99% the case, or for example new Vector<String>(). Is there any way to get the subclasses as propostals for generic types?