JET - Understanding @start and @end [message #1415364] |
Tue, 02 September 2014 11:57  |
Eclipse User |
|
|
|
Hi,
I'm trying to understand what @start and @end are used for in JET templates, and also how they relate to @ include as I have seen this pattern appear in a lot of templates and do not understand what they do.
For example
<%@ include file="Class/reflectiveDelegation.override.javajetinc" fail="alternative" %>
<%@ start %>
<%if (isImplementation && (genModel.getFeatureDelegation() == GenDelegationKind.REFLECTIVE_LITERAL || genModel.isDynamicDelegation()) && (genClass.getClassExtendsGenClass() == null ||
...
<%@ end %><%//Class/reflectiveDelegation.override.javajetinc%>
Thanks
|
|
|
|
|
Re: JET - Understanding @start and @end [message #1415690 is a reply to message #1415686] |
Wed, 03 September 2014 07:13  |
Eclipse User |
|
|
|
Megan,
Comments below.
On 03/09/2014 1:01 PM, Megan Parkes wrote:
> Hi Ed,
>
> That makes sense, thank you.
>
> I couldn't find the file in the repo in this example:
> "Class/reflectiveDelegation.override.javajetinc" and was wondering
> where it could be found.
It doesn't exist so the section between the @start/@end is always used
by default. But if you use dynamic templates (see FAQ), you can create
such a file in your template folder structure and then it will exist and
hence what you specify in that file be used instead. The idea being
that you can extend the template without copying the whole template and
just editing just one part of it.
>
> Thanks,
> Megan
>
|
|
|
Powered by
FUDForum. Page generated in 0.04769 seconds