views:

146

answers:

2

If I already have the types imported, in Eclipse 3.4, I get concrete default classes, but in 3.5 I just get the interface for java.util.Collections. For example, hitting ctrl+space here:

Map map = new ctrl+space

On 3.4, i get offered HashMap(), on 3.5 Map() (which then gets defaulted to a new impl with methods templated).

For List, on 3.4 I'm offered ArrayList() but on 3.5 List() only.

Is this configurable in the templates or similar?

+2  A: 

I am not sure it is configurable, but I know that if you have one Map instanciated as an HashMap, the second one will come with an HashMap present in the "Content assist" list.

Map<Integer, String> m = new HashMap<Integer, String>();
Map<Integer, String> m2 = ctrl+space => HashMap

See all the eclipse Galileo 3.5 JDT Tips and Tricks

VonC
+1  A: 

I have just faced the same problem. The solution is Preferences -> Java -> Editor -> Content Assist -> Advanced Make sure you have "Java Proposals" selected. Once you enable this you should have the type proposal on ctrl + space.

olegt