Skip to main content
summaryrefslogtreecommitdiffstats
blob: 27d25eb9bd06f8e10f0ca361954f6efbe20998d7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<link rel="STYLESHEET" href="../../../book.css" charset="ISO-8859-1" type="text/css"/>
<TITLE>&lt;java:merge&gt; - Standard JET2 Java Tags</TITLE>
</HEAD>
<BODY>
<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
	<TBODY>
		<TR>
			<TH align="left">
			<P>&lt;java:merge&gt;</P></TH>
			<TH align="right"><A href="overview.html">Standard JET2 Java Tags</A></TH>
		</TR>
	</TBODY>
</TABLE>
<HR>
<P><B>merge</B></P>
<P><P>               Cause the template contents to be merged with the existing Java file using the EMF JMerge engine.<P>            </P>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Tag Summary</TH></TR>
		<TR>
			<TD width="10%">required</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;java:merge/&gt;<br>
			</SPAN></TD>
		</TR>
		<TR>
			<TD width="10%">full tag</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;java:merge rules=&quot;<I>value</I>&quot; rulesContext=&quot;<I>value</I>&quot;/&gt;<br>
			</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<exists node="tag/attribute use='required'">
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Required Attributes</TH></TR>
	</TBODY>
</TABLE>
</exists>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Optional Attributes</TH></TR>
		<TR>
		<TR>
			<TD width="10%">rules</TD>
			<TD><BR>                  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.<BR>               </TD>
		</TR>
		<TR>
			<TD width="10%">rulesContext</TD>
			<TD><BR>                  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'.<BR>               </TD>
		</TR>
	</TBODY>
</TABLE>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Example</TH></TR>
		<TR>
			<TD width="10%"></TD>
			<TD><SPAN style="font-family: monospace">
<!-- Begin merge example -->
			<i>... template generating a .java or .properties file ...</i><BR><BR>
			&lt;%-- Merge the generated contents with any existing file, using the standard JMerge rules --%&gt;<BR> 
			&lt;java:merge/&gt;<br><br>
			
			&lt;%-- Merge using custom JMerge rules --%&gt;<BR> 
			&lt;java:merge rules=&quot;myMergeRules.xml&quot; rulesContext=&quot;transform&quot;/&gt;<br><br>
			
			&lt;%-- Explicit use of EMF Codegen merge rules (same as first) --%&gt;<BR> 
			&lt;java:merge rules=&quot;platform:/plugin/org.eclipse.emf.codegen.ecore/templates/emf-merge.xml&quot;/&gt;<br><br>
			
<!-- End merge example -->
</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<P></P></BODY>
</HTML>

Back to the top