I tried to create a xtend template from here: Preferences>Xtend>Templates

${imp:import(foo.Bar)}

@Test
def ${name}() throws Exception {
    ${cursor} 
}

Even though this is working as Java Template, xtend class will generate following code for this:

class Test {
    //Here I pressed Ctrl+Spac
    imp

    @Test
    def name() throws Exception {

    }
}

It looks like the syntax I used is not valid in xtend templates. But it doesn't complain any errors too. Has anyone tried Xtend templates? please help me!

有帮助吗?

解决方案

The 'import' template variable resolver is not available in Xtend right now. You could file a feature request.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top