Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse JET Guide
Previous Page Home Next Page

<java:merge>

Standard JET2 Java Tags

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"/>


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire