Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Merging Transformations in JET2
Merging Transformations in JET2 [message #53063] Tue, 26 September 2006 14:23 Go to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 191
Registered: July 2009
Senior Member
Paul,

Yesterday we were talking about the .classpath file generation for
adding depdencies , i need a small clarification in that , whether there
we can merge the transformations that are done using JET2. Say I I have
a text file and generated once,then there is a small amount of model
change which forced me to regenereate the text file , how will achieve
this ? i guess JET2 will overwrite the content :-\

Thanks.

Kamesh
Re: Merging Transformations in JET2 [message #53115 is a reply to message #53063] Tue, 26 September 2006 14:59 Go to previous messageGo to next message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Kamesh:

JET has a number of tags that help in merge scenarios:

The <c:userRegion> tag can extract text from the existing file, and ensure
it appears in the re-generated output.

For Java and Properties files, the <java:merge> tag will run EMF's
JMerge/Properties utilities. EMF has an article on JMerge on their web site.

Unfortunately, for documents like .classpath (which is an XML document),
there is no easy tag that does this. Alternatives are all relatively messy:
* use <c:load> to load .classpath, then merge the contents you want to add
into the in memory model (tags like <c:addElement>, <c:set> would help), and
then use <c:dump> in a template to write out the merged .classpath
* write a new JET tag (create a plugin with a dependency on org.eclipse.jet,
and implement the org.eclipse.jet.taglibraries extension point). The tag
would use the JDT APIs to create classpath entries in the project.
* put more information into your input model so that users don't have to
modify Java build path information the project. Instead, they would describe
the dependency in the model, and re-run.

Paul

"Kamesh Sampath" <kamesh_sampath@msn.com> wrote in message
news:efbd42$ahi$2@utils.eclipse.org...
> Paul,
>
> Yesterday we were talking about the .classpath file generation for adding
> depdencies , i need a small clarification in that , whether there we can
> merge the transformations that are done using JET2. Say I I have a text
> file and generated once,then there is a small amount of model change which
> forced me to regenereate the text file , how will achieve this ? i guess
> JET2 will overwrite the content :-\
>
> Thanks.
>
> Kamesh
Re: Merging Transformations in JET2 [message #53141 is a reply to message #53115] Tue, 26 September 2006 15:47 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 191
Registered: July 2009
Senior Member
thanks paul .. will try that and get back to you in case of any further
clarifications.

I just like what you guyz are doing . its really fantastic job !!! Hats
off ! :-)

Paul Elder wrote:
> Kamesh:
>
> JET has a number of tags that help in merge scenarios:
>
> The <c:userRegion> tag can extract text from the existing file, and ensure
> it appears in the re-generated output.
>
> For Java and Properties files, the <java:merge> tag will run EMF's
> JMerge/Properties utilities. EMF has an article on JMerge on their web site.
>
> Unfortunately, for documents like .classpath (which is an XML document),
> there is no easy tag that does this. Alternatives are all relatively messy:
> * use <c:load> to load .classpath, then merge the contents you want to add
> into the in memory model (tags like <c:addElement>, <c:set> would help), and
> then use <c:dump> in a template to write out the merged .classpath
> * write a new JET tag (create a plugin with a dependency on org.eclipse.jet,
> and implement the org.eclipse.jet.taglibraries extension point). The tag
> would use the JDT APIs to create classpath entries in the project.
> * put more information into your input model so that users don't have to
> modify Java build path information the project. Instead, they would describe
> the dependency in the model, and re-run.
>
> Paul
>
> "Kamesh Sampath" <kamesh_sampath@msn.com> wrote in message
> news:efbd42$ahi$2@utils.eclipse.org...
>
>> Paul,
>>
>> Yesterday we were talking about the .classpath file generation for adding
>> depdencies , i need a small clarification in that , whether there we can
>> merge the transformations that are done using JET2. Say I I have a text
>> file and generated once,then there is a small amount of model change which
>> forced me to regenereate the text file , how will achieve this ? i guess
>> JET2 will overwrite the content :-\
>>
>> Thanks.
>>
>> Kamesh
>>
>
>
>
Re: Merging Transformations in JET2 [message #592119 is a reply to message #53063] Tue, 26 September 2006 14:59 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member
Kamesh:

JET has a number of tags that help in merge scenarios:

The <c:userRegion> tag can extract text from the existing file, and ensure
it appears in the re-generated output.

For Java and Properties files, the <java:merge> tag will run EMF's
JMerge/Properties utilities. EMF has an article on JMerge on their web site.

Unfortunately, for documents like .classpath (which is an XML document),
there is no easy tag that does this. Alternatives are all relatively messy:
* use <c:load> to load .classpath, then merge the contents you want to add
into the in memory model (tags like <c:addElement>, <c:set> would help), and
then use <c:dump> in a template to write out the merged .classpath
* write a new JET tag (create a plugin with a dependency on org.eclipse.jet,
and implement the org.eclipse.jet.taglibraries extension point). The tag
would use the JDT APIs to create classpath entries in the project.
* put more information into your input model so that users don't have to
modify Java build path information the project. Instead, they would describe
the dependency in the model, and re-run.

Paul

"Kamesh Sampath" <kamesh_sampath@msn.com> wrote in message
news:efbd42$ahi$2@utils.eclipse.org...
> Paul,
>
> Yesterday we were talking about the .classpath file generation for adding
> depdencies , i need a small clarification in that , whether there we can
> merge the transformations that are done using JET2. Say I I have a text
> file and generated once,then there is a small amount of model change which
> forced me to regenereate the text file , how will achieve this ? i guess
> JET2 will overwrite the content :-\
>
> Thanks.
>
> Kamesh
Re: Merging Transformations in JET2 [message #592134 is a reply to message #53115] Tue, 26 September 2006 15:47 Go to previous message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 191
Registered: July 2009
Senior Member
thanks paul .. will try that and get back to you in case of any further
clarifications.

I just like what you guyz are doing . its really fantastic job !!! Hats
off ! :-)

Paul Elder wrote:
> Kamesh:
>
> JET has a number of tags that help in merge scenarios:
>
> The <c:userRegion> tag can extract text from the existing file, and ensure
> it appears in the re-generated output.
>
> For Java and Properties files, the <java:merge> tag will run EMF's
> JMerge/Properties utilities. EMF has an article on JMerge on their web site.
>
> Unfortunately, for documents like .classpath (which is an XML document),
> there is no easy tag that does this. Alternatives are all relatively messy:
> * use <c:load> to load .classpath, then merge the contents you want to add
> into the in memory model (tags like <c:addElement>, <c:set> would help), and
> then use <c:dump> in a template to write out the merged .classpath
> * write a new JET tag (create a plugin with a dependency on org.eclipse.jet,
> and implement the org.eclipse.jet.taglibraries extension point). The tag
> would use the JDT APIs to create classpath entries in the project.
> * put more information into your input model so that users don't have to
> modify Java build path information the project. Instead, they would describe
> the dependency in the model, and re-run.
>
> Paul
>
> "Kamesh Sampath" <kamesh_sampath@msn.com> wrote in message
> news:efbd42$ahi$2@utils.eclipse.org...
>
>> Paul,
>>
>> Yesterday we were talking about the .classpath file generation for adding
>> depdencies , i need a small clarification in that , whether there we can
>> merge the transformations that are done using JET2. Say I I have a text
>> file and generated once,then there is a small amount of model change which
>> forced me to regenereate the text file , how will achieve this ? i guess
>> JET2 will overwrite the content :-\
>>
>> Thanks.
>>
>> Kamesh
>>
>
>
>
Previous Topic:Merging Transformations in JET2
Next Topic:How to use Progress Monitor with JET2 Transformation
Goto Forum:
  


Current Time: Thu Apr 25 21:45:41 GMT 2024

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

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

Back to the top