Live Template to iterate over the entrySet of a map, utilising generics
Has anybody managed it? I've had a go, but got nowhere fast...
ie. I have this:
Map<String, String> mappings = getMappings();
and I want this to be generated underneath:
for (Map.Entry<String, String> entry : mappings.entrySet()) {
}
Cheers,
N.
Please sign in to leave a comment.
Hello Nathan,
In 7.0.3 EAP builds, the standard iter() live template does this.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Dmitry Jemerov wrote:
>> Has anybody managed it? I've had a go, but got nowhere fast...
>>
>> ie. I have this:
>> Map<String, String> mappings = getMappings();
>> and I want this to be generated underneath:
>> for (Map.Entry<String, String> entry : mappings.entrySet()) {
>> }
>> Cheers,
>> N.
Blimey, you're right! I never noticed this... thanks Dmitry!
I just found this : http://www.jetbrains.net/jira/browse/IDEA-16499 -
Maybe you can close it now?
N.