java - Autocomplete with generic types in concrete class of implementation -


when coding java in ecipse (kepler), having problem when making new variable of generic interface type , autocomplete concrete implementation when initializing variable. i'm talking generic interfaces/concrete implementations list/arraylist , map/hashmap.

example: type ide:

list<string> stringlist = new arrayl 

then, use autocomplete (ctrl+space) fill code arraylist(), ide puts code:

list<string> stringlist = arraylist<>() 

so ignoring string generic type parameterization. ideas on how can eclipse ide detect generic type parameter in variable declaration , place type parameter of implementation's constructor? used work me automatically in eclipse, stopped working on last couple of months. not sure configuration change did workspace cause happen...besides upgrading eclipse juno eclipse kepler.

eclipse ignore generic type if auto-completed new arraylist(), instance of raw type.

but auto-completes new arraylist<>(), uses diamond operator. operator exists since java 7 , equivalent new arraylist<string>(), without redundancy.

so, in short, eclipse right thing.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -