Hello,
sometimes a class should return objects, that do not exist as an field.
Therefor I wanted to write an simple get-live-template:
public get<Tab>
should result in:
(1)
public OurSpecialObject getOurSpecialObject() {
}
or (2)
public OurSpecialObject getSpecialObject() {
}
I tried it with
<template name="get" value="$TYPE$ get$NAME$()
{ $END$ } " description="create getter"
toReformat="true" toShortenFQNames="true">
<variable name="TYPE" expression=""Object"" defaultValue=""
alwaysStopAt="true" />
<variable name="NAME" expression="capitalize(TYPE)" defaultValue=""
alwaysStopAt="true" />
<context>
<option name="JAVA_CODE" value="true" />
<option name="JAVA_COMMENT" value="false" />
<option name="JAVA_STRING" value="false" />
<option name="XML" value="false" />
<option name="HTML" value="false" />
<option name="JSP" value="false" />
<option name="OTHER" value="false" />
</context>
</template>
, but this does not allow the result (2). I need a functionality like
hitting Ctrl-Space at the | in the next line:
OurSpecialObject |
Than it would be possible to replace the NAME expression with
capitalize(suggestVariableName(TYPE))
Best regards
Thomas Singer
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features