[382342] Make Getting Started Documentation more helpful
https://bugs.eclipse.org/bugs/show_bug.cgi?id=382342

Integrate example project ZIP archives using the EMF example wizard.
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/.project b/examples/org.eclipse.uml2.examples.uml.ui/.project
index 860a60b..8269c09 100644
--- a/examples/org.eclipse.uml2.examples.uml.ui/.project
+++ b/examples/org.eclipse.uml2.examples.uml.ui/.project
@@ -27,6 +27,31 @@
 			</arguments>
 		</buildCommand>
 		-->
+        <buildCommand>
+            <name>org.eclipse.buckminster.ant.AntBuilder</name>
+            <arguments>
+                <dictionary>
+                    <key>given.name</key>
+                    <value>Create example projects ZIP archives</value>
+                </dictionary>
+                <dictionary>
+                    <key>script.file</key>
+                    <value>build-example-zips.xml</value>
+                </dictionary>
+                <dictionary>
+                    <key>derived.resource</key>
+                    <value>zips</value>
+                </dictionary>
+                <dictionary>
+                    <key>refresh.resource</key>
+                    <value>zips</value>
+                </dictionary>
+                <dictionary>
+                    <key>delta.resource</key>
+                    <value>zips</value>
+                </dictionary>
+            </arguments>
+        </buildCommand>
 	</buildSpec>
 	<natures>
 		<nature>org.eclipse.pde.PluginNature</nature>
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/buckminster.cspex b/examples/org.eclipse.uml2.examples.uml.ui/buckminster.cspex
new file mode 100644
index 0000000..5d2a28d
--- /dev/null
+++ b/examples/org.eclipse.uml2.examples.uml.ui/buckminster.cspex
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2014 CEA and others.
+ All rights reserved.   This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors: 
+   Christian W. Damus (CEA) - initial API and implementation
+
+-->
+<cspecExtension
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:bc="http://www.eclipse.org/buckminster/Common-1.0"
+    xmlns="http://www.eclipse.org/buckminster/CSpec-1.0">
+    <dependencies>
+        <!-- UML2 Example projects needed to build ZIP archives of their sources -->
+        <dependency name="org.eclipse.uml2.examples.gettingstarted" componentType="osgi.bundle"/>
+        <dependency name="org.eclipse.uml2.examples.introtoprofiles" componentType="osgi.bundle"/>
+    </dependencies>
+</cspecExtension>
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/build-example-zips.xml b/examples/org.eclipse.uml2.examples.uml.ui/build-example-zips.xml
new file mode 100644
index 0000000..3509d66
--- /dev/null
+++ b/examples/org.eclipse.uml2.examples.uml.ui/build-example-zips.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2010, 2014 E.D.Willink, CEA, and others.
+ All rights reserved.   This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors: 
+   E.D.Willink - initial API and implementation
+   Christian W. Damus (CEA) - adapted from OCL project for 382342
+-->
+<project name="org.eclipse.uml2.examples.ui" default="zip.examples" basedir=".">
+	<target name="init">
+	</target>
+
+	<patternset id="zip.excludes"
+		excludes="src.zip,build*.xml,javaCompiler*,bin/**,temp.folder/**,@dot/**,**/*.graffle"/>
+	
+	<target name="zip.examples" depends="init">
+		<!-- UML2 examples -->
+		<eclipse.convertPath resourcePath="org.eclipse.uml2.examples.gettingstarted" property="projectDir"/>
+		<zip destfile="zips/gettingstarted.zip" basedir="${projectDir}">
+			<patternset refid="zip.excludes"/>
+		</zip>
+		
+        <eclipse.convertPath resourcePath="org.eclipse.uml2.examples.introtoprofiles" property="projectDir"/>
+        <zip destfile="zips/introtoprofiles.zip" basedir="${projectDir}">
+            <patternset refid="zip.excludes"/>
+        </zip>
+	</target>
+
+	<target name="clean" depends="init">
+		<delete>
+			<fileset dir="zips" includes="*.zip"/>
+		</delete>
+		<antcall target="refresh"/>
+	</target>
+
+	<target name="refresh" depends="init" if="eclipse.running">
+		<eclipse.refreshLocal resource="/org.eclipse.uml2.examples.ui" depth="infinite"/>
+	</target>
+</project>
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/build.properties b/examples/org.eclipse.uml2.examples.uml.ui/build.properties
index 17507c1..7ae4321 100644
--- a/examples/org.eclipse.uml2.examples.uml.ui/build.properties
+++ b/examples/org.eclipse.uml2.examples.uml.ui/build.properties
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2007 IBM Corporation and others.
+# Copyright (c) 2006, 2014 IBM Corporation, CEA, and others.
 # All rights reserved.   This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -6,8 +6,8 @@
 #
 # Contributors: 
 #   IBM - initial API and implementation
+#   Christian W. Damus (CEA) - 382342
 #
-# $Id: build.properties,v 1.5 2007/04/04 02:19:56 khussey Exp $
 
 # NLS_MESSAGEFORMAT_VAR
 source.. = src/
@@ -15,7 +15,9 @@
 bin.includes = about.html,\
                plugin.*,\
                .,\
-               META-INF/
+               META-INF/,\
+               zips/,\
+               icons/
 src.includes = about.html
 exclude.. = **/doc-files/**
 javacSource = 1.5
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/icons/full/obj16/UMLModelFile.gif b/examples/org.eclipse.uml2.examples.uml.ui/icons/full/obj16/UMLModelFile.gif
new file mode 100644
index 0000000..4eb1fb5
--- /dev/null
+++ b/examples/org.eclipse.uml2.examples.uml.ui/icons/full/obj16/UMLModelFile.gif
Binary files differ
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/icons/full/wizban/NewUML.gif b/examples/org.eclipse.uml2.examples.uml.ui/icons/full/wizban/NewUML.gif
new file mode 100644
index 0000000..cc07553
--- /dev/null
+++ b/examples/org.eclipse.uml2.examples.uml.ui/icons/full/wizban/NewUML.gif
Binary files differ
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/plugin.properties b/examples/org.eclipse.uml2.examples.uml.ui/plugin.properties
index 8a82d32..1739a8b 100644
--- a/examples/org.eclipse.uml2.examples.uml.ui/plugin.properties
+++ b/examples/org.eclipse.uml2.examples.uml.ui/plugin.properties
@@ -1,4 +1,4 @@
-# Copyright (c) 2006, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others.
+# Copyright (c) 2006, 2014 IBM Corporation, Embarcadero Technologies, CEA, and others.
 # All rights reserved.   This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -8,8 +8,8 @@
 #   IBM - initial API and implementation
 #   Kenn Hussey (Embarcadero Technologies) - 204200
 #   Kenn Hussey (CEA) - 327039
+#   Christian W. Damus (CEA) - 382342
 #
-# $Id: plugin.properties,v 1.9 2009/04/07 18:24:02 jbruck Exp $
 
 # NLS_MESSAGEFORMAT_VAR
 
@@ -71,3 +71,9 @@
 
 _UI_XMLAction_label = &XML
 _UI_GenerateXMLPrimitiveTypesActionCommand_label = Generate XML primitive types into Model {0}
+
+ExamplesCategory_name = UML2 Example Projects
+GettingStarted_name = Getting Started with UML2
+GettingStarted_description = Creates an example project containing the complete model and source code for the Getting Started with UML2 tutorial on the Eclipse UML2 wiki.
+IntroToProfiles_name = Introduction to UML2 Profiles
+IntroToProfiles_description = Creates an example project containing the complete profile and source code for the Introduction to UML2 Profiles tutorial on the Eclipse UML2 wiki.
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/plugin.xml b/examples/org.eclipse.uml2.examples.uml.ui/plugin.xml
index 07ecbf7..5e930dc 100644
--- a/examples/org.eclipse.uml2.examples.uml.ui/plugin.xml
+++ b/examples/org.eclipse.uml2.examples.uml.ui/plugin.xml
@@ -2,7 +2,7 @@
 <?eclipse version="3.0"?>
 
 <!--
- Copyright (c) 2006, 2011 IBM Corporation, CEA, and others.
+ Copyright (c) 2006, 2014 IBM Corporation, CEA, and others.
  All rights reserved.   This program and the accompanying materials
  are made available under the terms of the Eclipse Public License v1.0
  which accompanies this distribution, and is available at
@@ -11,8 +11,8 @@
  Contributors: 
    IBM - initial API and implementation
    Kenn Hussey (CEA) - 327039
+   Christian W. Damus (CEA) - 382342
 
- $Id: plugin.xml,v 1.5 2006/11/30 05:16:16 khussey Exp $
 -->
 
 <plugin>
@@ -227,4 +227,45 @@
     </editorContribution>
   </extension>
 
+   <extension point="org.eclipse.ui.newWizards">
+      <category id="org.eclipse.uml2.examples.category"
+            name="%ExamplesCategory_name"
+            parentCategory="org.eclipse.ui.Examples"/>
+      <wizard id="org.eclipse.uml2.examples.gettingstarted"
+            category="org.eclipse.ui.Examples/org.eclipse.uml2.examples.category"
+            class="org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard"
+            project="true"
+            name="%GettingStarted_name"
+            icon="$nl$/icons/full/obj16/UMLModelFile.gif">
+         <description>%GettingStarted_description</description>
+      </wizard>
+      <wizard id="org.eclipse.uml2.examples.introtoprofiles"           
+            category="org.eclipse.ui.Examples/org.eclipse.uml2.examples.category"
+            class="org.eclipse.emf.common.ui.wizard.ExampleInstallerWizard"
+            project="true"
+            name="%IntroToProfiles_name"
+            icon="$nl$/icons/full/obj16/UMLModelFile.gif">
+         <description>%IntroToProfiles_description</description>
+      </wizard>
+   </extension>
+   <extension point="org.eclipse.emf.common.ui.examples">
+      <example id="org.eclipse.uml2.examples.project.gettingstarted"
+            wizardID="org.eclipse.uml2.examples.gettingstarted"
+            pageImage="icons/full/wizban/NewUML.gif">
+         <projectDescriptor name="org.eclipse.uml2.examples.gettingstarted"
+               contentURI="zips/gettingstarted.zip"
+               description="%GettingStarted_description"/>
+         <fileToOpen location="org.eclipse.uml2.examples.gettingstarted/src/org/eclipse/uml2/examples/gettingstarted/GettingStartedWithUML2.java"
+               editorID="org.eclipse.jdt.ui.CompilationUnitEditor"/>
+      </example>
+      <example id="org.eclipse.uml2.examples.project.introtoprofiles"
+            wizardID="org.eclipse.uml2.examples.introtoprofiles"
+            pageImage="icons/full/wizban/NewUML.gif">
+         <projectDescriptor name="org.eclipse.uml2.examples.introtoprofiles"
+               contentURI="zips/introtoprofiles.zip"
+               description="%IntroToProfiles_description"/>
+         <fileToOpen location="org.eclipse.uml2.examples.introtoprofiles/src/org/eclipse/uml2/examples/introtoprofiles/IntroductionToUMLProfiles.java"
+               editorID="org.eclipse.jdt.ui.CompilationUnitEditor"/>
+      </example>
+   </extension>
 </plugin>
diff --git a/examples/org.eclipse.uml2.examples.uml.ui/zips/.gitignore b/examples/org.eclipse.uml2.examples.uml.ui/zips/.gitignore
new file mode 100644
index 0000000..c4c4ffc
--- /dev/null
+++ b/examples/org.eclipse.uml2.examples.uml.ui/zips/.gitignore
@@ -0,0 +1 @@
+*.zip