|
|
|
|
merge
Cause the template contents to be merged with the existing Java file using the EMF JMerge engine.
Tag Summary |
required |
<java:merge/>
|
full tag |
<java:merge rules="value" rulesContext="value" facade="value"/>
|
Optional Attributes |
rules |
A URL to the JMerge rules file. If the path is relative, then it is relative to the location specified by the rulesContext attribute. If not specified, the default is the JMerge rules used by the EMF Code Generator. |
rulesContext |
The context for resolving relative 'rules' URLs. Possible values are 'transform' or 'workspace'. If the value is 'transform', then the 'rules' URL is treated as a JET project relative path. If the value is 'workspace', then the 'rules' URL is treated as an Eclipse workspace relative path. The default is 'transform'. |
facade |
Specify the merge facade class to use. Default is for EMF 2.2 is org.eclipse.emf.codegen.merge.java.facade.jdom.JDOMFacadeHelper. For EMF 2.3 and later, the default is org.eclipse.emf.codegen.merge.java.facade.ast.ASTFacadeHelper. |
Example |
|
... template generating a .java or .properties file ...
<%-- Merge the generated contents with any existing file, using the standard JMerge rules --%>
<java:merge/>
<%-- Merge using custom JMerge rules --%>
<java:merge rules="myMergeRules.xml" rulesContext="transform"/>
<%-- Explicit use of EMF Codegen merge rules (same as first) --%>
<java:merge rules="platform:/plugin/org.eclipse.emf.codegen.ecore/templates/emf-merge.xml"/>
|
|
|
|