Merge "Added org.eclipse.emf.ecore.change to requirements and fixed launches"
diff --git a/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/00-Main.xdoc b/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/00-Main.xdoc
index a978d60..8de9964 100644
--- a/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/00-Main.xdoc
+++ b/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/00-Main.xdoc
@@ -47,6 +47,7 @@
 
 %%chapter-ref[DSL]
 %%
-%%chapter-ref[RAP]
+chapter-ref[RAP]
+
 %%
 chapter-ref[Eclipse4]
\ No newline at end of file
diff --git a/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/08-RAP.xdoc b/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/08-RAP.xdoc
index 2dfed95..00eb4e8 100644
--- a/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/08-RAP.xdoc
+++ b/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/08-RAP.xdoc
@@ -1,3 +1,73 @@
 chapter:RAP[RAP]
 
- 
\ No newline at end of file
+section:introduction[Introduction]
+
+As you may know link[http://eclipse.org/rap/][RAP (Remote Application Platform)] is a technology that allows you to run an Eclipse RCP application over the web.
+
+In order to obtain this goal you have to setup a specific RAP Target Platform, for instance the one that RAP itself provides once you install it.
+
+However when you want to use an Eclipse RCP framework over the RAP Platform, you generally have to deal with
+dependencies, since not all Eclipse frameworks are ready-to-use with RAP, especially those related with the SWT layer.
+
+EMF Parsley provides a proper RAP Target Platform that allows you to start leveraging Parsley potentials to the web the same way you have 
+learned to do with desktop (RCP) development.
+
+section:installRapTools[Installing the RAP Tools]
+
+To begin with, you need to install the RAP Tools into the IDE.
+This can be accomplished with the following steps:
+ol[
+	item[Help -> Install New Software ...]
+	item[select the main Eclipse Update site (e.g. e["http://download.eclipse.org/releases/luna"])]
+	item[expand category "Web, XML, Java EE and OSGi Enterprise Development"]
+	item[select "RAP Tools" and complete the installation, restarting the IDE at the end]
+	item[after IDE restarts just close the Welcome page]
+]
+
+
+section:rapSetTargetPlatform[Setup the EMF Parsley RAP Target Platform]
+
+After having installed EMF Parsley as described link[https://www.eclipse.org/emf-parsley/download.html][here] and
+created a new workspace, you can setup the EMF Parsley RAP Target Platform in the following way: 
+ol[
+	item[File -> New... -> Example...]
+	item[from Category "Emf Parsley Examples", select "Emf Parsley Rap Target Platform Example"]
+	item[press Next and Finish]
+	item[open the Target Definition file e[emf-parsely-rap-2.3.target]]
+	item[wait until the "Resolving Target Definition" job is done (check the status bar)]
+	item[when finished, click on hyperlink "Set as Target Platform"]
+]
+
+You will end up with a RAP-enabled workspace, enhanced by EMF and Parsley! 
+
+
+section:rapFirstExample[Running the Parsley RAP UI Example]
+
+Here is the fastest way to get a working web application with all the stuff put togheter:
+ol[
+	item[File -> New... -> Example...]
+	item[from Category "Emf Parsley Examples", select "Emf Parsley Rap Example"]
+	item[press Next and Finish]
+	item[expand plug-in e["org.eclipse.emf.parsley.examples.rap.ui"]]
+	item[right-click "Emf_Parsley_RAP_UI_Example.launch" and click "Run as" "Emf_Parsley_RAP_UI_Example"]
+]
+
+What you will get is a web application that allows you to interact with the model instance as you would
+do in a desktop (RCP) environment.
+
+img[images/08-rap-ui-example-running.png][][ ][]
+
+In this web application you can see two views: 
+ul[
+	item[the one on the left is a read-only view; it just reflects the model content, but it does not react to changes (the classic Eclipse dirty indicator is not triggered
+by changes) and you are not able to save. Its model is created in class e[org.eclipse.emf.parsley.examples.rap.ui.GuiceModule.CustomEmptyResourceInitializer]
+and is not persisted]
+	item[the view on the right is instead a Saveable view and therefore it not only triggers the dirty state after
+a change, but also allows you to save the modifications with the automatic dirty state reset. Its model
+is persisted in file e[System.getProperty("java.io.tmpdir")+"/My.model")] ]
+]
+
+Of course, since this is a web application, you can also open a browser on another pc or device on the same network and type the address,
+replacing 127.0.0.1 with the IP of the machine where the application was launched.
+
+
diff --git a/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/images/08-rap-ui-example-running.png b/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/images/08-rap-ui-example-running.png
new file mode 100644
index 0000000..1f38bd1
--- /dev/null
+++ b/doc/org.eclipse.emf.parsley.doc/xdoc/documentation/images/08-rap-ui-example-running.png
Binary files differ
diff --git a/examples/org.eclipse.emf.parsley.examples.rap.ui/Emf_Parsley_RAP_UI_Example.launch b/examples/org.eclipse.emf.parsley.examples.rap.ui/Emf_Parsley_RAP_UI_Example.launch
new file mode 100644
index 0000000..b75f78d
--- /dev/null
+++ b/examples/org.eclipse.emf.parsley.examples.rap.ui/Emf_Parsley_RAP_UI_Example.launch
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.rap.ui.launch.RAPLauncher">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="false"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="false"/>
+<booleanAttribute key="clearws" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/Emf_Parsley_RAP_Launch"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="default_auto_start" value="true"/>
+<intAttribute key="default_start_level" value="4"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Declipse.ignoreApp=true -Dosgi.noShutdown=true"/>
+<stringAttribute key="org.eclipse.rap.launch.browserMode" value="INTERNAL"/>
+<stringAttribute key="org.eclipse.rap.launch.contextpath" value="/"/>
+<stringAttribute key="org.eclipse.rap.launch.dataLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.rap.tools.launch/Emf_Parsley_RAP_Launch"/>
+<booleanAttribute key="org.eclipse.rap.launch.developmentMode" value="true"/>
+<booleanAttribute key="org.eclipse.rap.launch.openBrowser" value="true"/>
+<intAttribute key="org.eclipse.rap.launch.port" value="10080"/>
+<stringAttribute key="org.eclipse.rap.launch.servletPath" value="/rap"/>
+<intAttribute key="org.eclipse.rap.launch.sessionTimeout" value="0"/>
+<booleanAttribute key="org.eclipse.rap.launch.useDefaultDataLocation" value="true"/>
+<booleanAttribute key="org.eclipse.rap.launch.useManualContextPath" value="false"/>
+<booleanAttribute key="org.eclipse.rap.launch.useManualPort" value="false"/>
+<booleanAttribute key="org.eclipse.rap.launch.useSessionTimeout" value="false"/>
+<booleanAttribute key="pde.generated.config" value="true"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="target_bundles" value="com.google.guava@default:default,com.google.inject@default:default,com.ibm.icu.base@default:default,javax.inject@default:default,javax.servlet@default:default,javax.xml@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.log4j@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.runtime@default:true,org.eclipse.emf.common@default:default,org.eclipse.emf.databinding.edit@default:default,org.eclipse.emf.databinding@default:default,org.eclipse.emf.ecore.edit@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.emf.edit@default:default,org.eclipse.emf.parsley.common@default:default,org.eclipse.emf.parsley.rap.runtime@default:default,org.eclipse.emf.parsley.rap.views@default:default,org.eclipse.emf.parsley.rap@default:default,org.eclipse.emf.parsley.runtime.common@default:default,org.eclipse.emf.parsley.views.common@default:default,org.eclipse.emf.rap.common.ui@default:default,org.eclipse.emf.rap.edit.ui@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.console@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.help@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.eclipse.rap.jface.databinding@default:default,org.eclipse.rap.jface@default:default,org.eclipse.rap.rwt.osgi@default:default,org.eclipse.rap.rwt@default:default,org.eclipse.rap.ui.forms@default:default,org.eclipse.rap.ui.views@default:default,org.eclipse.rap.ui.workbench@default:default,org.eclipse.rap.ui@default:default"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfigArea" value="true"/>
+<stringAttribute key="workspace_bundles" value="org.eclipse.emf.parsley.examples.rap.model@default:default,org.eclipse.emf.parsley.examples.rap.ui@default:default"/>
+</launchConfiguration>
diff --git a/examples/org.eclipse.emf.parsley.examples.rap.ui/Emf_Parsley_RAP_Launch.launch b/examples/org.eclipse.emf.parsley.examples.rap.ui/Emf_Parsley_RAP_UI_Example_Internal.launch
similarity index 100%
rename from examples/org.eclipse.emf.parsley.examples.rap.ui/Emf_Parsley_RAP_Launch.launch
rename to examples/org.eclipse.emf.parsley.examples.rap.ui/Emf_Parsley_RAP_UI_Example_Internal.launch
diff --git a/plugins/org.eclipse.emf.parsley.ui.examples/build.xml b/plugins/org.eclipse.emf.parsley.ui.examples/build.xml
index 92c8cf4..019bec5 100644
--- a/plugins/org.eclipse.emf.parsley.ui.examples/build.xml
+++ b/plugins/org.eclipse.emf.parsley.ui.examples/build.xml
@@ -23,7 +23,7 @@
 		<sequential>
 			<delete file="@{target}/@{name}.zip" />
 			<zip destfile="@{target}/@{name}.zip" basedir="@{source}/@{name}" 
-				excludes="bin,bin/**,xtend-gen,xtend-gen/**,emfparsley-gen,emfparsley-gen/**,**/*._trace,**/*.smap,.antlr-generator*.jar,target,target/**,nodist,nodist/**,old,old/**,**/hs_*.log" />
+				excludes="bin,bin/**,xtend-gen,xtend-gen/**,emfparsley-gen,emfparsley-gen/**,**/*._trace,**/*.smap,.antlr-generator*.jar,target,target/**,nodist,nodist/**,old,old/**,**/hs_*.log,**/*_Internal.launch" />
 		</sequential>
 	</macrodef>