type auto-import on live-templates

hi i am having several  custom live templates which use types from a different package (-> so I have to import them). For example:

@Test
public void $EXPR$(){
}

Unfortunately I always have to import  @Test type myself with Alt+Enter (which is a bit annoying).
Is there a way that idea can auto-import types appearing inside live-template snippets instantly. I couldn't find such an option.

thanks

1 comment
Comment actions Permalink

Hello manuel,

The correct way to do so is the other way round. :) Specify a full-qualified
name for @Test in your live template, and IntelliJ will automatically shorten
the class name and add the import statement.

hi i am having several  custom live templates which use types from a
different package (-> so I have to import them). For example:

@Test
public void $EXPR$(){
}
Unfortunately I always have to import  @Test type myself with
Alt+Enter (which is a bit annoying).

Is there a way that idea can auto-import types appearing inside
live-template snippets instantly. I couldn't find such an option.

thanks

---
Original message URL:
http://www.jetbrains.net/devnet/message/5250717#5250717

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


7

Please sign in to leave a comment.