Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc) » Merging Transformations in JET2
|
Re: Merging Transformations in JET2 [message #53115 is a reply to message #53063] |
Tue, 26 September 2006 14:59 |
Paul Elder 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 |
Kamesh Sampath 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 |
Paul Elder 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 |
Kamesh Sampath 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
>>
>
>
>
|
|
|
Goto Forum:
Current Time: Sat Jul 27 18:36:33 GMT 2024
Powered by FUDForum. Page generated in 0.03459 seconds
|