Skip to main content



      Home
Home » Modeling » EMF » JET - Understanding @start and @end(JET @start @end @include templates)
JET - Understanding @start and @end [message #1415364] Tue, 02 September 2014 11:57 Go to next message
Eclipse UserFriend
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 #1415574 is a reply to message #1415364] Wed, 03 September 2014 01:02 Go to previous messageGo to next message
Eclipse UserFriend
Megan,

Comments below.

On 02/09/2014 7:13 PM, Megan Parkes wrote:
> 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%>
The template processor will look for the included file and, failing to
find it on the template path, will instead "include" the "alternative"
section between the @start and @end.
>
> Thanks
Re: JET - Understanding @start and @end [message #1415686 is a reply to message #1415574] Wed, 03 September 2014 07:01 Go to previous messageGo to next message
Eclipse UserFriend
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.

Thanks,
Megan
Re: JET - Understanding @start and @end [message #1415690 is a reply to message #1415686] Wed, 03 September 2014 07:13 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Resource being loaded twice
Next Topic:[CDO] CommitIntegrityException while using transaction.setCommittables
Goto Forum:
  


Current Time: Thu Jul 17 12:47:03 EDT 2025

Powered by FUDForum. Page generated in 0.04769 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top