Tharaka Deshan
Tharaka Deshan

Reputation: 1396

Eclipse - xtend Template

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!

Upvotes: 0

Views: 284

Answers (1)

Sebastian Zarnekow
Sebastian Zarnekow

Reputation: 6729

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

Upvotes: 1

Related Questions