Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:57 Go to next message
Megan Parkes is currently offline Megan ParkesFriend
Messages: 2
Registered: September 2014
Junior Member
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 05:02 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30544
Registered: July 2009
Senior Member
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 11:01 Go to previous messageGo to next message
Megan Parkes is currently offline Megan ParkesFriend
Messages: 2
Registered: September 2014
Junior Member
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 11:13 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30544
Registered: July 2009
Senior Member
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: Tue Oct 15 21:52:51 GMT 2019

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

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

Back to the top