Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » UserRegion in non Java artifacts?
UserRegion in non Java artifacts? [message #43015] Thu, 13 March 2008 01:14 Go to next message
Gary Pinkham is currently offline Gary PinkhamFriend
Messages: 8
Registered: July 2009
Junior Member
Does UserRegion and InitialCode work in non Java artifacts? Say a JSP file?
or a properties file? If so are there any tricks? I tried with a
template that produces a JSP file and it always regenerates the contents...
I'm using Jet 0.8.2

Thanks,
Gary
Re: UserRegion in non Java artifacts? [message #43611 is a reply to message #43015] Wed, 26 March 2008 14:08 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Gary:

Yes, it does - I use it to generate JET templates :-). Typical usage:

<c:userRegion> put some unique-to-the-file marker here<c:initialCode>
... put your initial code here...
</c:initialCode>put a closing marker here - it shouldn't appear (or be
likely to appear in the user code)</c:userRegion>

Often, you use a c:get tag in the unique marker area to generate the marker.

Tips:
1) Reduce the use of whitespace in the opening and closing markers. If you
do any indenting of the markers, do it befor the <c:userRegion> and
</c:initialCode> tags
2) To minimize whitespace, use the form above.

If this works out, why not update the JET FAQ? Here's a link to the current
article:

http://wiki.eclipse.org/JET_FAQ_How_do_I_create_user_specifi c_code_regions%3F

Paul


"Gary Pinkham" <gpinkham@kronos.com> wrote in message
news:fr9v68$f3f$1@build.eclipse.org...
> Does UserRegion and InitialCode work in non Java artifacts? Say a JSP
> file? or a properties file? If so are there any tricks? I tried with a
> template that produces a JSP file and it always regenerates the
> contents... I'm using Jet 0.8.2
>
> Thanks,
> Gary
>
Previous Topic:Issue with JMerge
Next Topic:difference between 'transform' and 'deployedTransforms' extension points
Goto Forum:
  


Current Time: Thu Dec 26 12:43:31 GMT 2024

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

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

Back to the top