[SCM] eclipse-emf - Plug-in for eclipse - Debian package. branch, master, updated. b8a2013ce2bdddf52eee49ab097a08358c0bfb19

Benjamin Drung bdrung-guest at alioth.debian.org
Fri Jun 11 23:46:00 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "eclipse-emf - Plug-in for eclipse - Debian package.".

The branch, master has been updated
       via  b8a2013ce2bdddf52eee49ab097a08358c0bfb19 (commit)
       via  82f4f786ff899a16c216aaa029f8542d2c84dd6e (commit)
       via  e9bd394012f845eda066cfb8bd22742239110468 (commit)
      from  a632593ccdd4386c74f48418d88ac6bccecafb4e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b8a2013ce2bdddf52eee49ab097a08358c0bfb19
Merge: e9bd394012f845eda066cfb8bd22742239110468 82f4f786ff899a16c216aaa029f8542d2c84dd6e
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Sat Jun 12 01:45:53 2010 +0200

    Merge branch 'upstream'

commit e9bd394012f845eda066cfb8bd22742239110468
Author: Benjamin Drung <bdrung at ubuntu.com>
Date:   Sat Jun 12 01:44:15 2010 +0200

    Exclude jet tutorials due to unclear licensing.

-----------------------------------------------------------------------

Summary of changes:
 debian/fetch-eclipse-source.exclude                |    1 +
 .../tutorials/jet1/images/img001.gif               |  Bin 3781 -> 0 bytes
 .../tutorials/jet1/images/img002.gif               |  Bin 10595 -> 0 bytes
 .../tutorials/jet1/images/img003.gif               |  Bin 9118 -> 0 bytes
 .../tutorials/jet1/images/img004.gif               |  Bin 4079 -> 0 bytes
 .../tutorials/jet1/images/img005.gif               |  Bin 9627 -> 0 bytes
 .../tutorials/jet1/images/img006.gif               |  Bin 2575 -> 0 bytes
 .../tutorials/jet1/images/img007.gif               |  Bin 9981 -> 0 bytes
 .../tutorials/jet1/images/img008.gif               |  Bin 7525 -> 0 bytes
 .../tutorials/jet1/images/img009.gif               |  Bin 7096 -> 0 bytes
 .../tutorials/jet1/images/img010.gif               |  Bin 8309 -> 0 bytes
 .../tutorials/jet1/images/img011.gif               |  Bin 15074 -> 0 bytes
 .../tutorials/jet1/images/img012.gif               |  Bin 13329 -> 0 bytes
 .../tutorials/jet1/images/img013.gif               |  Bin 5581 -> 0 bytes
 .../tutorials/jet1/images/img014.gif               |  Bin 9095 -> 0 bytes
 .../tutorials/jet1/images/tag_1.gif                |  Bin 150 -> 0 bytes
 .../tutorials/jet1/images/tag_2.gif                |  Bin 165 -> 0 bytes
 .../tutorials/jet1/images/tag_3.gif                |  Bin 166 -> 0 bytes
 org.eclipse.emf.doc/tutorials/jet1/images/tip.gif  |  Bin 406 -> 0 bytes
 .../tutorials/jet1/images/tryit.gif                |  Bin 309 -> 0 bytes
 .../tutorials/jet1/jet_tutorial1.html              |  709 -------------
 org.eclipse.emf.doc/tutorials/jet2/JETCTask.java   |  160 ---
 org.eclipse.emf.doc/tutorials/jet2/images/Idea.jpe |  Bin 5102 -> 0 bytes
 .../tutorials/jet2/images/default_style.css        |   42 -
 .../tutorials/jet2/images/enum_gui_page1.gif       |  Bin 10615 -> 0 bytes
 .../tutorials/jet2/images/enum_gui_page2.gif       |  Bin 14787 -> 0 bytes
 .../tutorials/jet2/images/enum_gui_page3.gif       |  Bin 15833 -> 0 bytes
 .../tutorials/jet2/images/jetemitter.gif           |  Bin 3439 -> 0 bytes
 .../tutorials/jet2/images/new_creation_wizard.gif  |  Bin 13786 -> 0 bytes
 .../tutorials/jet2/images/new_toolbar.gif          |  Bin 4105 -> 0 bytes
 .../tutorials/jet2/images/tag_1.gif                |  Bin 150 -> 0 bytes
 .../tutorials/jet2/images/tag_2.gif                |  Bin 165 -> 0 bytes
 .../tutorials/jet2/images/tag_3.gif                |  Bin 166 -> 0 bytes
 .../tutorials/jet2/images/tag_4.gif                |  Bin 159 -> 0 bytes
 .../tutorials/jet2/images/win_only.gif             |  Bin 221 -> 0 bytes
 .../tutorials/jet2/jet_tutorial2.html              | 1048 --------------------
 ...org.eclipse.emf.examples.jet.article2_2.3.0.zip |  Bin 92481 -> 0 bytes
 37 files changed, 1 insertions(+), 1959 deletions(-)

diff --git a/debian/fetch-eclipse-source.exclude b/debian/fetch-eclipse-source.exclude
new file mode 100644
index 0000000..1ad5bbd
--- /dev/null
+++ b/debian/fetch-eclipse-source.exclude
@@ -0,0 +1 @@
+*/org.eclipse.emf.doc/tutorials/jet*
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img001.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img001.gif
deleted file mode 100644
index d555658..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img001.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img002.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img002.gif
deleted file mode 100644
index fadd0f3..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img002.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img003.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img003.gif
deleted file mode 100644
index 1b995c2..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img003.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img004.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img004.gif
deleted file mode 100644
index 432e954..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img004.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img005.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img005.gif
deleted file mode 100644
index 0c78d7e..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img005.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img006.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img006.gif
deleted file mode 100644
index 3a43c70..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img006.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img007.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img007.gif
deleted file mode 100644
index 3684ba2..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img007.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img008.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img008.gif
deleted file mode 100644
index a1691dc..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img008.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img009.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img009.gif
deleted file mode 100644
index 5a50d9a..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img009.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img010.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img010.gif
deleted file mode 100644
index 51700a4..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img010.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img011.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img011.gif
deleted file mode 100644
index 365a24a..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img011.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img012.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img012.gif
deleted file mode 100644
index 07893f9..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img012.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img013.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img013.gif
deleted file mode 100644
index 159ca12..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img013.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/img014.gif b/org.eclipse.emf.doc/tutorials/jet1/images/img014.gif
deleted file mode 100644
index c800249..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/img014.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/tag_1.gif b/org.eclipse.emf.doc/tutorials/jet1/images/tag_1.gif
deleted file mode 100644
index 4859d6f..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/tag_1.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/tag_2.gif b/org.eclipse.emf.doc/tutorials/jet1/images/tag_2.gif
deleted file mode 100644
index 5ea43dc..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/tag_2.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/tag_3.gif b/org.eclipse.emf.doc/tutorials/jet1/images/tag_3.gif
deleted file mode 100644
index a69b68e..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/tag_3.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/tip.gif b/org.eclipse.emf.doc/tutorials/jet1/images/tip.gif
deleted file mode 100644
index 77b2451..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/tip.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/images/tryit.gif b/org.eclipse.emf.doc/tutorials/jet1/images/tryit.gif
deleted file mode 100644
index f4927a4..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet1/images/tryit.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet1/jet_tutorial1.html b/org.eclipse.emf.doc/tutorials/jet1/jet_tutorial1.html
deleted file mode 100644
index 2dc7af2..0000000
--- a/org.eclipse.emf.doc/tutorials/jet1/jet_tutorial1.html
+++ /dev/null
@@ -1,709 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>JET Tutorial Part 1 (Introduction to JET)</title>
-<link rel="stylesheet" href="images/../../../css/book.css" type="text/css" />
-<link rel="stylesheet" href="images/../../../css/emf-book.css" type="text/css" />
-</head>
-
-<body lang="EN-US" xml:lang="EN-US">
-
-<div align="right">&nbsp; &copy; 
-  Copyright <a href="http://www.azzurri.jp">Azzurri Ltd.</a> 2003 - 2005. All rights 
-  reserved
-  <table border="0" cellspacing="0" cellpadding="2" width="100%">
-
-    <tr> 
-      <td align="left" valign="top" colspan="2" bgcolor="#0080C0"><strong><font face="Arial,Helvetica"><font color="#FFFFFF">&nbsp;Eclipse 
-        Corner Article</font></font></strong></td>
-    </tr>
-  </table>
-</div>
-<div align="left"> 
-  <h1><img src="http://www.eclipse.org/images/Idea.jpg" align="middle" width="120" height="86" alt=""/></h1>
-</div>
-
-<h1 align="center">JET Tutorial Part 1 (Introduction to JET) </h1>
-
-<blockquote>
-<strong>Summary</strong>
-
-<br/>
-<p>
-  Generating source code can save you time in your projects and can reduce the 
-  amount of tedious redundant programming. Generating source code can be powerful, 
-  but the program that writes the code can quickly become very complex and hard 
-  to understand. One way to reduce complexity and increase readability is to use 
-  templates. </p>
-  <p> The Eclipse Modeling Framework (<a href="http://www.eclipse.org/emf/" target="_blank">EMF</a>) 
-    project contains two very powerful tools for generating source code: JET (Java 
-    Emitter Templates) and JMerge (Java Merge). With JET you can use a JSP-like 
-    syntax (actually a subset of the JSP syntax) that makes it easy to write templates 
-    that express the code you want to generate. JET is a generic template engine 
-    that can be used to generate SQL, XML, Java source code and other output from 
-    templates. It is located in the org.eclipse.emf.codegen plug-in as part of 
-    the EMF runtime download. </p>
-
-  <p>
-  In this article you will learn how to create JET templates, how to use the JET 
-  Nature and JET Builder to automatically translate templates into Java classes, 
-  and how to use these classes to generate source code. This article also provides 
-  a short reference to the JET syntax. 
-  </p>
-  <p>Contributed by Remko Popma, Azzurri Ltd., remko.popma at azzurri dot jp, July 30, 2003. Used with permission. Last update: January 3rd, 2007.</p>
-</blockquote>
-
-<hr width="100%" />
-
-<h2>Contents</h2>
-<p><a href="#introduction">Getting Started</a><br/>
-<a href="#model">The JET Model</a><br/>
-<a href="#directives">Directives</a><br/>
-<a href="#scripting">JET Scripting Elements</a><br/>
-<a href="#resources">Resources</a></p>
-
-<h2><a name="introduction">Getting Started</a></h2>
-<p>Before creating our first template, you'll need the EMF plug-in. If you haven't 
-  installed it yet, install it now before continuing with this tutorial. </p>
-
-  <p>The screenshots are based on version 3.1.0 RC2 of the Eclipse SDK and version 2.1.0 I200506160200
-of EMF.  The minimum requirement to use Java 5.0 constructs, such as Generics, is Eclipse 3.3M4 
-and EMF 2.3.0M4, though.</p>
-
-<p>A JET template is a text file with a file name that ends with &quot;jet&quot;. 
-  I will follow the EMF convention of appending &quot;jet&quot; to whatever the 
-  file extension of the generated code would be, so <i>.javajet</i> implies that 
-  the template generates a .java file, <i>.xmljet</i> templates generate XML, 
-  templates that generate SQL have the <i>.sqljet</i> extension, and so on.</p>
-<h3> JET Nature and JET Builder </h3>
-
-<p>
-Let's follow tradition and start with a template that creates the message &quot;Hello, 
-world&quot;. We will create our first template using the following four step process: </p>
-<ol>
-  <li> Create a new Java project and give it a &quot;<i>src</i>&quot; source folder</li>
-  <li> Add the JET Nature to the project. This will create a folder called &quot;<i>templates</i>&quot; 
-    under the project root</li>
-
-  <li> Change the JET properties of the project to ensure that templates are translated 
-    into the &quot;<i>src</i>&quot; source folder of the project</li>
-  <li> Create a new file called &quot;<i>helloworld.txtjet</i>&quot; and save 
-    it in the <i>templates</i> folder</li>
-
-</ol>
-
-<h4> Step 1. Create a Project </h4>
-<p>From the workbench menu, select File &gt; New &gt; Project to bring up the New 
-Project wizard. Create a new Java project and add a source folder to it named 
-<i>src</i>.</p>
-
-<p><img src="images/img001.gif" alt="New Java Project with src folder"/></p>
-
-
-<h4> Step 2. Convert the Project to a JET Project</h4>
-<p>After creating the project, right-click on it in the Package Explorer or Hierarchy 
-  view and select New &gt; Other... &gt; Java Emitter Templates &gt; Convert Projects to JET Projects.  
-</p>
-  
-<p><img src="images/img002.gif" alt="New Java Project with src folder"/></p>
-
-  <p>After pressing the Next button, select
-  the project you've created and click Finish.</p>
-
-<p><img src="images/img003.gif" alt="Adding JET Nature to Java Project"/></p>
-
-<p> The wizard adds the JET Nature to the project creating a <i>templates</i> folder 
-  under the project root as shown in the image below. Also, a JET Builder is added 
-  to the project that will automatically translate every file in the templates 
-  folder with a file name ending in &quot;jet&quot; to a Java class. </p>
-
-<p> <img src="images/img004.gif" alt="Templates folder created"/></p>
-
-<h4> Step 3. Change JET Settings </h4>
-<p> Before creating our first template, let's make sure that the <i>src</i> source 
-  folder of the project is the destination folder of the translated templates. 
-  Right-click on the project and select &quot;Properties&quot; from the pop-up 
-  menu. In the Project Properties dialog, select JET Settings on the left-hand 
-  menu and enter &quot;src&quot; (the name of your source folder) in the &quot;Source 
-  Container&quot; text field. The image below shows the JET Settings properties 
-  page of the Project Properties dialog. </p>
-
-<p><img src="images/img005.gif" alt="Add source container folder"/></p>
-
-<p> <em><img src="images/tip.gif" width="62" height="13" alt="Tip: "/>Note: you can specify 
-  multiple folders in the Template Containers field, separated by a space or a 
-  semicolon. However, if templates in different folders have the same filename, 
-  only the template in the first folder will be translated automatically by the 
-  JET Builder. If you want all templates to be translated, make sure they have 
-  different file names.</em></p>
-
-<h4> Step 4. Create a JET Template File </h4>
-
-<p> The JET builder will now translate all templates to Java source files in the 
-  <i>src</i> folder of the project.</p>
-  
-<p>  First, to avoid build problems, turn off automatic builds. From the Project menu, uncheck &quot;Build Automatically&quot;.</p>
-
-  <p><img src="images/img006.gif" alt="Project menu showing Build All and Build Automatically items"/></p>
-
-  Now we create our first template. From the 
-  workbench menu, select File &gt; New &gt; File to bring up the New File wizard. 
-  Select the <i>templates</i> directory as the parent folder, and call the file 
-  <i>helloworld.txtjet</i>.
-  
-<p><img src="images/img007.gif" alt="Create empty helloworld.txtjet file"/></p>
-
-<p>
-  With &quot;Build Automatically&quot; disabled, you will <em>not</em> get the following error when you press the 
-  Finish button: &quot;The 'jet' directive is missing in 'helloworld.txtjet' at line 
-  1 column 1&quot;, as shown in the image below.</p>
-
-<p><img src="images/img008.gif" alt="Error running JetBuilder on empty .txtjet file"/></p>
-
-<p> With automatic builds enabled, you will get the above error message. Fortunately, this does not mean that there is a real problem, just that the 
-  JET Builder tried to translate our template as soon as we created it, and discovered 
-  that it is still empty. Press OK to close the error dialog. Open the <i>helloworld.txtjet</i> file 
-  if it is not opened and type or cut-and-paste the following contents in the editor. </p>
-<pre>
- <span class="highlight">&lt;%@ jet package=&quot;hello&quot; class=&quot;HelloWorldTemplate&quot; %&gt;</span>
-
- Hello, world!</pre>
-<p> When you save the template file, it will automatically be translated by the 
-  JET Builder if you have 'Build Automatically' checked. If not, select &quot;Build Project&quot; from the Project menu.</p>
-  
-<p>Because we specified package <i>hello</i> and class <i>HelloWorldTemplate</i> 
-  in the first line of the template, the builder creates a <i>hello</i> package 
-  in the <i>src</i> folder and saves a Java file <i>HelloWorldTemplate.java</i> 
-  in this package, as shown in the image below.</p>
-
-<p> <img src="images/img009.gif" alt="Package hello now contains class file HelloWorldTemplate.java" /> 
-</p>
-<p> This Java class is the result of translating the template and is called a 
-  <dfn>template implementation class</dfn>. This class has a method called <tt class="code">generate</tt>. 
-  This is the method that generates the code indicated in the template.</p>
-<p><img src="images/tryit.gif" width="61" height="13" alt="Try it!"/>We can create an instance 
-  of the <tt class="code">HelloWorldTemplate</tt> template implementation class and invoke 
-  its <tt class="code">generate</tt> method like this: </p>
-
-<p>To implement the above, create a new Class called HelloWorldImpl. Right-click on package hello in the Package Explorer or Hierarchy 
-  view and select New &gt; Class.</p>
-
-<p><img src="images/img010.gif" alt="Create new Class"/> </p>
-
-<p> Name the class "HelloWorldImpl" and ensure that the public static void main(String[] args) stub is checked.</p>
-
-<p><img src="images/img011.gif" alt="Create new Class HelloWorldImpl with main method stub"/> </p>
-
-<p>Now copy the following code into the main() method:</p>
-
-<pre> HelloWorldTemplate helloworld = new HelloWorldTemplate();
- String result = helloworld.generate(null);
- System.out.println(result);
-</pre>
-
-<p><img src="images/img012.gif" alt="Class HelloWorldImpl with sample main method"/> </p>
-
-<p> To run it, select "Run As/Java Application" from the "Run" toolbar drop-down. You should see the words &quot;Hello, world!&quot; printed to the console.</p>
-<h3> Passing Arguments to the Template </h3>
-<p>To recap, we just created our first template and generated some code with it. 
-  The result may not have been very impressive, but now we are all set up and 
-  we can start to explore what JET can do for you. The next step is to pass an 
-  argument to the template. </p>
-<p><img src="images/tryit.gif" width="61" height="13" alt="Try it!"/>Add a new JET template file 
-  or change the existing one to the following content: </p>
-<pre>
-
- <span class="highlight">&lt;%@ jet package=&quot;hello&quot; class=&quot;GreetingTemplate&quot; %&gt;</span>
- Hello, <span class="highlight">&lt;%=argument%&gt;</span>!
-</pre>
-<p> The JET Builder will translate this template to a class <tt class="code">GreetingTemplate</tt> 
-  in the <tt class="code">hello</tt> package. Again we create an instance of this template 
-  class (or change the existing HelloWorldImpl), but this time we pass a string argument to the <tt class="code">generate</tt> method: 
-
-</p>
-<pre> GreetingTemplate sayHello = new GreetingTemplate();
- String result = sayHello.generate(&quot;Tutorial Reader&quot;);
- System.out.println(result);
-</pre>
-<p>
-The code above will print the words &quot;Hello, Tutorial Reader!&quot; to the 
-console. 
-</p>
-<h3> Importing Packages </h3>
-<p>The argument you pass to a template can be any object. In the previous example 
-  we passed a string as the argument to the generate method, but in your application 
-  you probably want to pass in your own model object. If the argument is not in 
-  the <tt class="code">java.lang</tt> package, or if your template uses any other classes not 
-  in the <tt class="code">java.lang</tt> package, you need to import these classes in the template 
-  <tt class="code">jet</tt> directive. A <tt class="code">jet</tt> directive with an <img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/><i>imports</i> 
-  attribute looks like this: </p>
-
-<pre>
- &lt;%@ jet package=&quot;hello&quot; <strong><img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/>imports=&quot;java.util.*&quot;</strong> class=&quot;ImportDemoTemplate&quot; %&gt;
-</pre>
-<p> The JET Syntax Reference section of this article gives more details on the 
-  <tt class="code">jet</tt> directive and its attributes.</p>
-
-<p> In the next example we will create a template that generates XML code. To 
-  stick to the EMF convention of appending &quot;jet&quot; to whatever the file 
-  extension of the generated code would be, we will save this template to a file 
-  called <i>importdemo.xmljet</i>. Note that we pass the template a <tt class="code">java.util.List</tt> 
-  object that contains the data to use when generating the XML.</p>
-<pre>
-   <span class="highlight">&lt;%@ jet package=&quot;hello&quot; <img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/><strong>imports=&quot;java.util.*&quot;</strong> class=&quot;XMLDemoTemplate&quot; %&gt;</span>
-
-<span><img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/></span><strong class="highlight">&lt;% List&lt;?&gt; elementList = (List&lt;?&gt;) argument; %&gt;</strong>
-   &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-   &lt;demo&gt;
-   <span class="highlight">&lt;% for (Iterator&lt;?&gt; i = elementList.iterator(); i.hasNext(); ) { %&gt;</span>
-     &lt;element&gt;<span class="highlight">&lt;%=i.next().toString()%&gt;</span>&lt;/element&gt;
-   <span class="highlight">&lt;% } %&gt;</span>
-   &lt;/demo&gt;
-</pre>
-<p> The code below shows how to invoke the template instance. We create a <img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/>list 
-  and <img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/>pass it to the <tt class="code">generate</tt> 
-  method of the template implementation class:</p>
-
-<pre>package hello;
-
-import java.util.ArrayList;
-
-public class XMLDemoImpl {
-  public static void main(String[] args) {
-    <span><img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/></span>List&lt;String&gt; data = new ArrayList&lt;String&gt;();
-    data.add(&quot;first&quot;);
-    data.add(&quot;second&quot;);
-    data.add(&quot;third&quot;);
-
-    XMLDemoTemplate generateXml = new XMLDemoTemplate();
-    String result = generateXml.generate(<span><img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/></span>data);
-    System.out.println(result);
-  }
-}</pre>
-<p>
-This prints the following XML result to the console: 
-</p>
-<pre>
- &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
- &lt;demo&gt;
-   &lt;element&gt;first&lt;/element&gt;
-   &lt;element&gt;second&lt;/element&gt;
-   &lt;element&gt;third&lt;/element&gt;
- &lt;/demo&gt;
-</pre>
-<p> This is a very simple example that creates very simple XML. Of course you 
-  can use JET to create more complex XML, using attributes and namespaces. When 
-  you do this, you may find it more convenient to create a special class that 
-  is a better model of an XML document than a <tt class="code">java.util.ArrayList</tt>. Generally, 
-  the more complex your JET template becomes, the more logic you will want to 
-  push into the model object that you pass to the template, to keep your templates 
-  readable. We will explore this further in Part 2 of this tutorial. </p>
-<h3> Changing Tags </h3>
-<p>A neat feature of JET is that you can change the tags that mark scriptlets 
-  in the template file. This is very convenient when the syntax of the code you 
-  generate is very similar to the default JET syntax, for example if you use JET 
-  to generate JSP pages. </p>
-<p>In the next example we will use JET to generate a simple JSP page. We will 
-  change the JET tags to use the &quot;&lt;$&quot; character sequence to start 
-  a template tag, and &quot;$&gt;&quot; to end a template tag. The template still 
-  contains &quot;&lt;%&quot; and &quot;%&gt;&quot; strings, but the JET engine 
-  will not see them as special anymore, and they will be written to the result 
-  like any other character sequence.</p>
-
-<p></p>
-<p> <img src="images/tryit.gif" width="61" height="13" alt="Try it!"/>To change the tag markers, 
-  add a <i><img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/>startTag</i> and 
-  an <i><img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/>endTag</i> attribute 
-  to the JET directive on the first line of the template, like in the example 
-  below. </p>
-<pre>
- <span class="highlight">&lt;%@ jet package=&quot;tags.demo&quot; class=&quot;JspTemplate&quot; <img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/><strong>startTag=&quot;&lt;$&quot; <img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/>endTag=&quot;$&gt;&quot;</strong> %&gt;</span>
-
- <strong><span class="highlight">&lt;$</span></strong><span class="highlight"> String paramName = (String) argument; /* This is an executed scriptlet */ <strong>$&gt;</strong></span>
- <strong><span class="highlight">&lt;$</span></strong><span class="highlight"> if (paramName != null) { <strong>$&gt;</strong></span>
- <span><img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/></span>  &lt;%= request.getParameter(&quot;<strong><span class="highlight">&lt;$=</span></strong><span class="highlight">paramName<strong>$&gt;</strong></span>&quot;) %&gt; &lt;!-- this is generated JSP --&gt;
-
- <strong><span class="highlight">&lt;$</span></strong><span class="highlight"> } <strong>$&gt;</strong></span>
-</pre>
-<p> Again, we invoke this implementation class with a string argument, like below: 
-</p>
-<pre> System.out.println(new tags.demo.JspTemplate().generate(&quot;button&quot;));
-</pre>
-The following output will appear on the console. Note that the output contains 
-the intact JSP tag: the &quot;&lt;%&quot; and &quot;%&gt;&quot; character strings 
-are not interpreted as a JET scriptlet, but are simply inserted in the generated 
-code. 
-
-<pre>
- <span><img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/></span>  &lt;%= request.getParameter(&quot;button&quot;) %&gt; &lt;!-- this is generated JSP --&gt;
-</pre>
-<h1> Under the Hood </h1>
-<p>In the previous section we have looked at creating JET templates, how to set up 
-the JET Nature to automatically translate templates into Java implementation classes, 
-and how to use these Java implementation classes to generate code. 
-</p>
-<p> In this section we will take a closer look at the Java implementation classes 
-  that are the result of translating a template. We will see why we can use the 
-  implicit objects <tt class="code">argument</tt> and <tt class="code">stringBuffer</tt> in a template, 
-  and also look at customizing the translated implementation class by providing 
-  a custom &quot;skeleton&quot;. </p>
-
-<h3> Translated Templates </h3>
-<p>A JET template is translated to a Java implementation class. There are some 
-  objects in the Java implementation class that can be referenced directly in 
-  the JET template. The following example demonstrates how the implicit objects 
-  <tt class="code">argument</tt> and <tt class="code">stringBuffer</tt> can be used in a template.</p>
-<pre>
- <span class="highlight">&lt;%@ jet package=&quot;hello&quot; class=&quot;TranslationDemoTemplate&quot; %&gt;</span>
-
-<span><img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/></span> Hello, <span class="highlight">&lt;%=<strong>argument</strong>%&gt;</span>!
-<span><img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/></span> <span class="highlight">&lt;% <strong>stringBuffer.append(&quot;Hello again!&quot;);</strong> %&gt;</span>
-</pre>
-<p> The template above is translated to a Java implementation class like below: 
-
-</p>
-<pre>
- package hello;
- 
- public class TranslationDemoTemplate
- {
-   protected static String nl;
-<span><img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/></span> public static synchronized TranslationDemoTemplate create(String lineSeparator)
-   {
-     nl = lineSeparator;
-     TranslationDemoTemplate result = new TranslationDemoTemplate();
-     nl = null;
-     return result;
-   }
-
-   protected final String NL = nl == null ? (System.getProperties().getProperty("line.separator")) : nl;
-   protected final String TEXT_1 = &quot;Hello, &quot;;
-   protected final String TEXT_2 = &quot;!&quot;;
- 
-   public String generate(Object <strong>argument</strong>)
-   {
-     StringBuffer <strong>stringBuffer</strong> = new StringBuffer();
-     stringBuffer.append(TEXT_1);
-<span><img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/></span>  stringBuffer.append(<strong>argument</strong>);
-     stringBuffer.append(TEXT_2);
-
-<span><img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/></span>  <strong>stringBuffer.append(&quot;Hello again!&quot;);</strong>
-     return stringBuffer.toString();
-   }
- }
-</pre>
-<p> Notice that the <tt class="code">generate</tt> method of the Java implementation class 
-  takes an <tt class="code">Object</tt> parameter called <tt class="code">argument</tt>. This is the same 
-  object as the <tt class="code"><img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/>argument</tt> 
-  in the second line of the template. Also, notice how the Java implementation 
-  class uses a <tt class="code">StringBuffer</tt> object to collect the resulting generated 
-  code. This object can be <img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/>referenced 
-  directly in the template by its name <tt class="code">stringBuffer</tt>. </p>
-<p> The static method <tt class="code"><img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/>create</tt> 
-  allows an application to instantiate a <tt class="code">TranslationDemoTemplate</tt> that uses a specific string as 
-  line separator.</p>
-
-<h3> Changing the Skeleton of the Translated Implementation Class </h3>
-<p>The <tt class="code">generate</tt> method of the <tt class="code">TranslationDemoTemplate</tt> class 
-  above is said to be part of the implementation class &quot;skeleton&quot;. The 
-  default skeleton used by the JET engine looks like this: </p>
-<pre>
- public class CLASS
- {
-   public String generate(Object argument)
-   {
-     return &quot;&quot;;
-   }
- }
-
-</pre>
-<p> The skeleton definition looks almost like a normal Java class, except for 
-  the class name. The class name (<tt class="code">CLASS</tt>) will be replaced by the value 
-  of the <i>class</i> attribute in the <tt class="code">jet</tt> directive. Furthermore, the skeleton 
-  definition has the <tt class="code">generate</tt> method that we have seen earlier. By changing 
-  the skeleton you can customize a template implementation class, for example 
-  make it implement an interface, or change any other feature of the class.</p>
-<p> <img src="images/tryit.gif" width="61" height="13" alt="Try it!"/>For example, suppose you 
-  want all your template implementation classes to implement an interface. The 
-  interface could look something like this: </p>
-
-<pre>
- public interface IGenerator {
-     String generate(Object argument);
- }</pre>
-<p>We can tell the JET engine that we want to use a custom skeleton by setting 
-  the <i>skeleton</i> attribute of the <tt class="code">jet</tt> directive on the first line of the 
-  template file. The value of the skeleton attribute is a URI that points to a 
-  file where the custom skeleton definition can be found. </p>
-<p>To try this, first create a new Untitled Text File from the File &gt; New menu or toolbar.</p> 
-
-  <p><img src="images/img013.gif" alt="Create new Untitled Text File from the File - New  menu"/></p>
-
-<p>Open the type or cut-and-paste the following content in it: </p>
-<pre>
- public class CLASS <span><img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/></span>implements IGenerator
- {
-<span><img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/></span>/* (non-javadoc)
-    * @see IGenerator#generate(Object)
-    */
-<span><img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/></span>public String generate(Object argument)
-   {
-     return &quot;&quot;;
-   }
- }
-</pre>
-
-<p>Now save this file as <i>generator.skeleton</i> in the templates 
-  directory, as in the image below.</p>
-  <p><img src="images/img014.gif" alt="Text file generator.skeleton in templates folder"/></p>
-
-<p> This file is our custom skeleton. All templates that use this skeleton will 
-  be translated to classes that implement the <tt class="code">IGenerator</tt> interface. To 
-  use this skeleton, add an attribute <i>skeleton</i> to the <tt class="code">jet</tt> directive of 
-  your template, like this: </p>
-
-<pre>
- <span class="highlight">&lt;%@ jet package=&quot;hello&quot; class=&quot;GreetingTemplate&quot; <strong>skeleton=&quot;generator.skeleton&quot;</strong> %&gt;</span>
- Hello, <span class="highlight">&lt;%=argument%&gt;</span>!
- The current time is <span class="highlight">&lt;%=new java.util.Date()%&gt;</span>.
-
-</pre>
-<p>
-After the JET Builder translates the template, the implementation class looks 
-like this: 
-</p>
-<pre> package hello;
- 
- public class GreetingTemplate <span><img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/></span>implements IGenerator
- {
-   protected final String NL = System.getProperties().getProperty(&quot;line.separator&quot;);
-   protected final String TEXT_1 = &quot;Hello, &quot;;
-   protected final String TEXT_2 = &quot;!&quot; + NL + &quot;The current time is &quot;;
-   protected final String TEXT_3 = &quot;.&quot;;
-   protected final String TEXT_4 = NL;
- 
-
-<span><img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/></span>/* (non-javadoc)
-    * @see IGenerator#generate(Object)
-    */
-<span><img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/></span>public String generate(Object argument)
-   {
-     StringBuffer stringBuffer = new StringBuffer();
-     stringBuffer.append(TEXT_1);
-     stringBuffer.append(argument);
-     stringBuffer.append(TEXT_2);
-     stringBuffer.append(new java.util.Date());
-     stringBuffer.append(TEXT_3);
-     stringBuffer.append(TEXT_4);
-     return stringBuffer.toString();
-   }
- }
-</pre>
-<p>Note that the translated template now <img src="images/tag_1.gif" width="24" height="13" alt="Tag 1"/>implements 
-  the <tt class="code">IGenerator</tt> interface, and the <tt class="code"><img src="images/tag_3.gif" width="24" height="13" alt="Tag 3"/>generate</tt> 
-  method now has <img src="images/tag_2.gif" width="24" height="13" alt="Tag 2"/>the comments 
-  we specified in the <i>generator.skeleton</i> file. This is one example of how 
-  to customize a translated template with a skeleton definition. Skeleton definitions 
-  can also contain extra methods, inner classes, etc. You'll need to experiment 
-  a little to see what else is possible.</p>
-<h1> JET Syntax Reference </h1>
-
-<p>If you have used JSP technology before, the JET syntax will probably look very 
-  familiar to you. The JET syntax is a subset of the JSP syntax, so there may 
-  not be much new here for you.</p>
-<p>This section provides a semi-formal description and reference of the JET syntax. 
-</p>
-<h2><a name="model">The JET Model</a></h2>
-<p>A JET template is translated into a Java implementation class. This implementation 
-  class has a method that can be called to obtain a result string. This method 
-  is usually called <tt class="code">generate</tt> (see also the <i>skeleton</i> attribute 
-  of the <tt class="code">jet</tt> directive). </p>
-
-<p> If no <i>skeleton</i> attribute is specified in the <tt class="code">jet</tt> directive, the Java 
-  implementation class has the following implicit objects, which can be referenced 
-  in the JET template: </p>
-<ul>
-  <li> <strong>stringBuffer</strong> the <tt class="code">java.lang.StringBuffer</tt> object 
-    used to build the result string when the <tt class="code">generate</tt> method is invoked</li>
-
-  <li> <strong>argument</strong> the <tt class="code">java.lang.Object</tt> passed to the <tt class="code">generate</tt> 
-    method</li>
-</ul>
-
-<h2><a name="directives">Directives</a></h2>
-
-<p>Directives are messages to the JET engine. Directives have this syntax: 
-</p><p>
-<i>&lt;%@ directive { attr=&quot;value&quot; }* %&gt;</i> 
-</p><p>
-There may be optional white space after the &quot;&lt;%@&quot; and before &quot;%&gt;&quot;. 
-</p><p>
-Directives affect how a template is translated, but do not produce any output 
-in the generated String when the template is invoked. 
-</p>
-
-<h3> Jet Directive </h3>
-<p>The <tt class="code">jet</tt> directive defines a number of attributes and communicates 
-  these to the JET engine. A JET template file must contain a <tt class="code">jet</tt> directive 
-  on the first line of the file, or the template file cannot be translated. Any 
-  subsequent <tt class="code">jet</tt> directives are ignored. Unrecognized attributes result 
-  in fatal translation errors. </p>
-<p> The following directive indicates that the template should be translated to 
-  a Java implementation class called <i>HelloWorldTemplate.java</i> in package 
-  <i>hello</i>. The implementation class should import the java.io.* and java.util.* 
-  packages. </p>
-
-<pre>
- &lt;%@ jet package=&quot;hello&quot; class=&quot;HelloWorldTemplate&quot; imports=&quot;java.io.* java.util.*&quot; %&gt;</pre>
-<p>The details of the attributes for the <tt class="code">jet</tt> directive are as follows: 
-
-</p>
-<table border="1" cellpadding="3" cellspacing="0">
-  <tr>
-    <th>Attribute</th>
-    <th>Value</th>
-  </tr>
-  <tr>
-    <td valign="top">package</td>
-
-    <td>The package name of the Java implementation class that the template is 
-      translated to. If this attribute is not present, the Java implementation 
-      class is created in the default package.</td>
-  </tr>
-  <tr>
-    <td height="40" valign="top">class</td>
-    <td height="40">The class name of the Java implementation class that the template 
-      is translated to. If not present, the Java implementation class is called 
-      <tt class="code">CLASS</tt>.</td>
-  </tr>
-
-  <tr>
-    <td valign="top">imports</td>
-    <td>A space-separated list of packages and/or classes to import in the Java 
-      template class</td>
-  </tr>
-  <tr>
-    <td valign="top">startTag</td>
-    <td>The string in a JET template that signals the beginning of a scriptlet, 
-      expression, or <tt class="code">include</tt> directive. The default is &quot;&lt;%&quot;. 
-      This attribute, and its cousin <i>endTag</i> can be very convenient when 
-      the syntax of the generated code is similar to the default JET syntax, for 
-      example if you use JET to generate JSP pages.</td>
-
-  </tr>
-  <tr>
-    <td valign="top">endTag</td>
-    <td>The string in a JET template that signals the end of a scriptlet, expression, 
-      or <tt class="code">include</tt> directive. The default is &quot;%&gt;&quot;. See also 
-      <i>startTag</i>.</td>
-
-  </tr>
-  <tr>
-    <td valign="top">skeleton</td>
-    <td>The URI of a file with a skeleton definition of the Java implementation 
-      class that the template is translated to. This URI will be resolved similar 
-      to the way the <i>file</i> attribute value is resolved in an <tt class="code">include</tt> 
-      directive. If no skeleton definition file is specified, the JET engine will 
-      use a default skeleton of the form &quot;<tt class="code">public class CLASS\n{\n public 
-      String generate(Object argument)\n {\n return \&quot;\&quot;;\n }\n}\n</tt>&quot;. 
-      The class name in this skeleton class definition must be <tt class="code">CLASS</tt>.</td>
-
-  </tr>
-  <tr>
-    <td valign="top">nlString</td>
-    <td>The newline string to use in the Java template class. The default is &quot;System.getProperties().getProperty(\&quot;line.separator\&quot;)&quot;</td>
-  </tr>
-</table>
-
-<h3> Include Directive </h3>
-<p>The <tt class="code">include</tt> directive is used to substitute text and/or code at template 
-  translation-time. The <tt class="code">&lt;%@ include file=&quot;urlSpec&quot; %&gt;</tt> 
-  directive inserts the text of the specified resource into the jet template file. 
-  The included file may have JET scripting elements which will also be processed. 
-</p>
-<p> This directive has one single attribute, <i>file</i>. The value of this attribute 
-  is the URI of the location of the file to include. This URI can be either an 
-  absolute path or a relative path. Relative URIs are always interpreted as relative 
-  to the folder of the template that contains the include directive.</p>
-
-<p>Example:</p>
-<p> The following example requests the inclusion, at translation time, of a copyright 
-  file. </p>
-<pre>
- &lt;%@ include file=&quot;copyright.jet&quot; %&gt;
-</pre>
-<p><em><img src="images/tip.gif" width="62" height="13" alt="Tip: "/>Note: JET supports the 
-  notion of overriding template paths. It is possible to configure the JET engine 
-  to use multiple Template Containers. In that case, the first container takes 
-  precedence over the second, the second over the third, and so on. This means 
-  that if template files or include files with the same file name exist in multiple 
-  Template Containers, the file in the first folder will be used, and the other(s) 
-  will be ignored. Clients of a JET-based application can use this mechanism to 
-  provide custom include files that override the original include files without 
-  modifying the templates of the original application.</em><br/>
-</p>
-<h2><a name="scripting">JET Scripting Elements</a></h2>
-
-<p>JET has two scripting language elements: scriptlets and expressions. A scriptlet 
-is a statement fragment, and an expression is a complete Java expression. 
-</p><p>
-Each scripting element has a &quot;&lt;%&quot;-based syntax as follows: </p>
-<pre>
- &lt;% this is a scriptlet %&gt;
- &lt;%= this is an expression %&gt;
-</pre>
-<p>White space is optional after &quot;&lt;%&quot;, and &quot;&lt;%=&quot;, and before 
-
-&quot;%&gt;&quot;. 
-</p><p>
-If you want to use the %&gt; character sequence as literal characters in a scriptlet, 
-rather than to end the scriptlet, you can escape them by typing %\&gt;. Similarly, 
-the &lt;% character sequence can be escaped by using &lt;\%. 
-</p>
-<h3> Scriptlets </h3>
-<p>Scriptlets can contain any valid Java code fragment. </p>
-<p> Scriptlets are executed at template invocation time. Whether or not they produce 
-  any output into the result String depends on the actual code in the scriptlet. 
-  Scriptlets can have side effects, modifying the objects visible in them. </p>
-
-<p> When all scriptlet fragments in a given translation unit are combined in the 
-  order they appear in the JET template, they should yield a valid Java statement 
-  or sequence of statements. </p>
-Example: 
-<pre>
- &lt;% if (Calendar.getInstance().get(Calendar.AM_PM) == Calendar.AM) {%&gt;
- Good Morning
- &lt;% } else { %&gt;
- Good Afternoon
- &lt;% } %&gt;
-</pre>
-
-<h4>Syntax</h4>
-<p> <i>&lt;% scriptlet %&gt;</i> </p>
-<h3> Expressions </h3>
-<p>A JET expression element is a Java expression that is evaluated and the result 
-  is appended to the <tt class="code">StringBuffer</tt> object returned by the <tt class="code">generate</tt> 
-  method. Expressions are evaluated at template invocation time. </p>
-
-<p> If the result of the expression cannot be appended to a <tt class="code">StringBuffer</tt> 
-  then a translation time error occurs. The content of a JET expression must be 
-  a complete Java expression. </p>
-<p> Side-effects in expressions are supported. They take effect when the JET expression 
-  is evaluated. JET expressions are evaluated left-to-right in the JET template.</p>
-<p>In the next example, the current date is appended to the <tt class="code">StringBuffer</tt> 
-  result.</p>
-<pre>&lt;%= (new java.util.Date()).toLocaleString() %&gt; </pre>
-
-<h4>Syntax</h4>
-<p><i>&lt;%= expression %&gt;</i> </p>
-<h2><a name="resources">Resources</a></h2>
-<p><a href="http://www.javaworld.com/javaworld/jw-11-2001/jw-1102-codegen.html" target="_blank">http://www.javaworld.com/javaworld/jw-11-2001/jw-1102-codegen.html</a> 
-</p>
-<p> <a href="http://www.eclipse.org/emf/" target="_blank">http://www.eclipse.org/emf/</a> 
-</p>
-<br />
-</body>
-
-</html>
diff --git a/org.eclipse.emf.doc/tutorials/jet2/JETCTask.java b/org.eclipse.emf.doc/tutorials/jet2/JETCTask.java
deleted file mode 100644
index d59cb89..0000000
--- a/org.eclipse.emf.doc/tutorials/jet2/JETCTask.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package ch.paranor.epla.structure;
-
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.types.FileSet;
-
-import org.eclipse.emf.codegen.jet.JETCompiler;
-import org.eclipse.emf.codegen.jet.JETException;
-import org.eclipse.emf.codegen.jet.JETSkeleton;
-
-
-/**
- * This task compiles JET templates into Java source files using the EMF JET framework.
- */
-public class JETCTask extends Task
-{
-  private File destDir;
-
-  private List<FileSet> filesets = new ArrayList<FileSet>();
-  private List<File> templateFiles = new ArrayList<File>();
-
-  private File templateFile;
-  private String packageName;
-  private String className;
-
-  @Override
-  public void execute() throws BuildException
-  {
-    preCheck();
-
-    // check that filename ends in 'jet'?
-    if (templateFile != null)
-    {
-      templateFiles.add(templateFile);
-    }
-    for (FileSet fs : filesets)
-    {
-      DirectoryScanner ds = fs.getDirectoryScanner(getProject());
-      String[] includedFiles = ds.getIncludedFiles();
-      for (int j = 0; j < includedFiles.length; j++)
-      {
-        templateFiles.add(getProject().resolveFile(includedFiles[j]));
-      }
-    }
-
-    try
-    {
-      compileJETTemplates();
-    }
-    catch (Exception e)
-    {
-      throw new BuildException(e, getLocation());
-    }
-  }
-
-  public void setDestdir(File destDir)
-  {
-    this.destDir = destDir;
-  }
-
-  public void setTemplate(File templateFile)
-  {
-    this.templateFile = templateFile;
-  }
-
-  public void setPackage(String packageName)
-  {
-    this.packageName = packageName;
-  }
-
-  public void setClass(String className)
-  {
-    this.className = className;
-  }
-
-  public void addFileset(FileSet fileset)
-  {
-    filesets.add(fileset);
-  }
-
-  private void preCheck() throws BuildException
-  {
-    assertTrue(destDir != null, "No destination directory specified");
-    assertTrue(destDir.isDirectory(), "Specified destination directory does not exist: " + destDir);
-    assertTrue(templateFile != null || filesets.size() > 0, "No template files specified");
-    if (templateFile != null)
-    {
-      assertTrue(templateFile.isFile(), "Specified template does not exist: " + templateFile);
-    }
-    else
-    {
-      assertTrue(
-        className == null && packageName == null,
-        "Attributes \"class\" and \"package\" can only be used together with attribute \"template\"");
-    }
-  }
-
-  private void compileJETTemplates() throws MalformedURLException, JETException, FileNotFoundException
-  {
-    log("Compiling " + templateFiles.size() + " JET template(s) to " + destDir);
-    for (File template : templateFiles)
-    {
-      compileJETTemplate(template, destDir);
-    }
-  }
-
-  private File compileJETTemplate(File template, File outputDir) throws JETException, FileNotFoundException, MalformedURLException
-  {
-    String templateURI = template.getAbsoluteFile().toURL().toString();
-    JETCompiler jetCompiler = new JETCompiler(templateURI);
-    log("Parsing template " + template, Project.MSG_VERBOSE);
-    jetCompiler.parse();
-
-    // initialize skeleton
-    JETSkeleton skeleton = jetCompiler.getSkeleton();
-    if (skeleton == null)
-    {
-      log("JET directive missing in " + templateFile, Project.MSG_WARN);
-      jetCompiler.handleDirective("jet", null, null, new HashMap<String, String>());
-      skeleton = jetCompiler.getSkeleton();
-    }
-    if (className != null)
-    {
-      skeleton.setClassName(className);
-    }
-    if (packageName != null)
-    {
-      skeleton.setPackageName(packageName);
-    }
-
-    File packageDir = new File(outputDir, skeleton.getPackageName().replace('.', '/'));
-    packageDir.mkdirs();
-    File targetFile = new File(packageDir, skeleton.getClassName() + ".java");
-
-    OutputStream output = new BufferedOutputStream(new FileOutputStream(targetFile));
-    log("Generating java source " + targetFile, Project.MSG_VERBOSE);
-    jetCompiler.generate(output);
-    return targetFile;
-  }
-
-  private void assertTrue(boolean expr, String message) throws BuildException
-  {
-    if (!expr)
-    {
-      throw new BuildException(message, getLocation());
-    }
-  }
-}
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/Idea.jpe b/org.eclipse.emf.doc/tutorials/jet2/images/Idea.jpe
deleted file mode 100644
index 119ce70..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/Idea.jpe and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/default_style.css b/org.eclipse.emf.doc/tutorials/jet2/images/default_style.css
deleted file mode 100644
index f2fe2fa..0000000
--- a/org.eclipse.emf.doc/tutorials/jet2/images/default_style.css
+++ /dev/null
@@ -1,42 +0,0 @@
-P {
-	FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, geneva
-}
-TABLE {
-	FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, geneva
-}
-TD {
-	FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, geneva
-}
-TH {
-	FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, geneva
-}
-PRE {
-	FONT-SIZE: 10pt; FONT-FAMILY: "Courier New", Courier, mono
-}
-H2 {
-	FONT-WEIGHT: bold; FONT-SIZE: 18pt; LINE-HEIGHT: 14px; FONT-FAMILY: arial, helvetica, geneva
-}
-CODE {
-	FONT-SIZE: 10pt; FONT-FAMILY: "Courier New", Courier, mono
-}
-SUP {
-	FONT-SIZE: 10px; FONT-FAMILY: arial,helvetica,geneva
-}
-H3 {
-	FONT-WEIGHT: bold; FONT-SIZE: 14pt; FONT-FAMILY: arial, helvetica, geneva
-}
-LI {
-	FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, geneva
-}
-H1 {
-	FONT-WEIGHT: bold; FONT-SIZE: 28px; FONT-FAMILY: arial, helvetica, geneva
-}
-BODY {
-	MARGIN-TOP: 5mm; FONT-SIZE: 10pt; MARGIN-LEFT: 3mm; FONT-FAMILY: arial, helvetica, geneva
-}
-.indextop {
-	FONT-WEIGHT: bold; FONT-SIZE: x-large; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
-}
-.indexsub {
-	FONT-SIZE: xx-small; COLOR: #8080ff; FONT-FAMILY: Arial, Helvetica, sans-serif
-}
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page1.gif b/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page1.gif
deleted file mode 100644
index 5ce099f..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page1.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page2.gif b/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page2.gif
deleted file mode 100644
index 7e23c22..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page2.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page3.gif b/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page3.gif
deleted file mode 100644
index d221a15..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/enum_gui_page3.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/jetemitter.gif b/org.eclipse.emf.doc/tutorials/jet2/images/jetemitter.gif
deleted file mode 100644
index 4e5c892..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/jetemitter.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/new_creation_wizard.gif b/org.eclipse.emf.doc/tutorials/jet2/images/new_creation_wizard.gif
deleted file mode 100644
index 1022c78..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/new_creation_wizard.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/new_toolbar.gif b/org.eclipse.emf.doc/tutorials/jet2/images/new_toolbar.gif
deleted file mode 100644
index 6e52e3d..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/new_toolbar.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/tag_1.gif b/org.eclipse.emf.doc/tutorials/jet2/images/tag_1.gif
deleted file mode 100644
index 4859d6f..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/tag_1.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/tag_2.gif b/org.eclipse.emf.doc/tutorials/jet2/images/tag_2.gif
deleted file mode 100644
index 5ea43dc..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/tag_2.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/tag_3.gif b/org.eclipse.emf.doc/tutorials/jet2/images/tag_3.gif
deleted file mode 100644
index a69b68e..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/tag_3.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/tag_4.gif b/org.eclipse.emf.doc/tutorials/jet2/images/tag_4.gif
deleted file mode 100644
index a1ad63f..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/tag_4.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/images/win_only.gif b/org.eclipse.emf.doc/tutorials/jet2/images/win_only.gif
deleted file mode 100644
index 895f9ca..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/images/win_only.gif and /dev/null differ
diff --git a/org.eclipse.emf.doc/tutorials/jet2/jet_tutorial2.html b/org.eclipse.emf.doc/tutorials/jet2/jet_tutorial2.html
deleted file mode 100644
index 0f7f5d6..0000000
--- a/org.eclipse.emf.doc/tutorials/jet2/jet_tutorial2.html
+++ /dev/null
@@ -1,1048 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>JET Tutorial Part 2 (Write Code that Writes Code)</title>
-<link rel="stylesheet" href="images/../../../css/book.css" type="text/css" />
-<link rel="stylesheet" href="images/../../../css/emf-book.css" type="text/css" />
-</head>
-
-<body lang="EN-US" xml:lang="EN-US">
-
-<div align="right">&nbsp; &copy; 
-  Copyright <a href="http://www.azzurri.jp">Azzurri Ltd.</a> 2003, 2004. All rights 
-  reserved
-  <table border="0" cellspacing="0" cellpadding="2" width="100%">
-
-    <tr> 
-      <td align="left" valign="top" colspan="2" bgcolor="#0080C0"><strong><font face="Arial,Helvetica"><font color="#FFFFFF">&nbsp;Eclipse 
-        Corner Article</font></font></strong></td>
-    </tr>
-  </table>
-</div>
-<div align="left"> 
-  <h1><img src="http://www.eclipse.org/images/Idea.jpg" align="middle" width="120" height="86" alt=""/></h1>
-</div>
-
-<h1 align="center">JET Tutorial Part 2 (Write Code that Writes Code)</h1>
-
-<blockquote>
-<strong>Summary</strong>
-
-<br/>
-<p>In Part 2 of this JET (Java Emitter Templates) tutorial, we will take a look 
-  at the JET engine API. You will learn how to write plug-ins that use the classes 
-  in the JET package to generate Java source code.</p>
-  <p>As a real-world example, we will create a plug-in that takes user input and 
-    generates a Typesafe Enumeration class. The generated source code is based 
-    on a JET template that can be distributed with the plug-in, allowing users 
-    of the plug-in to customize the generated code by editing the template.</p>
-<p>This article also provides a short reference to the JET API.</p>
-  <p>Contributed by Remko Popma, Azzurri Ltd., remko.popma at azzurri dot jp, August 26, 2003. Used with permission. Last update: January 3rd, 2007.</p>
-
-</blockquote>
-
-<hr width="100%"/>
-
-<h2>Contents</h2>
-<p><a href="#introduction">Introduction</a><br/>
-<a href="#classes">Some JET Classes</a><br/>
-<a href="#example">A Plug-in that Generates Source Code</a><br/>
-<a href="#conclusion">Conclusion</a><br/>
-<a href="#appendix">Appendix</a><br/>
-<a href="#resources">Resources</a></p>
-
-
-<h2><a name="introduction">Introduction</a></h2>
-<center>
-  <table border="1" cellspacing="0" width="80%" cellpadding="3">
-    <tbody> 
-    <tr> 
-    <td> 
-      <p><strong>Translation vs. Generation</strong></p>
-        <p>An aspect of JET templates that is at first confusing is that generating 
-          text takes two steps: translation and generation. The first step is 
-          translating the template to a template implementation class. The second 
-          step is using this template implementation class to generate the text. 
-        </p>
-      <p>If your goal with JET is to generate Java source code, it can be confusing 
-        that the template translation step also results in Java source code. Remember 
-        that this source code is <em>not</em> the generated text. The source code 
-        that is the result of the translation step is simply another form of the 
-        template. </p>
-
-        <p>If you have used JSP and servlets before, you can think of a JET template 
-          as being equivalent to a JSP page. A JET template is translated to a 
-          template implementation class, just like a JSP page is translated to 
-          a servlet. The second step, where the template implementation class 
-          generates text, is equivalent to the servlet creating and returning 
-          HTML.</p>
-    </td>
-  </tr>
-  </tbody> 
-</table>
-</center>
-  
-<p><a href="../../tutorials/jet1/jet_tutorial1.html">Part 
-  1</a> of this tutorial introduced JET templates and explained how you can convert 
-  a project to a JET project to have the JET Builder automatically 
-  translate templates in your project to template implementation classes. </p>
-<p>In part 2 of this tutorial, we will focus on writing a plug-in that uses the 
-  classes in the JET package to generate Java source code. A plug-in that generates 
-  text from a JET template can no longer rely on the JET Nature and JET Builder 
-  to automatically translate templates. This is because JET Nature and JET Builder 
-  operate only on workspace projects, not on plug-ins. Plug-ins need to use the 
-  classes in the JET package to translate their templates. </p>
-
-<p>To run the example or view the source for code for this article you can unzip 
-  <a href="images/../org.eclipse.emf.examples.jet.article2_2.3.0.zip">org.eclipse.emf.examples.jet.article2_2.3.0.zip</a> 
-  into your <i>plugins</i> subdirectory. To use the example plug-in, you must 
-  have <a href="http://www.eclipse.org/emf/" target="_blank">EMF</a> installed. 
-  I am using version 2.3.0 M4.</p>
-
-<p>The next section will discuss some of the classes in the <tt class="code">org.eclipse.emf.codegen</tt> 
-  package. We will see what the steps are to generate source code with JET, and 
-  how the JET engine classes fit in. If you are anxious to see some code that 
-  shows how to use these classes in practice, you can go straight to <a href="#example">A 
-  Plug-in that Generates Source Code</a>. </p>
-
-<h2><a name="classes">Some JET Classes</a></h2>
-<p>In this section, we will take a closer look at some of the classes in the JET 
-  package. They can roughly be divided into two groups: </p>
-<ul>
-  <li>Lower-level classes dealing with the nuts and bolts of translating a template 
-    to a template implementation class. The <tt class="code">JETCompiler</tt> class brings 
-    all these lower-level classes together to provide a single API for template 
-    translation. </li>
-
-  <li>Higher-level classes that build on top of <tt class="code">JETCompiler</tt> to accomplish 
-    user tasks. In Part 1 of this tutorial, we have already seen <tt class="code">JETNature</tt> 
-    and <tt class="code">JETBuilder</tt> at work. Other high-level classes are <tt class="code">CodeGen</tt> 
-    and <tt class="code">JETEmitter</tt>. </li>
-
-</ul>
-<p>The lower-level classes are not discussed in-depth in this article. For a description 
-  of all classes in the <tt class="code">org.eclipse.emf.codegen</tt> plug-in, see the <a href="#jet_api_overview">JET 
-  API Overview</a> section below. In the rest of this section, we will focus on 
-  a few of the higher-level classes.</p>
-<h4><tt class="code">org.eclipse.emf.codegen.jet.JETCompiler</tt></h4>
-<p><tt class="code">JETCompiler</tt> is the core class for template translation. This class 
-  is responsible for translating templates to the Java source code of a template 
-  implementation class. The actual translation is delegated to other classes in 
-  the same package. Clients create a JETCompiler object for a particular template 
-  and then call the <tt class="code">parse</tt> method followed by the <tt class="code">generate</tt> 
-  method to write the Java source code for the resulting template implementation 
-  class to a specified stream.</p>
-
-<h4><tt class="code">org.eclipse.emf.codegen.jet.JETEmitter</tt></h4>
-<p><tt class="code">JETEmitter</tt> provides a convenient high-level API for users of the 
-  JET package. The <tt class="code">generate</tt> method of this class combines template 
-  translation and text generation into a single step. By taking care of the gory 
-  details of translating templates and compiling the Java source code of the translated 
-  template implementation class, <tt class="code">JETEmitter</tt> lets you focus on the final generator 
-  output.</p>
-<p>Another way of looking at <tt class="code">JETEmitter</tt> is that it abstracts away the translation 
-  step and lets you pretend that you can directly generate text with a template. 
-  Following the <a href="http://www.joelonsoftware.com/articles/LeakyAbstractions.html" target="_blank">Law 
-  of Leaky Abstractions</a>, we cannot always get away with this, and the <a href="#jetemitter_gotchas"><tt class="code">JETEmitter</tt> 
-  Gotchas</a> section below points to a few places where you have to be careful.</p>
-<p><tt class="code">JETEmitter</tt> is the class we will be using in our plug-in, so we will go into 
-  a little more detail here.</p>
-
-<p>A <tt class="code">JETEmitter</tt> object is constructed with the uri of the template used to generate 
-  text. Any type of uri is acceptable as long as a protocol handler is available. 
-  This means that <tt class="code">file:/</tt> uris, <tt class="code">ftp:/</tt> uris and <tt class="code">http:/</tt> 
-  uris can all be used. Eclipse adds special protocol handlers for <tt class="code">platform:/base</tt>/, 
-  <tt class="code">platform:/plugin/</tt>, <tt class="code">platform:/fragment/</tt> and <tt class="code">platform:/resource/</tt> 
-  uris, so plug-ins can use a uri like <tt class="code">platform:/resource/myproject/myfolder/mytemplate.jet</tt> 
-  to specify a template file.  Note: Eclipse 3.0 has introduced <tt class="code">bundleentry</tt> to its list
-  of special protocols.  It should be used in references to Eclipse elements such as plug-ins and features.</p>
-
-<p>In our example plug-in, we will distribute our template file together with our 
-  plug-in, so the template file will be located in a <i>myplugin/templates</i> 
-  folder under the Eclipse <i>plugins</i> folder. The following code can then 
-  be used to locate and generate a template from this folder:</p>
-<pre> String pluginId = "myplugin.id";
- String base = Platform.getBundle(pluginId).getEntry("/").toString();
- String uri = base + "templates/myTemplate.javajet";
- <tt class="code">JETEmitter</tt> emitter = new JETEmitter(uri);
- String generatedText = emitter.generate(new Object[] {parameter});</pre>
-<p>After constructing a <tt class="code">JETEmitter</tt> object, clients then call <tt class="code">generate</tt> 
-  on it to generate text. The <tt class="code">generate</tt> method will perform the following 
-  steps:</p>
-
-<ol>
-  <li>Create a project called <i>.JETEmitters</i> in the workspace </li>
-  <li>Prepare this project by giving it the Java Nature and adding class path variables 
-    to its class path </li>
-  <li>Translate the template to a template implementation Java source file in 
-    the <i>.JETEmitters</i> project </li>
-  <li>Build the project to compile the template implementation source code to 
-    a Java <i>.class</i> file </li>
-  <li>Call the <tt class="code">generate</tt> method on the translated Java template implementation 
-    class and return the generated text as a String</li>
-</ol>
-<p>* <i>.JETEmitters</i> is the default name for the project that is created during the template
-translation.  This value can be changed by the <tt class="code">setProjectName</tt> method.</p>
-
-
-<p>Our example plug-in will use <tt class="code">JETEmitter</tt> and save the generated text to a Java 
-  source file in the workspace. The figure below shows the steps for generating 
-  source code using <tt class="code">JETEmitter</tt>. </p>
-<p><img alt="Using JETEmitter to generate text from a plug-in" src="images/jetemitter.gif"/> </p>
-<h3><a name="jetemitter_gotchas"></a><tt>JETEmitter</tt> Gotchas</h3>
-<p>The <tt class="code">JETEmitter</tt> class combines template translation and text generation into 
-  a single step, which makes it a very convenient tool. However, it is important 
-  that you know what takes place under the hood, otherwise you might be in for 
-  some nasty surprises. This section highlights some &quot;gotchas&quot; that 
-  I ran into, so that you don't make the same mistakes.</p>
-
-<h4>1. Plug-in Initialization Required </h4>
-<p>It is not easy to use JET outside of Eclipse. JET is designed to run only as 
-  a workspace application. Any application using JET must minimally run as an 
-  Eclipse &quot;headless&quot; application so that plug-in initialization takes 
-  place. (The term headless refers to running Eclipse without the user interface.)</p>
-<p>This means that using <tt class="code">JETEmitter</tt> from a simple standalone application (a standard 
-  Java class with a <tt class="code">main</tt> method) <em>will not work</em>:</p>
-<pre> // This fails: cannot use <tt class="code">JETEmitter</tt> from a standalone application
- public static void main(String[] args) {
-     <tt class="code">JETEmitter</tt> emitter = new JETEmitter("/myproject/templates/HelloWorld.txtjet");
- 
-     // this will throw a NullPointerException
-     String result = emitter.generate(new NullProgressMonitor(), {"hi" });
- 
-     System.out.println(result);
-</pre>
-
-<p>Note that this is not a restriction of just the <tt class="code">JETEmitter</tt> class, many of the 
-  classes in the <tt class="code">org.eclipse.emf.codegen</tt> plug-in have dependencies 
-  on other plug-ins. The <a href="#appendix">Appendix</a> section below has more 
-  details on using JET from standalone applications.</p>
-<p>In the rest of this article we will assume that our code is running from inside 
-  a plug-in.</p>
-<h4>2. Class Loader Issues </h4>
-<p>You may get a NoClassDefFoundError when you pass a custom object as the argument 
-  to the <tt class="code">JETEmitter.generate</tt> method. This can happen if the object 
-  you pass as the argument is not one of the java "bootstrap" classes (the bootstrap 
-  classes are the runtime classes in rt.jar and internationalization classes in 
-  i18n.jar).</p>
-
-<p>To prevent this error you must specify the class loader of your plug-in when 
-  using <tt class="code">JETEmitter</tt>. If no class loader is specified, <tt class="code">JETEmitter</tt> uses the class loader 
-  of its own class, which is usually the class loader for the <tt class="code">org.eclipse.emf.codegen</tt> 
-  plug-in, and this class loader can't see much. In recent versions of EMF (since 
-  version 1.1.0 build 20030527_0913VL), <tt class="code">JETEmitter</tt> has a constructor that takes 
-  a class loader argument.</p>
-<p>Note that another way to specify a class loader is to subclass <tt class="code">JETEmitter</tt> in 
-  your own project; if no class loader is specified, <tt class="code">JETEmitter</tt> will use the class loader 
-  of this subclass. (If you are using an older version of EMF, there are no constructors 
-  that take a class loader argument and you will have no choice but to subclass 
-  <tt class="code">JETEmitter</tt> in your own project.)</p>
-<p>The example below shows an action class that translates and invokes a selected 
-  template using <tt class="code">JETEmitter</tt>. The example shows how a <tt class="code">JETEmitter</tt> can be constructed 
-  <img src="images/tag_1.gif" width="24" height="13" alt=""/>with a class loader parameter or by <img src="images/tag_2.gif" width="24" height="13" alt=""/>constructing 
-  an anonymous subclass.</p>
-<pre>package org.eclipse.emf.examples.jet.article2.actionexample;
-// imports omitted
-public class EmitAction implements IActionDelegate {
-    protected ISelection selection;
- 
-    public void selectionChanged(IAction action, ISelection selection) {
-        this.selection = selection;
-        action.setEnabled(true);
-    }
- 
-    public void run(IAction action) {
-        List&lt;?&gt; files = (selection instanceof IStructuredSelection)
-                ? ((IStructuredSelection) selection).toList()
-                : Collections.EMPTY_LIST;
-                
-        for (Iterator&lt;?&gt; i = files.iterator(); i.hasNext();) {
-            IFile file = (IFile) i.next();
-            IPath fullPath = file.getFullPath();
- 
-            String templateURI = "platform:/resource" + fullPath;
-            <strong>ClassLoader classloader = getClass().getClassLoader();</strong>
-<span><img src="images/tag_1.gif" width="24" height="13" alt=""/></span>         <tt class="code">JETEmitter</tt> emitter = new JETEmitter(templateURI, <strong>classloader</strong>);
- 
-            // <strong>or: use an anonymous subclass</strong>
-
-<span><img src="images/tag_2.gif" width="24" height="13" alt=""/></span>         // emitter = <strong>new JETEmitter(templateURI) {}</strong>; // notice the brackets
-            
-            try {
-                IProgressMonitor monitor = new NullProgressMonitor();
-                String[] arguments = new String[] { "hi" };
- 
-                String result = emitter.generate(monitor, arguments);
-                
-                saveGenerated(result, file);
- 
-            } catch (Exception e) {
-                throw new RuntimeException(e);
-            }
-        }
-    }
- 
-    // saveGenerated method omitted
-}
-</pre>
-<h4>3. Classpath Issues </h4>
-<p>JETEmitter translates your templates to Java source files in the <i>.JETEmitters</i> 
-  project, and invokes the JavaBuilder to compile these source files. If your 
-  templates use classes that are not standard Java classes, or not in the EMF 
-  plug-in, you will need to add these classes to the class path of the <i>.JETEmitters</i> 
-  project, or the JavaBuilder cannot compile the template implementation source 
-  files.  Fortunately, <tt class="code">JETEmitter</tt> provides a simple way to do this through the method 
-  <tt class="code">addVariable</tt> which adds a classpath variable to the <i>.JETEmitter</i> project.</p>
-<p>A <dfn>Classpath Variable</dfn> is a workspace-wide name that is used in Eclipse to refer to a JAR file or
-directory.  The list of all such variables can be seen using the Window &gt; Preferences &gt; Java &gt; 
-Classpath Variables menua action.. Your program will need to add a class path variable for each
-  JAR file or directory that is needed on the class path of the <i>.JETEmitter</i> project.</p>
-  
-  
-<h2><a name="example">A Plug-in that Generates Source Code</a></h2>
-<p>In this part of the JET Tutorial, we will write an Eclipse plug-in that uses 
-  a JET template to generate Java source code for typesafe enumerations, which were quite popular 
-  before Java 5.0, when enums were introduced to the language.</p>
-<p>Our plug-in has to perform the following tasks:</p>
-<ol>
-  <li>Collect user input values for the variables in our template: the class name, 
-    the type and name of the attributes of the typesafe enumeration class, and 
-    the values of these attributes for each instance. We will write a simple GUI 
-    to collect these values.</li>
-  <li>Translate the JET template file to a Java template implementation class</li>
-
-  <li>Invoke the template implementation class with an object that contains the 
-    user input values collected by the GUI</li>
-  <li>Save the resulting generated source code to a location obtained from the 
-    GUI</li>
-</ol>
-<p>In the following sections we will go through the steps above one by one.</p>
-<h3><a name="typesafe_enum_example"></a>Typesafe Enumerations</h3>
-<p>Let's have a look at a typesafe enumeration class to see what kind of source 
-  code we want to generate. The Digit class below is an example typesafe enum.</p>
-<pre> // an example typesafe enum
- package x.y.z;
- public class Digit { 
-<span><img src="images/tag_1.gif" width="24" height="13" alt=""/></span>  public static final Digit ZERO = new Digit(0, "zero");
-     public static final Digit ONE = new Digit(1, "one");
-     public static final Digit TWO = new Digit(2, "two");
-     public static final Digit THREE = new Digit(3, "three");
-     // ...
-     public static final Digit NINE = new Digit(9, "nine");
- 
-     private static final Digit[] ALL = 
-         {ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE};
- 
-
-<span><img src="images/tag_2.gif" width="24" height="13" alt=""/></span>  private final int value;
-     private final String name;
- 
-     private Digit(int value, String name) { 
-         this.value = value; 
-         this.name = name; 
-     }
- 
-<span><img src="images/tag_3.gif" width="24" height="13" alt=""/></span>  public static Digit lookup(int key) {
-         for (int i = 0; i &lt; ALL.length; i++) {
-             if (key == ALL[i].getValue()) { return ALL[i]; }
-         }
-         // lookup failed:
-         // we have no default Digit, so we throw an exception
-<span><img src="images/tag_4.gif" width="24" height="13" alt=""/></span>      throw new IllegalArgumentException("No digit exists for " + key);
-     }
- 
-     public int getValue() { return value; }
-     public int getName() { return name; }
-     public String toString() { return getName(); }
- }</pre>
-<p>Let's take a closer look at this class. First of all, the Digit class has several 
-  <strong><img src="images/tag_1.gif" width="24" height="13" alt=""/>instances</strong> - the constants 
-  ZERO, ONE, TWO, etc. Each instance is defined by its Java variable name, "ZERO", 
-  "ONE", "TWO"..., and the values for each <strong><img src="images/tag_2.gif" width="24" height="13" alt=""/>attribute</strong> 
-  of the enumeration class. Most typesafe enums have one or more attributes. The 
-  Digit class has two attributes: a <tt class="code">value</tt> integer and a <tt class="code">name</tt> 
-  String.</p>
-
-<p>Our example Digit class also has a <strong><img src="images/tag_3.gif" width="24" height="13" alt=""/><tt class="code">lookup</tt></strong> 
-  method, which returns the instance whose <tt class="code">value</tt> attribute equals 
-  the specified int parameter. A lookup method introduces the concept of <dfn>key 
-  attributes</dfn>. Many typesafe enums have one or more attributes that uniquely 
-  distinguish one instance from another.</p>
-<p><em>Note that key attributes are not required: the Java VM guarantees that every 
-  newly constructed object is unique, so it is possible to have typesafe enumerations 
-  that have no attributes at all, and simply distinguish their instances with 
-  the == instance identity operator. This works fine, but often it is convenient 
-  to have a key attribute that uniquely identifies an instance, and a <tt class="code">lookup</tt> 
-  method that finds an instance for a specified key value.</em></p>
-
-<p>Our template does have a <tt class="code">lookup</tt> method, so we need to decide what 
-  to do if <img src="images/tag_4.gif" width="24" height="13" alt=""/>no instance is found 
-  for the specified key value. Basically there are three options: throwing an 
-  Exception, returning a designated &quot;default&quot; instance, or returning 
-  <tt class="code">null</tt>. Which option is best depends on the application in which 
-  the class is used, so we should probably let the user decide.</p>
-<p>Now that we've studied typesafe enums in more detail, let's summarize what 
-  is customizable in a typesafe enumeration:</p>
-<ul>
-  <li>package name </li>
-  <li>class name </li>
-
-  <li>attributes, where each attribute
-  <ul>
-    <li>has a type </li>
-    <li>has a name </li>
-    <li>may be a key attribute </li>
-  </ul></li>
-  <li>instances, where each instance
-
-  <ul>
-    <li>has a name </li>
-    <li>has a value for every attribute </li>
-    <li>may be the default instance to return for failed lookups</li>
-  </ul></li>
-</ul>
-<h3><a name="typesafe_enum_model"></a>A Simple Typesafe Enumeration Model </h3>
-<p>A simple model for the customizable parts of a typesafe enum could look something 
-  like this:</p>
-<p></p>
-
-<table border="1" cellspacing="0">
-  <tbody> 
-  <tr> 
-    <td><tt class="code">TypesafeEnum</tt></td>
-  </tr>
-  <tr> 
-    <td><tt class="code">getInstances() : Instance[]<br/>
-      getAttributes() : Attribute[]<br/>
-      getKeyAttributes() : Attribute[]<br/>
-
-      getDefaultInstance() : Instance<br/>
-      getPackageName() : String<br/>
-      getClassName() : String</tt></td>
-  </tr>
-  </tbody> 
-</table>
-<p></p>
-<table border="1" cellspacing="0">
-  <tbody> 
-  <tr> 
-    <td><tt class="code">Instance</tt></td>
-
-  </tr>
-  <tr> 
-    <td><tt class="code"> getName() : String<br/>
-      getAttributeValues() : Properties<br/>
-      getAttributeValue(Attribute) : String<br/>
-      isDefault() : boolean</tt></td>
-  </tr>
-
-  </tbody> 
-</table>
-<p></p>
-<table border="1" cellspacing="0">
-  <tbody> 
-  <tr> 
-    <td><tt class="code">Attribute</tt></td>
-  </tr>
-  <tr> 
-    <td><tt class="code"> getName() : String<br/>
-
-      getType() : String<br/>
-      isKey() : boolean</tt></td>
-  </tr>
-  </tbody> 
-</table>
-<p></p>
-<p>In the next section we will use these classes to convert our Digit class to 
-  a JET template for typesafe enumerations.</p>
-<h3><a name="typesafe_enum_template"></a>A Typesafe Enumeration Template </h3>
-<p>Now that we have a model, we can take our Digit class and replace all Digit-specific 
-  code with JET scriptlets and expressions that call our model classes. The resulting 
-  template could look something like this:</p>
-
-<pre> <span class="highlight"><span class="highlight">&lt;%@ jet package="translated" imports="java.util.* org.eclipse.emf.examples.jet.article2.model.*" class="TypeSafeEnumeration" %&gt;</span></span>
- <span class="highlight"><span class="highlight">&lt;% TypesafeEnum typesafeEnum = (TypesafeEnum) argument; %&gt;</span></span>
- package <span class="highlight">&lt;%=typesafeEnum.getPackageName()%&gt;</span>;
- 
- /**
-  * This final class implements a type-safe enumeration
-  * over the valid instances of a <span class="highlight">&lt;%=typesafeEnum.getClassName()%&gt;</span>.
-  * Instances of this class are immutable.
-  */
- public final class <span class="highlight">&lt;%=typesafeEnum.getClassName()%&gt;</span> {
- 
- <span class="highlight">&lt;% for (Iterator&lt;Instance&gt; i = typesafeEnum.instances(); i.hasNext(); ) { %&gt;</span>
-
- <span class="highlight">&lt;%     Instance instance = i.next(); %&gt;</span>
- 
-     // <strong>instance definition</strong>
-     public static final <span class="highlight">&lt;%=typesafeEnum.getClassName()%&gt;</span> <span class="highlight">&lt;%=instance.getName()%&gt;</span> = 
-<span><img src="images/tag_1.gif" width="24" height="13" alt=""/></span>      new <span class="highlight">&lt;%=typesafeEnum.getClassName()%&gt;</span>(<span class="highlight">&lt;%=instance.constructorValues()%&gt;</span>);
- <span class="highlight">&lt;% } %&gt;</span>
-
- 
- <span class="highlight">&lt;% for (Iterator&lt;Attribute&gt; i = typesafeEnum.attributes(); i.hasNext(); ) { %&gt;</span>
- <span class="highlight">&lt;%     Attribute attribute = i.next(); %&gt;</span>
- 
-     // <strong>attribute declaration</strong>
-<span><img src="images/tag_2.gif" width="24" height="13" alt=""/></span>  private final <span class="highlight">&lt;%=attribute.getType()%&gt;</span> m<span class="highlight">&lt;%=attribute.getCappedName()%&gt;</span>;
- <span class="highlight">&lt;% } %&gt;</span>
-
- 
-     /**
-      * Private <strong>constructor</strong>.
-      */
-<span><img src="images/tag_3.gif" width="24" height="13" alt=""/></span>  private <span class="highlight">&lt;%=typesafeEnum.getClassName()%&gt;</span>(<span class="highlight">&lt;%=typesafeEnum.constructorParameterDescription()%&gt;</span>) {
- <span class="highlight">&lt;% for (Iterator&lt;Attribute&gt; i = typesafeEnum.attributes(); i.hasNext(); ) { %&gt;</span>
- <span class="highlight">&lt;%     Attribute attribute = i.next(); %&gt;</span>
-<span><img src="images/tag_4.gif" width="24" height="13" alt=""/></span>      m<span class="highlight">&lt;%=attribute.getCappedName()%&gt;</span> = <span class="highlight">&lt;%=attribute.getUncappedName()%&gt;</span>;
- <span class="highlight">&lt;% } %&gt;</span>
-
-     }
-               
- // <strong>getter accessor methods</strong>
- <span class="highlight">&lt;% for (Iterator&lt;Attribute&gt; i = typesafeEnum.attributes(); i.hasNext(); ) { %&gt;</span>
- <span class="highlight">&lt;%     Attribute attribute = i.next(); %&gt;</span>
-     /**
-      * Returns the <span class="highlight">&lt;%=attribute.getName()%&gt;</span>.
-      *
-      * @return the <span class="highlight">&lt;%=attribute.getName()%&gt;</span>. 
-      */
-     public <span class="highlight">&lt;%=attribute.getType()%&gt;</span> get<span class="highlight">&lt;%=attribute.getCappedName()%&gt;</span>() {
-         return m<span class="highlight">&lt;%=attribute.getCappedName()%&gt;</span>;
-     }
- 
- <span class="highlight">&lt;% } %&gt;</span>     
- 
-     // lookup method omitted...
- }</pre>
-
-<p>As you can see, the template calls some methods that were not in the simple 
-  model we introduced earlier. We have added a few convenience methods, like the 
-  <tt class="code"><img src="images/tag_2.gif" width="24" height="13" alt=""/>Attribute.getCappedName()</tt> 
-  and <tt class="code"><img src="images/tag_4.gif" width="24" height="13" alt=""/>getUncappedName()</tt> 
-  methods. Such methods help to keep the template simple.</p>
-<p>Another example of methods we added to the model are the <tt class="code"><img src="images/tag_3.gif" width="24" height="13" alt=""/>TypesafeEnum.constructorParameterDescription()</tt> 
-  method and the <tt class="code"><img src="images/tag_1.gif" width="24" height="13" alt=""/>Instance.constructorValues()</tt> 
-  method. The implementation of the <tt class="code">constructorValues</tt> method is shown 
-  below. </p>
-
-<pre>// class Instance
-/**
- * Convenience method that returns the attribute values of this instance,
- * in the order expected by the constructor of this instance.
- * 
- * @return a comma-separated list of all attribute values of this instance,
- *         formatted like <tt class="code">attrib1-value, attrib2-value (, ...)</tt>
- */
-public String constructorValues() {
-    StringBuffer result = new StringBuffer();
-    for (Iterator&lt;Attribute&gt; i = getType().attributes(); i.hasNext(); ) {
-        Attribute attribute = i.next();
-        result.append(getAttributeValue(attribute));
-        if (i.hasNext()) {
-            result.append(", ");
-        }
-    }
-    return result.toString();
-}
-</pre>
-<p>The <tt class="code">constructorValues</tt> method loops through the attributes of the 
-  typesafe enum, looks up the value for each attribute in the instance, and concatenates 
-  these values into a string, separated by commas. For example, in our <tt>Digit</tt> 
-  typesafe enum class above, this method would return <tt>&quot;0, \&quot;zero\&quot;&quot;</tt> 
-  for the &quot;ZERO&quot; instance. </p>
-
-<p>We could have looped through the attribute values in the template, but that 
-  would have made the template much more difficult to read. Pushing this logic 
-  into the model made the template more readable and easier to maintain. On the 
-  other hand, we lost some flexibility because users cannot customize that logic 
-  anymore by editing the template. This is a trade-off you have to make. Which 
-  is better depends on your template and your application.</p>
-<h3><a name="gui"></a>A GUI to Collect User Input </h3>
-<p>Now that we have a model and a template, we still need two more pieces to finish 
-  our plug-in: we need a GUI to collect values from the user to populate our model 
-  with, and we need to invoke our template with the populated model to generate 
-  source code and save this source code to a location in the workspace.</p>
-<p>Let's start with the GUI. The workbench provides a few wizards that do something 
-  similar to what we have in mind, for example the New Class, New Interface and 
-  New JUnit TestCase wizards. It probably makes sense to have our GUI look similar 
-  to these wizards and make it accessible from the standard menu and toolbar locations.</p>
-<p>Our wizard has three pages. The first page, shown below, looks like a simplified 
-  version of the New Class wizard. In fact, we are using the same framework that 
-  the New Class wizard uses, the <tt class="code">org.eclipse.jdt.ui.wizards</tt> package. 
-  In the first page, we collect the package name and the class name of the typesafe 
-  enum, and the location where the result should be saved.</p>
-<p><img alt="GUI wizard page one: class, package and location of the typesafe enum" src="images/enum_gui_page1.gif"/> 
-</p>
-<p></p>
-<p>Our second page collects information on the attributes of the typesafe enum 
-  class. Every attribute has a name and a type, and may be one of the key attributes. 
-  Our second wizard page is shown below:</p>
-
-<p><img alt="GUI wizard page two: attributes of the typesafe enum" src="images/enum_gui_page2.gif"/></p>
-<p></p>
-<p>Our third and last wizard page, shown below, collects information on the instances 
-  of the typesafe enum. The user inputs the instance name, and for each instance 
-  provides values for all attributes.</p>
-<p>Finally, one of the instances may be the &quot;default&quot; instance, which 
-  is the instance returned by the <tt class="code">lookup</tt> method if no instance was 
-  found for the specified key attribute values.</p>
-<p><img alt="GUI wizard page three: instances of the typesafe enum" src="images/enum_gui_page3.gif"/></p>
-<h3><a name="invoke_plugin_template"></a>Invoking the Template </h3>
-<p>Now that we have a GUI to populate our model, we can finally use what we learned 
-  in the first part of this article, and generate source code with our template.</p>
-
-<p>When a user presses Finish on the wizard, the <tt class="code">performFinish</tt> method 
-  in our wizard is called. The code below shows how we <img src="images/tag_1.gif" width="24" height="13" alt=""/>use 
-  a custom subclass of <tt class="code">JETEmitter</tt> to <img src="images/tag_2.gif" width="24" height="13" alt=""/>add 
-  the JAR file of our plug-in to the class path of the <i>.JETEmitters</i> project 
-  before we <img src="images/tag_3.gif" width="24" height="13" alt=""/>call generate on 
-  the <tt class="code">JETEmitter</tt>. The generated typesafe enum source code is <img src="images/tag_4.gif" width="24" height="13" alt=""/>saved 
-  to the location in the workspace that the user specified.</p>
-<pre> // class NewTypesafeEnumCreationWizard
- protected void finishPage(IProgressMonitor monitor) 
- throws InterruptedException, CoreException {
- 
-     String pluginId = "org.eclipse.emf.examples.jet.article2";
-     String base = Platform.getBundle(pluginId).getEntry("/").toString();
-     String relativeUri = "templates/TypeSafeEnumeration.javajet";
-<span><img src="images/tag_1.gif" width="24" height="13" alt=""/></span>  <tt class="code">JETEmitter</tt> emitter = new JETEmitter(base + relativeUri, getClass().getClassLoader());
-<span><img src="images/tag_2.gif" width="24" height="13" alt=""/></span>  emitter.addClasspathVariable("JET_TUTORIAL", pluginId);
- 
-     TypesafeEnum model = mPage1.getTypesafeEnumModel();
-     IProgressMonitor sub = new SubProgressMonitor(monitor, 1);
-
-<span><img src="images/tag_3.gif" width="24" height="13" alt=""/></span>  String result = emitter.generate(sub, new Object[] { model });
-     monitor.worked(1);
- 
-<span><img src="images/tag_4.gif" width="24" height="13" alt=""/></span>  IFile file = save(monitor, result.getBytes());
- 
-     selectAndReveal(file);
-     openResource(file);
- }</pre>
-<h3><a name="pluginxml"></a>Registering our Wizard </h3>
-<p>Our final code snippet below shows the part of our <tt class="code">plugin.xml</tt> configuration 
-  file where we register our wizard as a contribution to the workbench.</p>
-<pre>   &lt;extension point="org.eclipse.ui.newWizards"&gt;
-      &lt;wizard 
-            name="Typesafe Enum"
-            icon="icons/newenum_wiz.gif"
-            category="org.eclipse.jdt.ui.java"
-            id="org.eclipse.emf.examples.jet.article2.ui.NewTypesafeEnumCreationWizard"&gt;
-         &lt;description&gt;
-            Create a Typesafe Enumeration
-         &lt;/description&gt;
-         &lt;class class="org.eclipse.emf.examples.jet.article2.ui.NewTypesafeEnumCreationWizard"&gt;
-<span><img src="images/tag_1.gif" width="24" height="13" alt=""/></span>         &lt;parameter name="javatype" value="true"/&gt;
-         &lt;/class&gt;
-      &lt;/wizard&gt;
-   &lt;/extension&gt;
-</pre>
-<p>Now our wizard is activated when users select File &gt; New &gt; Other &gt; 
-  Java &gt; Typesafe Enum from the workbench, as shown in the image below. </p>
-<p><img alt="Typesafe Enum wizard shows up in the New creation wizard" src="images/new_creation_wizard.gif"/> 
-</p>
-<p>Note that we set the <tt class="code"><img src="images/tag_1.gif" width="24" height="13" alt=""/>javatype</tt> 
-  attribute to true in the wizard extension element in the <tt class="code">plugin.xml</tt> 
-  file. This will cause our wizard to show up as an action on the toolbar in the 
-  Java Perspective, as shown in the image below.</p>
-
-<p><img alt="Typesafe Enum wizard shows up as an action on the toolbar in the Java Perspective" src="images/new_toolbar.gif"/> 
-</p>
-<p></p>
-<h2><a name="conclusion">Conclusion</a></h2>
-JET can be a great help for applications that need to generate text. Templates 
-are as much of an improvement to code generation as JSP pages were to old style 
-servlets. 
-<p>When using JET, you need to decide whether you want to distribute your templates 
-  with your application, or distribute only the template implementation classes.</p>
-<p>If your goal is to simplify the text generation capabilities of your application, 
-  then using JET Nature and JET Builder to automatically translate your templates 
-  is a good choice. See <a href="../../tutorials/jet1/jet_tutorial1.html">JET Tutorial 
-  Part 1</a> for details. In that case you only need to distribute the translated 
-  template implementation classes with your application, not the templates themselves.</p>
-<p>On the other hand, if it is important for your application that users have 
-  ultimate control over the generated text, you may want to distribute the template 
-  files themselves with your application. In that case, you will need to translate 
-  these templates every time you generate text. The plug-in we wrote in this article 
-  is an example of this type of application.</p>
-<p>This article explained what classes are available in the JET package to achieve 
-  this and showed how to use these classes with an Eclipse plug-in. The appendix 
-  below provides an overview of the JET API and shows how it can be used in headless 
-  or standalone applications.</p>
-
-<h2><a name="appendix">Appendix</a></h2>
-<h3><a name="jet_api_overview"></a>JET API Overview </h3>
-<strong>Package org.eclipse.emf.codegen</strong> 
-<p></p>
-<table border="1" cellspacing="0">
-  <tbody> 
-  <tr> 
-    <th>Class</th>
-    <th>Description</th>
-  </tr>
-
-  <tr> 
-    <td valign="top"><tt class="code">CodeGen</tt></td>
-    <td> 
-      <p>The <tt class="code">CodeGen</tt> class can translate a JET template to Java source 
-        code and optionally merge the template implementation Java source code 
-        with an existing Java class. <tt class="code">CodeGen</tt> can be used as an Eclipse 
-        headless application. The <tt class="code">run</tt> method expects a String array parameter 
-        of two or three elements: </p>
-
-      <ul>
-        <li> the uri of the template to translate </li>
-        <li>the target path where the translation result should be saved </li>
-        <li>an optional <tt class="code">JMerge</tt> control model file specifying how to merge 
-          the new translation result with the source code of an existing Java 
-          class</li>
-      </ul>
-
-    </td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">CodeGenPlugin</tt></td>
-    <td>The plug-in class for the JET package.</td>
-  </tr>
-  </tbody>
-</table>
-<p></p>
-
-<strong>Package org.eclipse.emf.codegen.jet</strong> 
-<p></p>
-<table border="1" cellspacing="0">
-  <tbody> 
-  <tr> 
-    <th>Class</th>
-    <th>Description</th>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">IJETNature</tt></td>
-
-    <td>Interface extending <tt class="code">org.eclipse.core.resources.IProjectNature</tt>. 
-      Defines some of the properties that a JET nature has. Implemented by <tt class="code">JETNature</tt>. 
-      Used as a filter for project property pages by the <tt class="code">org.eclipse.emf.codegen.ui</tt> 
-      plug-in.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETAddNatureOperation</tt></td>
-    <td>A <tt class="code">org.eclipse.core.resources.IWorkspaceRunnable</tt> for adding the 
-      JET nature to a project in the workspace. Used by the <tt class="code">AddJETNatureAction</tt> 
-      in the <tt class="code">org.eclipse.emf.codegen.ui</tt> plug-in.</td>
-
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETBuilder</tt></td>
-    <td>This class extends <tt class="code">org.eclipse.core.resources.IncrementalProjectBuilder</tt>. 
-      When its <tt class="code">build</tt> method is invoked, it delegates to <tt class="code">JETCompileTemplateOperation</tt> 
-      to translate all templates in the workspace project that have been changed 
-      since the previous build. Templates must be located in one of the folders 
-      specified as Template Containers in the JET Nature of the project.</td>
-
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETCharDataGenerator</tt></td>
-    <td>Responsible for a part of the template translation process. Generates 
-      strings for the character data present in the template file. Used by <tt class="code">JETCompiler</tt>.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETCompiler</tt></td>
-
-    <td>This is the core class for template translation. This class is responsible 
-      for translating templates to the Java source code of a template implementation 
-      class. The actual translation is delegated to other classes in this package. 
-      A <tt class="code">JETParser</tt> is used to parse the template into template elements. 
-      <tt class="code">JETCompiler</tt> implements the <tt class="code">JETParseEventListener</tt> interface 
-      and registers itself with the parser to be notified when the parser recognizes 
-      a template element. For every recognized template element, <tt class="code">JETCompiler</tt> 
-      uses a <tt class="code">JETGenerator</tt> to translate the template element to Java source 
-      code. When the template parsing is complete, <tt class="code">JETCompiler</tt> uses a 
-      <tt class="code">JETSkeleton</tt> to assemble the Java source code elements to a single 
-      compilation unit (a Java class).</td>
-
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETCompileTemplateOperation</tt></td>
-    <td>This class implements <tt class="code">org.eclipse.core.resources.IWorkspaceRunnable</tt> 
-      so it can execute as a batch operation within the workspace. This operation 
-      takes a workspace project, one or more Template Containers and optionally 
-      a list of specific template files as constructor parameters. When its <tt class="code">run</tt> 
-      method is invoked, it uses a <tt class="code">JETCompiler</tt> to translate the template 
-      files in the specified workspace project folders to Java source files for 
-      template implementation classes. This operation can optionally be configured 
-      to trigger a complete build of the project when it is finished to compile 
-      the Java source files to <i>.class</i> files.</td>
-
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETConstantDataGenerator</tt></td>
-    <td>Responsible for a part of the template translation process. Extends <tt class="code">JETCharDataGenerator</tt> 
-      to generate constant declarations for the strings with character data present 
-      in the template file.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETCoreElement</tt></td>
-
-    <td>Interface for core JET syntax elements (directive, expression, scriptlet 
-      and quote-escape). Used by <tt class="code">JETParser</tt>.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETEmitter</tt></td>
-    <td>This class provides a convenient high-level API for users of this package. 
-      The <tt class="code">generate</tt> method of this class translates a template to Java 
-      source code, compiles this source code to a template implementation class, 
-      asks the template class to generate text and finally returns the generated 
-      result. This class creates a Java project called <i>.JETEmitters</i> in 
-      the workspace, translates the template into this project, and simply calls 
-      <tt class="code">build</tt> on the <i>.JETEmitters</i> project to compile the source 
-      code. If translation or compilation fails, a <tt class="code">JETException</tt> is thrown. 
-      A template implementation Java class is "executed" by calling its <tt class="code">generate</tt> 
-      method.</td>
-
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETException</tt></td>
-    <td>Extends <tt class="code">org.eclipse.core.runtime.CoreException</tt>, but provides 
-      more convenient constructors.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETExpressionGenerator</tt></td>
-
-    <td>Responsible for a part of the template translation process. Extends <tt class="code">JETScriptletGenerator</tt> 
-      to translate JET expressions (<tt class="code">&lt;%= ... %&gt;</tt> stuff) to Java source 
-      code.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETGenerator</tt></td>
-    <td>Interface for generators: classes that know how to translate part of a 
-      JET template to a Java source code element.</td>
-
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETMark</tt></td>
-    <td>A state object used by the <tt class="code">JETParser</tt> to mark points in the JET 
-      character input stream, and delegate the processing of parts of the stream 
-      to other objects.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETNature</tt></td>
-
-    <td> 
-      <p>This class implements <tt class="code">IJETNature</tt> so that it can configure 
-        a workspace project with the JET Nature. When this nature is added to 
-        a project, it adds a JET Builder to the front of the build spec of the 
-        project. This nature defines two properties: </p>
-      <ul>
-        <li> Template Containers - a list of folders in the project that contain 
-          the JET templates to translate. </li>
-        <li>Source Container - the target folder in which to save translated template 
-          implementation Java classes. </li>
-      </ul>
-
-      <p>These properties are used by the JET Builder when performing a build.</p>
-    </td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETParseEventListener</tt></td>
-    <td>Interface for objects that know how to process parts of a JET character 
-      input stream.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETParser</tt></td>
-
-    <td>The main parser class. Has several inner classes for recognizing core 
-      JET syntax elements (directive, expression, scriptlet and quote-escape). 
-      When a core JET syntax element is recognized, the actual processing of the 
-      element is delegated to a <tt class="code">JETParseEventListener</tt>.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETReader</tt></td>
-    <td>An input buffer for the JET parser. Provides a <tt class="code">stackStream</tt> method 
-      that others can call with the character stream to an include file. Also 
-      provides many other convenience methods for the parser.</td>
-
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETScriptletGenerator</tt></td>
-    <td>Responsible for a part of the template translation process. Translates 
-      JET scriptlets (<tt class="code">&lt;% ... %&gt;</tt> stuff) to Java source code.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JETSkeleton</tt></td>
-
-    <td>This class provides an interface for assembling Java source code elements 
-      into a single Java compilation unit (a Java class). Java source code elements 
-      are assembled according to a class skeleton definition. A skeleton can be 
-      used to add boilerplate code to a translated template implementation class. 
-      This class provides a default custom template implementation class skeleton 
-      definition, but can also assemble Java elements using a custom skeleton. 
-      The actual parsing and generation of Java source code is delegated to classes 
-      in the <tt class="code">org.eclipse.jdt.core.jdom</tt> package.</td>
-  </tr>
-  </tbody>
-</table>
-<p></p>
-<strong>Package org.eclipse.emf.codegen.merge.java</strong> 
-<p></p>
-<table border="1" cellspacing="0">
-  <tbody> 
-  <tr> 
-    <th>Class</th>
-    <th>Description</th>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JControlModel</tt></td>
-    <td>A control model that provides dictionaries and rules to drive a merge 
-      process.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JMerger</tt></td>
-
-    <td>A class for merging Java source files. Uses implementation of the interfaces in the <tt class="code">org.eclipse.emf.codegen.merge.java.facade</tt> 
-      package to parse the source code. This class can be used by application 
-      code.</td>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">JPatternDictionary</tt></td>
-    <td>A dictionary of signatures and java nodes.</td>
-  </tr>
-  </tbody>
-</table>
-
-<p></p>
-<strong>Package org.eclipse.emf.codegen.merge.properties</strong> 
-<p></p>
-<table border="1" cellspacing="0">
-  <tbody> 
-  <tr> 
-    <th>Class</th>
-    <th>Description</th>
-  </tr>
-  <tr> 
-    <td valign="top"><tt class="code">PropertyMerger</tt></td>
-    <td>A class for merging property files. This class can be used by application 
-      code.</td>
-  </tr>
-  </tbody>
-</table>
-<p></p>
-<h3><a name="codegen_headless_application"></a>Running CodeGen as an Eclipse Headless 
-  Application </h3>
-<p>The <tt class="code">org.eclipse.emf.codegen.CodeGen</tt> class can translate a JET template to Java source code 
-  and optionally merge the template implementation Java source code with an existing 
-  Java class. CodeGen can be used as an Eclipse headless application ("headless" 
-  means that the Eclipse GUI does not start). The <tt class="code">plugins/org.eclipse.emf.codegen/test</tt> 
-  folder in your Eclipse installation contains some scripts for launching the 
-  CodeGen class as an Eclipse headless application. These scripts are in Unix 
-  format.</p>
-
-<p><img src="images/win_only.gif" width="49" height="13" alt=""/> Below is an example 
-  script for Windows. Note that we pass two arguments to the CodeGen class:</p>
-<ul>
-  <li>the <img src="images/tag_1.gif" width="24" height="13" alt=""/>uri of the template 
-    to translate </li>
-  <li>the <img src="images/tag_2.gif" width="24" height="13" alt=""/>target path where 
-    the translation result should be saved </li>
-</ul>
-<p>If the target path already contains a previous translation result, and you 
-  want to merge the new translation result with the existing one, you can specify 
-  a <tt class="code">JMerge</tt> control model file as the third argument. The <tt class="code">plugins/org.eclipse.emf.codegen/test</tt> 
-  folder in your Eclipse installation contains an example <tt class="code">merge.xml</tt> file.</p>
-
-<pre>   @echo off
-   set ECLIPSE_HOME=C:\eclipse-2.1\eclipse
-   set WORKSPACE=%ECLIPSE_HOME%\workspace
-   set OPTS=-Xmx900M -Djava.compiler=NONE -verify -cp %ECLIPSE_HOME%\startup.jar
-   set MAIN=org.eclipse.core.launcher.Main -noupdate -data %WORKSPACE% 
- 
-<span><img src="images/tag_1.gif" width="24" height="13" alt=""/></span>set TEMPLATE_URI=test.javajet
-<span><img src="images/tag_2.gif" width="24" height="13" alt=""/></span>set TARGET_FOLDER=C:\temp\jetstandalone\MyProject
-   set ARGUMENTS=%TEMPLATE_URI% %TARGET_FOLDER%
-   
-   echo Shut down Eclipse before running this script.
-   java %OPTS% %MAIN% -application org.eclipse.emf.codegen.CodeGen %ARGUMENTS%
-</pre>
-<h3><a name="jetc"></a>jetc: An ANT Task for Translating JET Templates Outside 
-  of Eclipse </h3>
-<p>Author: Knut Wannheden (knut.wannheden at paranor.ch) </p>
-<p>Binary: <a href="images/../jetc-task.jar">jetc-task.jar</a>. </p>
-<p>The source: <a href="images/../JETCTask.java" target="_blank">JETCTask.java</a>. </p>
-
-<p>Some notes: </p>
-<ul>
-  <li>In the <tt class="code">&lt;taskdef/&gt;</tt> you have to specify the class path to include 
-    both this task as well as the jars of a number of Eclipse plug-ins (see the 
-    example buildfile). </li>
-  <li>There are two ways to tell the jetc task which template(s) it should translate: 
-  <ul>
-    <li>Use a nested fileset to specify the directory containing the template 
-      files. </li>
-
-    <li>Specify the template uri in the "template" attribute of the task. When 
-      used this way, the task supports the "class" and "package" attributes which 
-      overload the JET directives "class" and "package" in the template. It can 
-      also be used if the JET directive is missing altogether. Use this attribute 
-      when you want to specify the class to generate outside the template. </li>
-  </ul></li>
-</ul>
-<p>Here's a simple Ant buildfile (the taskdef class path assumes you have Eclipse 
-  3.3 and EMF 2.3.0): </p>
-<pre>&lt;project default=&quot;jetc_multiple_templates&quot;&gt;
-  &lt;property name=&quot;eclipse.plugins.dir&quot; location=&quot;C:\eclipse-SDK-3.3M4-win32\eclipse\plugins&quot; /&gt;
-    
-  &lt;taskdef name=&quot;jetc&quot; classname=&quot;ch.paranor.epla.structure.JETCTask&quot;&gt;
-    &lt;classpath&gt;
-      &lt;pathelement location=&quot;jetc-task.jar&quot; /&gt;
-      &lt;fileset dir=&quot;${eclipse.plugins.dir}&quot;&gt;
-        &lt;include name=&quot;org.eclipse.core.boot_*.jar&quot; /&gt;
-        &lt;include name=&quot;org.eclipse.core.resources_*.jar&quot; /&gt;
-        &lt;include name=&quot;org.eclipse.core.runtime_*.jar&quot; /&gt;
-        &lt;include name=&quot;org.eclipse.jdt.core_*.jar&quot; /&gt;
-
-        &lt;include name=&quot;org.eclipse.emf.codegen_*.jar&quot; /&gt;
-      &lt;/fileset&gt;
-    &lt;/classpath&gt;
-  &lt;/taskdef&gt;
-
-  &lt;!-- Usage example 1: --&gt;
-  &lt;!-- Specify the template file in the &quot;template&quot; attribute. --&gt;
-  &lt;!-- You can use the &quot;class&quot; and &quot;package&quot; attributes to override the --&gt;
-  &lt;!-- &quot;class&quot; and &quot;package&quot; attributes in the template file. --&gt;
-  &lt;target name=&quot;jetc_single_template&quot;&gt;
-    &lt;mkdir dir=&quot;jet-output&quot; /&gt;
-    &lt;jetc template=&quot;test.xmljet&quot;
-          package=&quot;com.foo&quot;
-          class=&quot;Test&quot;
-          destdir=&quot;jet-output&quot; /&gt;
-    &lt;javac srcdir=&quot;jet-output&quot; destdir=&quot;classes&quot; /&gt;
-  &lt;/target&gt;
-
-  &lt;!-- Usage example 2: --&gt;
-  &lt;!-- Translate a bunch of template files at once. --&gt;
-  &lt;!-- You cannot use the &quot;class&quot; and &quot;package&quot; attributes when using a fileset. --&gt;
-  &lt;target name=&quot;jetc_multiple_templates&quot;&gt;
-    &lt;mkdir dir=&quot;jet-output&quot; /&gt;
-    &lt;jetc destdir=&quot;jet-output&quot;&gt;
-      &lt;fileset dir=&quot;jet-templates&quot; includes=&quot;*.*jet&quot; /&gt;
-    &lt;/jetc&gt;
-    &lt;javac srcdir=&quot;jet-output&quot; destdir=&quot;classes&quot; /&gt;
-  &lt;/target&gt;
-&lt;/project&gt;</pre>
-<h2><a name="resources">Resources</a></h2>
-<p><a href="http://developer.java.sun.com/developer/Books/shiftintojava/page1.html#replaceenums" target="_blank">Substitutes 
-  for Missing C Constructs</a> (By Joshua Bloch)</p>
-<a href="http://www.javaworld.com/javaworld/javatips/jw-javatip122.html" target="_blank"> 
-Java Tip 122: Beware of Java typesafe enumerations</a> (By Vladimir Roubtsov)<br/>
-<p><a href="http://www.javaworld.com/javaworld/javatips/jw-javatip133.html" target="_blank">Java 
-  Tip 133: More on typesafe enums</a> (By Philip Bishop)</p>
-
-<p><a href="http://www.eclipse.org/emf/">http://www.eclipse.org/emf/ </a></p>
-<p><small>Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun 
-Microsystems, Inc. in the United States, other countries, or both.</small></p>
-<br/>
-</body>
-</html>
diff --git a/org.eclipse.emf.doc/tutorials/jet2/org.eclipse.emf.examples.jet.article2_2.3.0.zip b/org.eclipse.emf.doc/tutorials/jet2/org.eclipse.emf.examples.jet.article2_2.3.0.zip
deleted file mode 100644
index bf3f4e8..0000000
Binary files a/org.eclipse.emf.doc/tutorials/jet2/org.eclipse.emf.examples.jet.article2_2.3.0.zip and /dev/null differ


hooks/post-receive
-- 
eclipse-emf - Plug-in for eclipse - Debian package.



More information about the pkg-java-commits mailing list