Merge branch 'develop' into helios
diff --git a/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF b/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF
index 5792c34..c11c4e0 100644
--- a/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.bpmn2.modeler.core/META-INF/MANIFEST.MF
@@ -1,75 +1,75 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: BPMN2 Editor Core
-Bundle-SymbolicName: org.eclipse.bpmn2.modeler.core;singleton:=true
-Bundle-Version: 0.2.0.qualifier
-Bundle-Activator: org.eclipse.bpmn2.modeler.core.Activator
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.emf.transaction,
- org.eclipse.emf.edit.ui,
- org.eclipse.emf.validation.ocl,
- org.eclipse.osgi,
- org.eclipse.graphiti;bundle-version="0.9.0",
- org.eclipse.graphiti.ui;bundle-version="0.9.0",
- org.eclipse.gef,
- org.eclipse.bpmn2.edit,
- org.eclipse.bpmn2.editor,
- org.eclipse.xsd,
- org.eclipse.wst.wsdl;bundle-version="[1.1.200,2.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)",
- org.eclipse.xsd;bundle-version="[2.4.0,3.0.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,2.0.0)",
- javax.wsdl;bundle-version="[1.5.0,1.6.0)";visibility:=reexport,
- org.eclipse.wst.xsd.ui;bundle-version="[1.2.101,2.0.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.400,2.0.0)",
- org.eclipse.ui.ide,
- org.eclipse.core.commands,
- org.eclipse.jdt,
- org.eclipse.jdt.core,
- org.eclipse.jdt.launching,
- org.eclipse.ui.views.properties.tabbed,
- org.eclipse.jface.databinding,
- org.eclipse.core.databinding,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.ui
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.bpmn2.modeler.core,
- org.eclipse.bpmn2.modeler.core.adapters,
- org.eclipse.bpmn2.modeler.core.builder,
- org.eclipse.bpmn2.modeler.core.di,
- org.eclipse.bpmn2.modeler.core.features,
- org.eclipse.bpmn2.modeler.core.features.activity,
- org.eclipse.bpmn2.modeler.core.features.activity.task,
- org.eclipse.bpmn2.modeler.core.features.artifact,
- org.eclipse.bpmn2.modeler.core.features.bendpoint,
- org.eclipse.bpmn2.modeler.core.features.choreography,
- org.eclipse.bpmn2.modeler.core.features.conversation,
- org.eclipse.bpmn2.modeler.core.features.data,
- org.eclipse.bpmn2.modeler.core.features.event,
- org.eclipse.bpmn2.modeler.core.features.event.definitions,
- org.eclipse.bpmn2.modeler.core.features.flow,
- org.eclipse.bpmn2.modeler.core.features.gateway,
- org.eclipse.bpmn2.modeler.core.features.lane,
- org.eclipse.bpmn2.modeler.core.features.participant,
- org.eclipse.bpmn2.modeler.core.merrimac,
- org.eclipse.bpmn2.modeler.core.merrimac.clad,
- org.eclipse.bpmn2.modeler.core.merrimac.dialogs,
- org.eclipse.bpmn2.modeler.core.merrimac.providers,
- org.eclipse.bpmn2.modeler.core.model,
- org.eclipse.bpmn2.modeler.core.preferences,
- org.eclipse.bpmn2.modeler.core.runtime,
- org.eclipse.bpmn2.modeler.core.utils,
- org.eclipse.bpmn2.modeler.core.validation
-Import-Package: org.eclipse.bpel.wsil.model.inspection,
- org.eclipse.graphiti.ui.features,
- org.eclipse.jface.preference,
- org.eclipse.jface.util,
- org.eclipse.jface.viewers,
- org.eclipse.swt.graphics,
- org.eclipse.ui,
- org.eclipse.ui.plugin,
- org.eclipse.ui.views.properties.tabbed,
- org.eclipse.wst.validation
+Manifest-Version: 1.0

+Bundle-ManifestVersion: 2

+Bundle-Name: BPMN2 Editor Core

+Bundle-SymbolicName: org.eclipse.bpmn2.modeler.core;singleton:=true

+Bundle-Version: 0.2.0.qualifier

+Bundle-Activator: org.eclipse.bpmn2.modeler.core.Activator

+Bundle-Vendor: Eclipse.org

+Require-Bundle: org.eclipse.emf.transaction,

+ org.eclipse.emf.edit.ui,

+ org.eclipse.emf.validation.ocl,

+ org.eclipse.osgi,

+ org.eclipse.graphiti;bundle-version="0.8.2",

+ org.eclipse.graphiti.ui;bundle-version="0.8.2",

+ org.eclipse.gef,

+ org.eclipse.bpmn2.edit,

+ org.eclipse.bpmn2.editor,

+ org.eclipse.xsd,

+ org.eclipse.wst.wsdl;bundle-version="[1.1.200,2.0.0)",

+ org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)",

+ org.eclipse.xsd;bundle-version="[2.4.0,3.0.0)",

+ org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",

+ org.eclipse.wst.sse.core;bundle-version="[1.1.300,2.0.0)",

+ javax.wsdl;bundle-version="[1.5.0,1.6.0)";visibility:=reexport,

+ org.eclipse.wst.xsd.ui;bundle-version="[1.2.101,2.0.0)",

+ org.eclipse.wst.xml.ui;bundle-version="[1.0.400,2.0.0)",

+ org.eclipse.ui.ide,

+ org.eclipse.core.commands,

+ org.eclipse.jdt,

+ org.eclipse.jdt.core,

+ org.eclipse.jdt.launching,

+ org.eclipse.ui.views.properties.tabbed,

+ org.eclipse.jface.databinding,

+ org.eclipse.core.databinding,

+ org.eclipse.core.resources,

+ org.eclipse.core.runtime,

+ org.eclipse.ui

+Bundle-RequiredExecutionEnvironment: JavaSE-1.6

+Bundle-ActivationPolicy: lazy

+Export-Package: org.eclipse.bpmn2.modeler.core,

+ org.eclipse.bpmn2.modeler.core.adapters,

+ org.eclipse.bpmn2.modeler.core.builder,

+ org.eclipse.bpmn2.modeler.core.di,

+ org.eclipse.bpmn2.modeler.core.features,

+ org.eclipse.bpmn2.modeler.core.features.activity,

+ org.eclipse.bpmn2.modeler.core.features.activity.task,

+ org.eclipse.bpmn2.modeler.core.features.artifact,

+ org.eclipse.bpmn2.modeler.core.features.bendpoint,

+ org.eclipse.bpmn2.modeler.core.features.choreography,

+ org.eclipse.bpmn2.modeler.core.features.conversation,

+ org.eclipse.bpmn2.modeler.core.features.data,

+ org.eclipse.bpmn2.modeler.core.features.event,

+ org.eclipse.bpmn2.modeler.core.features.event.definitions,

+ org.eclipse.bpmn2.modeler.core.features.flow,

+ org.eclipse.bpmn2.modeler.core.features.gateway,

+ org.eclipse.bpmn2.modeler.core.features.lane,

+ org.eclipse.bpmn2.modeler.core.features.participant,

+ org.eclipse.bpmn2.modeler.core.merrimac,

+ org.eclipse.bpmn2.modeler.core.merrimac.clad,

+ org.eclipse.bpmn2.modeler.core.merrimac.dialogs,

+ org.eclipse.bpmn2.modeler.core.merrimac.providers,

+ org.eclipse.bpmn2.modeler.core.model,

+ org.eclipse.bpmn2.modeler.core.preferences,

+ org.eclipse.bpmn2.modeler.core.runtime,

+ org.eclipse.bpmn2.modeler.core.utils,

+ org.eclipse.bpmn2.modeler.core.validation

+Import-Package: org.eclipse.bpel.wsil.model.inspection,

+ org.eclipse.graphiti.ui.features,

+ org.eclipse.jface.preference,

+ org.eclipse.jface.util,

+ org.eclipse.jface.viewers,

+ org.eclipse.swt.graphics,

+ org.eclipse.ui,

+ org.eclipse.ui.plugin,

+ org.eclipse.ui.views.properties.tabbed,

+ org.eclipse.wst.validation

diff --git a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelSwitch.java b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelSwitch.java
index c114389..d343633 100644
--- a/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelSwitch.java
+++ b/org.eclipse.bpmn2.modeler.runtime.example/src/org/eclipse/bpmn2/modeler/runtime/example/SampleModel/util/SampleModelSwitch.java
@@ -1,11 +1,11 @@
 package org.eclipse.bpmn2.modeler.runtime.example.SampleModel.util;
 
+import java.util.List;
+
 import org.eclipse.bpmn2.modeler.runtime.example.SampleModel.*;
 
+import org.eclipse.emf.ecore.EClass;
 import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.util.Switch;
 
 /**
  * <!-- begin-user-doc -->
@@ -20,7 +20,7 @@
  * @see org.eclipse.bpmn2.modeler.runtime.example.SampleModel.SampleModelPackage
  * @generated
  */
-public class SampleModelSwitch<T> extends Switch<T> {
+public class SampleModelSwitch<T> {
 	/**
 	 * The cached model package
 	 * <!-- begin-user-doc -->
@@ -42,16 +42,14 @@
 	}
 
 	/**
-	 * Checks whether this is a switch for the given package.
+	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
-	 * @parameter ePackage the package in question.
-	 * @return whether this is a switch for the given package.
+	 * @return the first non-null result returned by a <code>caseXXX</code> call.
 	 * @generated
 	 */
-	@Override
-	protected boolean isSwitchFor(EPackage ePackage) {
-		return ePackage == modelPackage;
+	public T doSwitch(EObject theEObject) {
+		return doSwitch(theEObject.eClass(), theEObject);
 	}
 
 	/**
@@ -61,7 +59,26 @@
 	 * @return the first non-null result returned by a <code>caseXXX</code> call.
 	 * @generated
 	 */
-	@Override
+	protected T doSwitch(EClass theEClass, EObject theEObject) {
+		if (theEClass.eContainer() == modelPackage) {
+			return doSwitch(theEClass.getClassifierID(), theEObject);
+		}
+		else {
+			List<EClass> eSuperTypes = theEClass.getESuperTypes();
+			return
+				eSuperTypes.isEmpty() ?
+					defaultCase(theEObject) :
+					doSwitch(eSuperTypes.get(0), theEObject);
+		}
+	}
+
+	/**
+	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the first non-null result returned by a <code>caseXXX</code> call.
+	 * @generated
+	 */
 	protected T doSwitch(int classifierID, EObject theEObject) {
 		switch (classifierID) {
 			case SampleModelPackage.DOCUMENT_ROOT: {
@@ -116,7 +133,6 @@
 	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
 	 * @generated
 	 */
-	@Override
 	public T defaultCase(EObject object) {
 		return null;
 	}
diff --git a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF
index f47eedd..6905783 100644
--- a/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF
+++ b/org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5/META-INF/MANIFEST.MF
@@ -1,40 +1,40 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: BPMN2 Editor Runtime extensions for JBoss jBPM5
-Bundle-SymbolicName: org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5;singleton:=true
-Bundle-Version: 0.2.0.qualifier
-Bundle-Activator: org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.Activator
-Bundle-Vendor: Eclipse.org
-Require-Bundle: org.eclipse.ui.ide,
- org.eclipse.graphiti;bundle-version="0.9.0",
- org.eclipse.graphiti.ui;bundle-version="0.9.0",
- org.eclipse.bpmn2.modeler.core,
- org.eclipse.emf.transaction;bundle-version="1.4.0",
- org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.100",
- org.eclipse.gef,
- org.eclipse.bpmn2.edit,
- org.eclipse.bpmn2.editor,
- org.eclipse.jface.databinding,
- org.eclipse.emf.databinding,
- org.eclipse.emf.edit.ui,
- org.apache.xerces,
- org.eclipse.bpmn2.modeler.ui,
- org.eclipse.core.resources,
- org.eclipse.ui,
- org.eclipse.core.runtime
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5,
- org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.features,
- org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model,
- org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.impl,
- org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.util,
- org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property,
- org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters,
- org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.wid
-Import-Package: org.eclipse.bpmn2.modeler.ui,
- org.eclipse.bpmn2.modeler.ui.editor,
- org.eclipse.bpmn2.modeler.ui.features.activity.task,
- org.eclipse.bpmn2.modeler.ui.property,
- org.eclipse.bpmn2.modeler.ui.property.providers
- 
+Manifest-Version: 1.0

+Bundle-ManifestVersion: 2

+Bundle-Name: BPMN2 Editor Runtime extensions for JBoss jBPM5

+Bundle-SymbolicName: org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5;singleton:=true

+Bundle-Version: 0.2.0.qualifier

+Bundle-Activator: org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.Activator

+Bundle-Vendor: Eclipse.org

+Require-Bundle: org.eclipse.ui.ide,

+ org.eclipse.graphiti;bundle-version="0.8.2",

+ org.eclipse.graphiti.ui;bundle-version="0.8.2",

+ org.eclipse.bpmn2.modeler.core,

+ org.eclipse.emf.transaction;bundle-version="1.4.0",

+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.100",

+ org.eclipse.gef,

+ org.eclipse.bpmn2.edit,

+ org.eclipse.bpmn2.editor,

+ org.eclipse.jface.databinding,

+ org.eclipse.emf.databinding,

+ org.eclipse.emf.edit.ui,

+ org.apache.xerces,

+ org.eclipse.bpmn2.modeler.ui,

+ org.eclipse.core.resources,

+ org.eclipse.ui,

+ org.eclipse.core.runtime

+Bundle-RequiredExecutionEnvironment: JavaSE-1.6

+Bundle-ActivationPolicy: lazy

+Export-Package: org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5,

+ org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.features,

+ org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model,

+ org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.impl,

+ org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.model.util,

+ org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property,

+ org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.property.adapters,

+ org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5.wid

+Import-Package: org.eclipse.bpmn2.modeler.ui,

+ org.eclipse.bpmn2.modeler.ui.editor,

+ org.eclipse.bpmn2.modeler.ui.features.activity.task,

+ org.eclipse.bpmn2.modeler.ui.property,

+ org.eclipse.bpmn2.modeler.ui.property.providers

+ 

diff --git a/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF b/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF
index 6229800..42fe186 100644
--- a/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.bpmn2.modeler.ui/META-INF/MANIFEST.MF
@@ -1,79 +1,79 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: BPMN2 Editor UI
-Bundle-SymbolicName: org.eclipse.bpmn2.modeler.ui;singleton:=true
-Bundle-Version: 0.2.0.qualifier
-Bundle-Activator: org.eclipse.bpmn2.modeler.ui.Activator
-Bundle-Vendor: Eclipse.org
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui.ide,
- org.eclipse.osgi,
- org.eclipse.graphiti;bundle-version="0.9.0",
- org.eclipse.graphiti.ui;bundle-version="0.9.0",
- org.eclipse.bpmn2.modeler.core,
- org.eclipse.emf.transaction;bundle-version="1.4.0",
- org.eclipse.ui.views.properties.tabbed,
- org.eclipse.gef,
- org.eclipse.bpmn2.edit,
- org.eclipse.bpmn2.editor,
- org.eclipse.jface.databinding,
- org.eclipse.emf.databinding,
- org.eclipse.emf.edit.ui,
- org.eclipse.bpel.wsil.model,
- org.apache.xerces,
- org.eclipse.wst.wsdl;bundle-version="[1.1.200,2.0.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)",
- org.eclipse.xsd;bundle-version="[2.4.0,3.0.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.300,2.0.0)",
- javax.wsdl;bundle-version="[1.5.0,1.6.0)";visibility:=reexport,
- org.eclipse.wst.xsd.ui;bundle-version="[1.2.101,2.0.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.0.400,2.0.0)",
- org.eclipse.jface.text,
- org.eclipse.jdt,
- org.eclipse.jdt.core,
- org.eclipse.emf.workspace
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.bpmn2.modeler.ui,
- org.eclipse.bpmn2.modeler.ui.adapters,
- org.eclipse.bpmn2.modeler.ui.adapters.properties,
- org.eclipse.bpmn2.modeler.ui.commands,
- org.eclipse.bpmn2.modeler.ui.diagram,
- org.eclipse.bpmn2.modeler.ui.editor,
- org.eclipse.bpmn2.modeler.ui.features,
- org.eclipse.bpmn2.modeler.ui.features.activity,
- org.eclipse.bpmn2.modeler.ui.features.activity.subprocess,
- org.eclipse.bpmn2.modeler.ui.features.activity.task,
- org.eclipse.bpmn2.modeler.ui.features.artifact,
- org.eclipse.bpmn2.modeler.ui.features.choreography,
- org.eclipse.bpmn2.modeler.ui.features.conversation,
- org.eclipse.bpmn2.modeler.ui.features.data,
- org.eclipse.bpmn2.modeler.ui.features.event,
- org.eclipse.bpmn2.modeler.ui.features.event.definitions,
- org.eclipse.bpmn2.modeler.ui.features.flow,
- org.eclipse.bpmn2.modeler.ui.features.gateway,
- org.eclipse.bpmn2.modeler.ui.features.label,
- org.eclipse.bpmn2.modeler.ui.features.lane,
- org.eclipse.bpmn2.modeler.ui.features.participant,
- org.eclipse.bpmn2.modeler.ui.preferences,
- org.eclipse.bpmn2.modeler.ui.property,
- org.eclipse.bpmn2.modeler.ui.property.artifact,
- org.eclipse.bpmn2.modeler.ui.property.connectors,
- org.eclipse.bpmn2.modeler.ui.property.data,
- org.eclipse.bpmn2.modeler.ui.property.diagrams,
- org.eclipse.bpmn2.modeler.ui.property.dialogs,
- org.eclipse.bpmn2.modeler.ui.property.editors,
- org.eclipse.bpmn2.modeler.ui.property.events,
- org.eclipse.bpmn2.modeler.ui.property.gateways,
- org.eclipse.bpmn2.modeler.ui.property.providers,
- org.eclipse.bpmn2.modeler.ui.property.tasks,
- org.eclipse.bpmn2.modeler.ui.util,
- org.eclipse.bpmn2.modeler.ui.views,
- org.eclipse.bpmn2.modeler.ui.views.outline,
- org.eclipse.bpmn2.modeler.ui.wizards
-Import-Package: org.eclipse.core.expressions,
- org.eclipse.emf.workspace,
- org.eclipse.emf.workspace.util,
- org.eclipse.wst.validation
-
+Manifest-Version: 1.0

+Bundle-ManifestVersion: 2

+Bundle-Name: BPMN2 Editor UI

+Bundle-SymbolicName: org.eclipse.bpmn2.modeler.ui;singleton:=true

+Bundle-Version: 0.2.0.qualifier

+Bundle-Activator: org.eclipse.bpmn2.modeler.ui.Activator

+Bundle-Vendor: Eclipse.org

+Bundle-Localization: plugin

+Require-Bundle: org.eclipse.ui.ide,

+ org.eclipse.osgi,

+ org.eclipse.graphiti;bundle-version="0.8.2",

+ org.eclipse.graphiti.ui;bundle-version="0.8.2",

+ org.eclipse.bpmn2.modeler.core,

+ org.eclipse.emf.transaction;bundle-version="1.4.0",

+ org.eclipse.ui.views.properties.tabbed,

+ org.eclipse.gef,

+ org.eclipse.bpmn2.edit,

+ org.eclipse.bpmn2.editor,

+ org.eclipse.jface.databinding,

+ org.eclipse.emf.databinding,

+ org.eclipse.emf.edit.ui,

+ org.eclipse.bpel.wsil.model,

+ org.apache.xerces,

+ org.eclipse.wst.wsdl;bundle-version="[1.1.200,2.0.0)",

+ org.eclipse.wst.xml.core;bundle-version="[1.1.300,2.0.0)",

+ org.eclipse.xsd;bundle-version="[2.4.0,3.0.0)",

+ org.eclipse.wst.sse.ui;bundle-version="[1.1.0,2.0.0)",

+ org.eclipse.wst.sse.core;bundle-version="[1.1.300,2.0.0)",

+ javax.wsdl;bundle-version="[1.5.0,1.6.0)";visibility:=reexport,

+ org.eclipse.wst.xsd.ui;bundle-version="[1.2.101,2.0.0)",

+ org.eclipse.wst.xml.ui;bundle-version="[1.0.400,2.0.0)",

+ org.eclipse.jface.text,

+ org.eclipse.jdt,

+ org.eclipse.jdt.core,

+ org.eclipse.emf.workspace

+Bundle-RequiredExecutionEnvironment: JavaSE-1.6

+Bundle-ActivationPolicy: lazy

+Export-Package: org.eclipse.bpmn2.modeler.ui,

+ org.eclipse.bpmn2.modeler.ui.adapters,

+ org.eclipse.bpmn2.modeler.ui.adapters.properties,

+ org.eclipse.bpmn2.modeler.ui.commands,

+ org.eclipse.bpmn2.modeler.ui.diagram,

+ org.eclipse.bpmn2.modeler.ui.editor,

+ org.eclipse.bpmn2.modeler.ui.features,

+ org.eclipse.bpmn2.modeler.ui.features.activity,

+ org.eclipse.bpmn2.modeler.ui.features.activity.subprocess,

+ org.eclipse.bpmn2.modeler.ui.features.activity.task,

+ org.eclipse.bpmn2.modeler.ui.features.artifact,

+ org.eclipse.bpmn2.modeler.ui.features.choreography,

+ org.eclipse.bpmn2.modeler.ui.features.conversation,

+ org.eclipse.bpmn2.modeler.ui.features.data,

+ org.eclipse.bpmn2.modeler.ui.features.event,

+ org.eclipse.bpmn2.modeler.ui.features.event.definitions,

+ org.eclipse.bpmn2.modeler.ui.features.flow,

+ org.eclipse.bpmn2.modeler.ui.features.gateway,

+ org.eclipse.bpmn2.modeler.ui.features.label,

+ org.eclipse.bpmn2.modeler.ui.features.lane,

+ org.eclipse.bpmn2.modeler.ui.features.participant,

+ org.eclipse.bpmn2.modeler.ui.preferences,

+ org.eclipse.bpmn2.modeler.ui.property,

+ org.eclipse.bpmn2.modeler.ui.property.artifact,

+ org.eclipse.bpmn2.modeler.ui.property.connectors,

+ org.eclipse.bpmn2.modeler.ui.property.data,

+ org.eclipse.bpmn2.modeler.ui.property.diagrams,

+ org.eclipse.bpmn2.modeler.ui.property.dialogs,

+ org.eclipse.bpmn2.modeler.ui.property.editors,

+ org.eclipse.bpmn2.modeler.ui.property.events,

+ org.eclipse.bpmn2.modeler.ui.property.gateways,

+ org.eclipse.bpmn2.modeler.ui.property.providers,

+ org.eclipse.bpmn2.modeler.ui.property.tasks,

+ org.eclipse.bpmn2.modeler.ui.util,

+ org.eclipse.bpmn2.modeler.ui.views,

+ org.eclipse.bpmn2.modeler.ui.views.outline,

+ org.eclipse.bpmn2.modeler.ui.wizards

+Import-Package: org.eclipse.core.expressions,

+ org.eclipse.emf.workspace,

+ org.eclipse.emf.workspace.util,

+ org.eclipse.wst.validation

+

diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java
index b759221..f279300 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Activator.java
@@ -161,6 +161,14 @@
 	// The shared instance
 	private static Activator plugin;
 	
+	// handles changes to the bpmn file
+	private BPMN2ResourceChangeListener resourceChangeListener;
+	private ISaveParticipant saveParticipant;
+    
+	static {
+		TargetRuntime.getAllRuntimes();
+	}
+	
 	// Adapter Factory registration
 	static {
 		AdapterRegistry.INSTANCE.registerAdapterFactory(
@@ -193,6 +201,8 @@
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
 		plugin = this;
+
+		initializeResourceChangeListener();
 	}
 
 	/*
@@ -203,6 +213,11 @@
 	public void stop(BundleContext context) throws Exception {
 		plugin = null;
 		super.stop(context);
+		
+		IWorkspace workspace = ResourcesPlugin.getWorkspace();
+		if (workspace != null) {
+			workspace.removeResourceChangeListener(this.resourceChangeListener);
+		}
 	}
 
 	/**
@@ -314,4 +329,66 @@
     public ImageDescriptor getImageDescriptor(String id) {
 		return getImageRegistry().getDescriptor(id);
     }
+
+	/**
+	 * Installs the IResourceChangeListener for this Plugin. Also
+	 * checks if there were any changes to bpmn files while the plug-in
+	 * was not active.
+	 */
+	private void initializeResourceChangeListener() throws CoreException {
+		this.resourceChangeListener = new BPMN2ResourceChangeListener();
+		// Add the save participant in a separate thread
+		// to make sure that it doesn't block the UI thread and potentially cause
+		// deadlocks with the code that caused our plugin to be started.
+		Thread initSaveParticipantThread = new Thread(new Runnable() {
+			@Override
+			public void run() {
+				try {
+					IWorkspace workspace = ResourcesPlugin.getWorkspace();
+					workspace.addResourceChangeListener(Activator.this.resourceChangeListener, IResourceChangeEvent.POST_BUILD);
+					ISavedState savedState = workspace.addSaveParticipant("BPMN2 Modeler", getSaveParticipant());
+					if (savedState != null) {
+						savedState.processResourceChangeEvents(Activator.this.resourceChangeListener);
+					}
+				} catch (CoreException e) {
+					throw new RuntimeException(e);
+				}
+			}
+		});
+		initSaveParticipantThread.setName("BPMN2 Modeler plugin init"); //$NON-NLS-1$
+		initSaveParticipantThread.start();
+	}
+
+	/**
+	 * We are only interested in the resource delta while the plugin was
+	 * not active and don't really care about the plug-in save lifecycle.
+	 */
+	private ISaveParticipant getSaveParticipant() {
+		if (this.saveParticipant == null) {
+			this.saveParticipant = new ISaveParticipant() {
+				@Override
+				public void doneSaving(ISaveContext context) {
+				}
+				@Override
+				public void prepareToSave(ISaveContext context) throws CoreException {
+				}
+				@Override
+				public void rollback(ISaveContext context) {
+				}
+				@Override
+				public void saving(ISaveContext context) throws CoreException {
+					context.needDelta();
+				}
+			};
+		}
+		return this.saveParticipant;
+	}
+
+	/**
+	 * Returns the resource change listener.
+	 */
+	public BPMN2ResourceChangeListener getResourceChangeListener() {
+		return this.resourceChangeListener;
+	}
+
 }
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/BPMN2ResourceChangeListener.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/BPMN2ResourceChangeListener.java
new file mode 100644
index 0000000..1cca90a
--- /dev/null
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/BPMN2ResourceChangeListener.java
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ *  All rights reserved.
+ * This program is 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:
+ * Red Hat, Inc. - initial API and implementation
+ *
+ * @author Bob Brodt
+ ******************************************************************************/
+
+package org.eclipse.bpmn2.modeler.ui;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * @author Bob Brodt
+ *
+ */
+public class BPMN2ResourceChangeListener implements IResourceChangeListener {
+
+	class ResourceDeltaVisitor implements IResourceDeltaVisitor {
+
+		public boolean visit(final IResourceDelta delta) throws CoreException {
+			IResource target = delta.getResource();
+//			switch (delta.getKind()) {
+//			case IResourceDelta.ADDED:
+//				System.out.println(target.getFullPath()+" ADDED");
+//				break;
+//			case IResourceDelta.CHANGED:
+//				System.out.println(target.getFullPath()+" CHANGED");
+//				break;
+//			case IResourceDelta.REMOVED:
+//				System.out.println(target.getFullPath()+" REMOVED");
+//				break;
+//			case IResourceDelta.ADDED_PHANTOM:
+//				System.out.println(target.getFullPath()+" ADDED_PHANTOM");
+//				break;
+//			}
+			if (target.getType() == IResource.FILE) {
+				handleFile(delta);
+			}
+			return true;
+		}
+
+		private void handleFile(final IResourceDelta delta)
+			throws CoreException {
+			IWorkspaceRunnable runnable = new IWorkspaceRunnable() {
+				public void run(IProgressMonitor monitor)
+					throws CoreException {
+					IFile target = (IFile) delta.getResource();
+					int flags = delta.getFlags();
+					
+					switch (delta.getKind()) {
+					case IResourceDelta.ADDED:
+						if ((flags & IResourceDelta.MOVED_FROM) != 0) {
+							if (target.exists())
+								fileMoved(delta.getMovedFromPath(), target.getFullPath());
+						}
+						break;
+					case IResourceDelta.REMOVED:
+						if ((flags & IResourceDelta.MOVED_TO) != 0) {
+							if (target.exists())
+								fileMoved(target.getFullPath(), delta.getMovedToPath());
+						} else {
+							fileDeleted(target.getFullPath(), monitor);
+						}
+						break;
+					}
+				}
+			};
+			ResourcesPlugin.getWorkspace().run(runnable, null);
+		}
+	}
+
+	protected IResourceDeltaVisitor visitor;
+	protected List<IFileChangeListener> listeners;
+
+	public BPMN2ResourceChangeListener() {
+		listeners = new ArrayList<IFileChangeListener>();
+	}
+
+	/**
+	 * Objects like the BPELEditor can add listeners so they can be
+	 * notified and react when BPEL files change.
+	 */
+	public void addListener(IFileChangeListener listener) {
+		listeners.add(listener);
+	}
+	
+	/**
+	 * Removed the listener.
+	 */
+	public void removeListener(IFileChangeListener listener) {
+		listeners.remove(listener);
+	}
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
+	 */
+	@Override
+	public void resourceChanged(IResourceChangeEvent event) {
+		try {
+			event.getDelta().accept(getResourceDeltaVisitor());
+		} catch (CoreException e) {
+			Activator.logError(e);
+		}
+	}
+
+	protected IResourceDeltaVisitor getResourceDeltaVisitor() {
+		if (visitor == null) {
+			visitor = new ResourceDeltaVisitor();
+		}
+		return visitor;
+	}
+
+	protected void fileMoved(IPath oldFilePath, IPath newFilePath) throws CoreException {
+		// notify listeners
+		// make a copy of listener list to avoid concurrent list modification
+		List<IFileChangeListener> l = new ArrayList<IFileChangeListener>();
+		l.addAll(listeners);
+		for (IFileChangeListener listener : l) {
+			listener.moved(oldFilePath, newFilePath);
+		}
+	}
+	
+	protected void fileDeleted(IPath filePath, IProgressMonitor monitor) throws CoreException {
+		// notify listeners
+		// make a copy of listener list to avoid concurrent list modification
+		List<IFileChangeListener> l = new ArrayList<IFileChangeListener>();
+		l.addAll(listeners);
+		for (IFileChangeListener listener : l) {
+			listener.deleted(filePath);
+		}
+	}
+}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java
index 79042b0..6461592 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInput.java
@@ -18,7 +18,6 @@
 import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.transaction.TransactionalEditingDomain;
 import org.eclipse.graphiti.ui.editor.DiagramEditorInput;
-import org.eclipse.graphiti.ui.editor.DiagramEditorInputFactory;
 import org.eclipse.ui.IMemento;
 import org.eclipse.ui.part.FileEditorInput;
 
@@ -33,10 +32,12 @@
 	private String targetNamespace;
 	private BPMNDiagram bpmnDiagram;
 	private URI modelUri;
+	private URI diagramUri;
 	
-	public Bpmn2DiagramEditorInput(URI modelUri, URI diagramUri, String providerId) {
-		super(diagramUri, providerId);
+	public Bpmn2DiagramEditorInput(URI modelUri, URI diagramUri, TransactionalEditingDomain domain, String providerId) {
+		super(diagramUri.appendFragment("/0"), domain, providerId);
 		this.modelUri = modelUri;
+		this.diagramUri = diagramUri;
 	}
 	
 	public Bpmn2DiagramType getInitialDiagramType() {
@@ -58,7 +59,11 @@
 	public URI  getModelUri() {
 		return modelUri;
 	}
-	
+
+	public URI  getUri() {
+		return diagramUri;
+	}
+
 	public String getToolTipText() {
 		return modelUri.toPlatformString(true);
 	}
@@ -71,8 +76,8 @@
 		if (diagramFileUri.isPlatformResource()) {
 			modelUri = diagramFileUri;
 		}
-		else
-			super.updateUri(diagramFileUri);
+//		else
+//			super.updateUri(diagramFileUri);
 	}
 	
 	@Override
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java
index 8acffa3..f82bd89 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/Bpmn2DiagramEditorInputFactory.java
@@ -1,12 +1,21 @@
 package org.eclipse.bpmn2.modeler.ui;
 
+import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceSetImpl;
+import org.eclipse.core.commands.operations.DefaultOperationHistory;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
+import org.eclipse.emf.workspace.IWorkspaceCommandStack;
+import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
+import org.eclipse.graphiti.ui.editor.DiagramEditorFactory;
 import org.eclipse.graphiti.ui.editor.DiagramEditorInput;
-import org.eclipse.graphiti.ui.editor.DiagramEditorInputFactory;
+import org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl;
 import org.eclipse.ui.IMemento;
 
-public class Bpmn2DiagramEditorInputFactory extends DiagramEditorInputFactory {
+public class Bpmn2DiagramEditorInputFactory extends DiagramEditorFactory {
 
 	public IAdaptable createElement(IMemento memento) {
 		// get diagram URI
@@ -23,6 +32,17 @@
 		final String providerID = memento.getString(DiagramEditorInput.KEY_PROVIDER_ID);
 		URI modelUri = URI.createURI(modelUriString);
 		URI diagramUri = URI.createURI(diagramUriString);
-		return new Bpmn2DiagramEditorInput(modelUri, diagramUri, providerID);
+		TransactionalEditingDomain domain = createResourceSetAndEditingDomain();
+		return new Bpmn2DiagramEditorInput(modelUri, diagramUri, domain, providerID);
+	}
+	
+	public static TransactionalEditingDomain createResourceSetAndEditingDomain() {
+		final ResourceSet resourceSet = new Bpmn2ModelerResourceSetImpl();
+		final IWorkspaceCommandStack workspaceCommandStack = new GFWorkspaceCommandStackImpl(new DefaultOperationHistory());
+
+		final TransactionalEditingDomainImpl editingDomain = new TransactionalEditingDomainImpl(new ComposedAdapterFactory(
+				ComposedAdapterFactory.Descriptor.Registry.INSTANCE), workspaceCommandStack, resourceSet);
+		WorkspaceEditingDomainFactory.INSTANCE.mapResourceSet(editingDomain);
+		return editingDomain;
 	}
 }
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
index 927d7dd..4fac436 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2Editor.java
@@ -96,7 +96,7 @@
 import org.eclipse.bpmn2.modeler.core.validation.BPMN2ProjectValidator;
 import org.eclipse.bpmn2.modeler.core.validation.BPMN2ValidationStatusLoader;
 import org.eclipse.bpmn2.modeler.ui.Activator;
-import org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInput;
+import org.eclipse.bpmn2.modeler.ui.IFileChangeListener;
 import org.eclipse.bpmn2.modeler.ui.property.artifact.CategoryDetailComposite;
 import org.eclipse.bpmn2.modeler.ui.property.artifact.TextAnnotationDetailComposite;
 import org.eclipse.bpmn2.modeler.ui.property.connectors.MessageFlowDetailComposite;
@@ -142,9 +142,11 @@
 import org.eclipse.bpmn2.modeler.ui.property.tasks.TaskDetailComposite;
 import org.eclipse.bpmn2.modeler.ui.views.outline.BPMN2EditorOutlinePage;
 import org.eclipse.bpmn2.modeler.ui.wizards.BPMN2DiagramCreator;
+import org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInput;
 import org.eclipse.bpmn2.modeler.ui.wizards.FileService;
 import org.eclipse.bpmn2.util.Bpmn2ResourceImpl;
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
@@ -175,8 +177,6 @@
 import org.eclipse.graphiti.mm.pictograms.PictogramElement;
 import org.eclipse.graphiti.services.Graphiti;
 import org.eclipse.graphiti.services.IPeService;
-import org.eclipse.graphiti.ui.editor.DefaultPersistencyBehavior;
-import org.eclipse.graphiti.ui.editor.DefaultUpdateBehavior;
 import org.eclipse.graphiti.ui.editor.DiagramEditor;
 import org.eclipse.graphiti.ui.editor.DiagramEditorInput;
 import org.eclipse.graphiti.ui.internal.editor.GFPaletteRoot;
@@ -189,6 +189,7 @@
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
 import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
 import org.eclipse.ui.IPartListener2;
 import org.eclipse.ui.IStorageEditorInput;
 import org.eclipse.ui.IWorkbench;
@@ -296,6 +297,7 @@
 	protected BPMNDiagram bpmnDiagram;
 	protected Bpmn2ResourceImpl bpmnResource;
 	
+	private IFileChangeListener fileChangeListener;
 	private IWorkbenchListener workbenchListener;
 	private IPartListener2 selectionListener;
     private IResourceChangeListener markerChangeListener;
@@ -383,6 +385,7 @@
 		super.init(site, input);
 		
 		addSelectionListener();
+		addFileChangeListener();
 		addMarkerChangeListener();
 	}
 	
@@ -400,16 +403,6 @@
 			return false;
 		return super.isDirty();
 	}
-	
-	@Override
-	protected DefaultUpdateBehavior createUpdateBehavior() {
-		return new BPMN2EditorUpdateBehavior(this);
-	}
-	
-    @Override
-    protected DefaultPersistencyBehavior createPersistencyBehavior() {
-    	return new BPMN2PersistencyBehavior(this);
-    }
     
 	public Bpmn2Preferences getPreferences() {
 		if (preferences==null) {
@@ -487,7 +480,7 @@
 	private void saveModelFile() {
 		modelHandler.save();
 		((BasicCommandStack) getEditingDomain().getCommandStack()).saveIsDone();
-		updateDirtyState();
+		firePropertyChange(IEditorPart.PROP_DIRTY);
 	}
 
 	@Override
@@ -719,7 +712,36 @@
 		String name = getEditorInput().getName();
 		setPartName(URI.decode(name));
 	}
+	
+	private void addFileChangeListener() {
+		if (fileChangeListener==null) {
+			fileChangeListener = new IFileChangeListener() {
+				public void deleted(IPath filePath) {
+					// close the editor if either the dummy diagramfile (in the .bpmn2 folder)
+					// or the model file is deleted
+					if (filePath.equals(getModelPath())) {
+						// Close the editor.
+						closeEditor();
+					}
+				}
+				public void moved(IPath oldFilePath, IPath newFilePath) {
+					// handle file move/rename after the fact (i.e. newFile now exists, old file does not)
+					if (oldFilePath.equals(getModelPath())) {
+						reopenEditor(newFilePath);
+					}
+				}
+			};
+			Activator.getDefault().getResourceChangeListener().addListener(fileChangeListener);
+		}
+	}
 
+	private void removeFileChangeListener() {
+		if (fileChangeListener!=null) {
+			Activator.getDefault().getResourceChangeListener().removeListener(fileChangeListener);
+			fileChangeListener = null;
+		}
+	}
+	
 	public BPMN2EditingDomainListener getEditingDomainListener() {
 		if (editingDomainListener==null) {
 			TransactionalEditingDomainImpl editingDomain = (TransactionalEditingDomainImpl)getEditingDomain();
@@ -794,6 +816,7 @@
 		
 		getResourceSet().eAdapters().remove(getEditorAdapter());
 		removeSelectionListener();
+		removeFileChangeListener();
 		if (instances==0)
 			setActiveEditor(null);
 		
@@ -865,7 +888,7 @@
 
 		// Tell the DTP about the new Diagram
 		getDiagramTypeProvider().resourceReloaded(diagram);
-		getRefreshBehavior().initRefresh();
+//		getRefreshBehavior().initRefresh();
 		setPictogramElementsForSelection(null);
 		// set Diagram as contents for the graphical viewer and refresh
 		getGraphicalViewer().setContents(diagram);
@@ -958,6 +981,31 @@
 			}
 		});
 	}
+	
+	protected void reopenEditor(final IPath newFilePath) {
+		Display display = getSite().getShell().getDisplay();
+		display.syncExec(new Runnable() {
+			public void run() {
+				boolean closed = getSite().getPage().closeEditor(BPMN2Editor.this, false);
+				if (!closed){
+					// If close editor fails, try again with explicit editorpart 
+					// of the old file
+					IFile oldFile = ResourcesPlugin.getWorkspace().getRoot().getFile(getModelPath());
+					IEditorPart editorPart = ResourceUtil.findEditor(getSite().getPage(), oldFile);
+					closed = getSite().getPage().closeEditor(editorPart, false);
+				}
+				if (closed) {
+					IFile renamedFile = ResourcesPlugin.getWorkspace().getRoot().getFile(newFilePath);
+					try {
+						getSite().getPage().openEditor(new FileEditorInput(renamedFile), EDITOR_ID);
+					} catch (PartInitException e) {
+						Status status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
+						ErrorUtils.showErrorWithLogging(status);
+					}
+				}
+			}
+		});
+	}
 
 	// Show error dialog and log the error
 	private void showErrorDialogWithLogging(Exception e) {
@@ -966,44 +1014,6 @@
 	}
 
 	////////////////////////////////////////////////////////////////////////////////
-	// WorkspaceSynchronizer handlers called from delegate
-	////////////////////////////////////////////////////////////////////////////////
-	
-	public boolean handleResourceChanged(Resource resource) {
-		return true;
-	}
-
-	public boolean handleResourceDeleted(Resource resource) {
-		closeEditor();
-		return true;
-	}
-
-	public boolean handleResourceMoved(Resource resource, URI newURI) {
-		URI oldURI = resource.getURI();
-		resource.setURI(newURI);
-		
-		if (modelUri.equals(oldURI)) {
-			ModelHandlerLocator.remove(modelUri);
-			modelUri = newURI;
-			if (preferences!=null) {
-				preferences.getGlobalPreferences().removePropertyChangeListener(this);
-				preferences.dispose();
-				preferences = null;
-			}
-			targetRuntime = null;
-			modelHandler = ModelHandlerLocator.createModelHandler(modelUri, (Bpmn2ResourceImpl)resource);
-			ModelHandlerLocator.put(diagramUri, modelHandler);
-		}
-		else if (diagramUri.equals(oldURI)) {
-			ModelHandlerLocator.remove(diagramUri);
-			diagramUri = newURI;
-			ModelHandlerLocator.put(diagramUri, modelHandler);
-		}
-
-		return true;
-	}
-	
-	////////////////////////////////////////////////////////////////////////////////
 	// Other handlers
 	////////////////////////////////////////////////////////////////////////////////
 
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java
deleted file mode 100644
index 87e983e..0000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2EditorUpdateBehavior.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc.
- *  All rights reserved.
- * This program is 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:
- * Red Hat, Inc. - initial API and implementation
- *
- * @author Bob Brodt
- ******************************************************************************/
-
-package org.eclipse.bpmn2.modeler.ui.editor;
-
-import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceSetImpl;
-import org.eclipse.bpmn2.modeler.core.validation.ValidationStatusAdapterFactory;
-import org.eclipse.core.commands.operations.DefaultOperationHistory;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl;
-import org.eclipse.emf.workspace.IWorkspaceCommandStack;
-import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
-import org.eclipse.graphiti.ui.editor.DefaultUpdateBehavior;
-import org.eclipse.graphiti.ui.editor.DiagramEditor;
-import org.eclipse.graphiti.ui.editor.IDiagramEditorInput;
-import org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
-
-/**
- * This overrides the DefaultUpdateBehavior provider class from Graphiti. This
- * is necessary because we want to provide our own ResourceSet implementation
- * instead of being forced to deal with the default ResourceSetImpl. See
- * createResourceSetAndEditingDomain() for details.
- * 
- * @author Bob Brodt
- * 
- */
-public class BPMN2EditorUpdateBehavior extends DefaultUpdateBehavior {
-
-	private TransactionalEditingDomain editingDomain;
-	private WorkspaceSynchronizer workspaceSynchronizer;
-
-	/**
-	 * @param diagramEditor
-	 */
-	public BPMN2EditorUpdateBehavior(DiagramEditor diagramEditor) {
-		super(diagramEditor);
-	}
-
-	public TransactionalEditingDomain getEditingDomain() {
-		if (editingDomain == null)
-			createEditingDomain();
-		return editingDomain;
-	}
-
-	@Override
-	public void createEditingDomain() {
-		if (editingDomain == null) {
-			editingDomain = createResourceSetAndEditingDomain();
-			initializeEditingDomain(editingDomain);
-		}
-	}
-
-	public TransactionalEditingDomain createResourceSetAndEditingDomain() {
-		// Argh!! This is the ONLY line of code that actually differs
-		// (significantly) from
-		// the Graphiti EMF Service. Here we want to substitute our own
-		// Bpmn2ModelerResourceSetImpl instead of using a ResourceSetImpl.
-		final ResourceSet resourceSet = new Bpmn2ModelerResourceSetImpl();
-		final IWorkspaceCommandStack workspaceCommandStack = new GFWorkspaceCommandStackImpl(
-				new DefaultOperationHistory());
-
-		final TransactionalEditingDomainImpl editingDomain = new TransactionalEditingDomainImpl(
-				new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE),
-				workspaceCommandStack, resourceSet);
-		WorkspaceEditingDomainFactory.INSTANCE.mapResourceSet(editingDomain);
-		return editingDomain;
-	}
-	
-	protected void initializeEditingDomain(TransactionalEditingDomain domain) {
-		// we want first crack at these notifications!
-		workspaceSynchronizer = new WorkspaceSynchronizer(getEditingDomain(),
-				new BPMN2EditorWorkspaceSynchronizerDelegate(diagramEditor));
-		super.initializeEditingDomain(domain);
-	}
-	
-	public void dispose() {
-		super.dispose();
-		workspaceSynchronizer.dispose();
-	}
-	
-	public class BPMN2EditorWorkspaceSynchronizerDelegate implements WorkspaceSynchronizer.Delegate {
-
-		private BPMN2Editor bpmnEditor;
-
-		/**
-		 * The DiagramEditorBehavior reacts on a setResourceChanged(true) if he gets
-		 * activated.
-		 */
-		public BPMN2EditorWorkspaceSynchronizerDelegate(DiagramEditor diagramEditor) {
-			this.bpmnEditor = (BPMN2Editor)diagramEditor;
-		}
-
-		public void dispose() { 
-			bpmnEditor = null;
-		}
-
-		public boolean handleResourceChanged(Resource resource) {
-			return bpmnEditor.handleResourceChanged(resource);
-		}
-
-		public boolean handleResourceDeleted(Resource resource) {
-			return bpmnEditor.handleResourceDeleted(resource);
-		}
-
-		public boolean handleResourceMoved(Resource resource, URI newURI) {
-			return bpmnEditor.handleResourceMoved(resource, newURI);
-		}
-
-	}}
\ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java
deleted file mode 100644
index eb67efd..0000000
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/BPMN2PersistencyBehavior.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011, 2012 Red Hat, Inc. 
- * All rights reserved. 
- * This program is 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: 
- * Red Hat, Inc. - initial API and implementation 
- *******************************************************************************/
-package org.eclipse.bpmn2.modeler.ui.editor;
-
-import java.util.Arrays;
-
-import org.eclipse.bpmn2.modeler.core.validation.BPMN2ProjectValidator;
-import org.eclipse.bpmn2.modeler.core.validation.BPMN2ValidationStatusLoader;
-import org.eclipse.bpmn2.modeler.ui.Activator;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.graphiti.mm.pictograms.Diagram;
-import org.eclipse.graphiti.ui.editor.DefaultPersistencyBehavior;
-import org.eclipse.graphiti.ui.editor.DiagramEditor;
-
-public class BPMN2PersistencyBehavior extends DefaultPersistencyBehavior {
-
-	BPMN2Editor editor;
-	
-	public BPMN2PersistencyBehavior(DiagramEditor diagramEditor) {
-		super(diagramEditor);
-		editor = (BPMN2Editor)diagramEditor;
-	}
-    @Override
-    public Diagram loadDiagram(URI modelUri) {
-    	Diagram diagram = super.loadDiagram(modelUri);
-
-    	return diagram;
-    }
-
-}
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
index 2ffb869..13af940 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/editor/DesignEditor.java
@@ -430,7 +430,7 @@
 
 	@Override
 	protected ContextMenuProvider createContextMenuProvider() {
-		return new DiagramEditorContextMenuProvider(getGraphicalViewer(), getActionRegistry(), getDiagramTypeProvider()) {
+		return new DiagramEditorContextMenuProvider(getGraphicalViewer(), getActionRegistry(), getConfigurationProvider()) {
 			@Override
 			public void buildContextMenu(IMenuManager manager) {
 				super.buildContextMenu(manager);
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java
index a7e1054..a5287df 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/BPMN2DiagramCreator.java
@@ -59,7 +59,7 @@
 		TransactionalEditingDomain domain = FileService.createEmfFileForDiagram(diagramUri, diagram, diagramEditor);
 
 		String providerId = GraphitiUi.getExtensionManager().getDiagramTypeProviderId(diagram.getDiagramTypeId());
-		final Bpmn2DiagramEditorInput editorInput = new Bpmn2DiagramEditorInput(modelUri, diagramUri, providerId);
+		final Bpmn2DiagramEditorInput editorInput = new Bpmn2DiagramEditorInput(modelUri, diagramUri, domain, providerId);
 		editorInput.setInitialDiagramType(diagramType);
 		editorInput.setTargetNamespace(targetNamespace);
 
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java
index eab3035..686c62c 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/wizards/FileService.java
@@ -31,6 +31,7 @@
 import org.eclipse.bpmn2.modeler.core.model.Bpmn2ModelerResourceSetImpl;
 import org.eclipse.bpmn2.modeler.ui.Activator;
 import org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInput;
+import org.eclipse.bpmn2.modeler.ui.Bpmn2DiagramEditorInputFactory;
 import org.eclipse.bpmn2.modeler.ui.editor.BPMN2Editor;
 import org.eclipse.core.commands.operations.DefaultOperationHistory;
 import org.eclipse.core.resources.IFile;
@@ -59,6 +60,7 @@
 import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
 import org.eclipse.emf.workspace.WorkspaceEditingDomainFactory;
 import org.eclipse.graphiti.mm.pictograms.Diagram;
+import org.eclipse.graphiti.ui.editor.DiagramEditorFactory;
 import org.eclipse.emf.workspace.IWorkspaceCommandStack;
 import org.eclipse.graphiti.ui.editor.DiagramEditorInput;
 import org.eclipse.graphiti.ui.internal.editor.GFWorkspaceCommandStackImpl;
@@ -68,24 +70,15 @@
 import org.eclipse.ui.part.FileEditorInput;
 
 public class FileService {
-
+	
 	public static TransactionalEditingDomain createEmfFileForDiagram(URI diagramResourceUri, final Diagram diagram, BPMN2Editor diagramEditor) {
 
 		ResourceSet resourceSet = null;
 		TransactionalEditingDomain editingDomain = null;
-		if (diagramEditor==null) {
-			// Create a resource set and EditingDomain
-			resourceSet = new Bpmn2ModelerResourceSetImpl();
-			editingDomain = TransactionUtil.getEditingDomain(resourceSet);
-			if (editingDomain == null) {
-				// Not yet existing, create one
-				editingDomain = TransactionalEditingDomain.Factory.INSTANCE.createEditingDomain(resourceSet);
-			}
-		}
-		else {
-			editingDomain = diagramEditor.getEditingDomain();
-			resourceSet = diagramEditor.getResourceSet();
-		}
+		
+		// Create a resource set and EditingDomain
+		editingDomain = Bpmn2DiagramEditorInputFactory.createResourceSetAndEditingDomain();
+		resourceSet = editingDomain.getResourceSet();
 		
 		// Create a resource for this file.
 		final Resource resource = resourceSet.createResource(diagramResourceUri);
diff --git a/org.eclipse.bpmn2.modeler.updatesite.feature/associate.properties b/org.eclipse.bpmn2.modeler.updatesite.feature/associate.properties
index 315c72c..73cea5f 100644
--- a/org.eclipse.bpmn2.modeler.updatesite.feature/associate.properties
+++ b/org.eclipse.bpmn2.modeler.updatesite.feature/associate.properties
@@ -11,4 +11,4 @@
 # associate site(s) - use comma to separate list - to add to the resulting repo 
 # TODO: change bpmn2 metamodel download location as soon as an official update site is available
 # https://hudson.eclipse.org/hudson/job/bpmn2-nightly/ws/org.eclipse.bpmn2.site/target/site/ should point to an download.eclipse.org update site 
-associate.sites=http://download.eclipse.org/graphiti/updates/0.9.0/,https://hudson.eclipse.org/hudson/job/bpmn2-nightly/lastSuccessfulBuild/artifact/org.eclipse.bpmn2.site/target/site/,http://download.eclipse.org/bpmn2-modeler/site/,http://download.eclipse.org/bpel/site/,http://download.eclipse.org/releases/indigo,http://download.eclipse.org/eclipse/updates/3.7
+associate.sites=http://download.eclipse.org/graphiti/updates/0.8.2/,https://hudson.eclipse.org/hudson/job/bpmn2-nightly/lastSuccessfulBuild/artifact/org.eclipse.bpmn2.site/target/site/,http://download.eclipse.org/bpmn2-modeler/site/,http://download.eclipse.org/bpel/site/,http://download.eclipse.org/releases/helios,http://download.eclipse.org/eclipse/updates/3.6
diff --git a/pom.xml b/pom.xml
index fa08e83..4d59ad3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,263 +1,263 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-
-	<prerequisites>
-		<maven>3.0</maven>
-	</prerequisites>
-
-	<groupId>org.eclipse.bpmn2.modeler</groupId>
-	<artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>
-	<version>0.2.0-SNAPSHOT</version>
-	<packaging>pom</packaging>
-
-	<name>BPMN2 Modeler Parent</name>
-	<description>Parent POM for the Eclipse BPMN2 Modeler Project</description>
-
-	<licenses>
-		<license>
-			<name>Eclipse Public License v1.0</name>
-			<comments>
-       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.htm
-      </comments>
-		</license>
-	</licenses>
-
-	<properties>
-		<tycho-version>0.13.0</tycho-version>
-	</properties>
-
-	<profiles>
-		<profile>
-			<id>platform-helios</id>
-			<activation>
-				<property>
-					<name>platform-version-name</name>
-					<value>helios</value>
-				</property>
-			</activation>
-			<properties>
-				<eclipse-site>http://download.eclipse.org/releases/helios</eclipse-site>
-				<platform-version>[3.6,3.7)</platform-version>
-			</properties>
-		</profile>
-		<profile>
-			<id>platform-indigo</id>
-			<activation>
-				<property>
-					<name>platform-version-name</name>
-					<value>indigo</value>
-				</property>
-			</activation>
-			<properties>
-				<eclipse-site>http://download.eclipse.org/releases/indigo</eclipse-site>
-				<platform-version>[3.7,3.8)</platform-version>
-			</properties>
-		</profile>
-		<profile>
-			<id>platform-juno</id>
-			<activation>
-				<property>
-					<name>platform-version-name</name>
-					<value>juno</value>
-				</property>
-			</activation>
-			<properties>
-				<eclipse-site>http://download.eclipse.org/releases/juno</eclipse-site>
-				<platform-version>[4.2,4.3)</platform-version>
-			</properties>
-		</profile>
-	</profiles>
-
-	<modules>
-		<module>org.eclipse.bpmn2.modeler.core</module>
-		<module>org.eclipse.bpmn2.modeler.ui</module>
-		<module>org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5</module>
-		<module>org.eclipse.bpmn2.modeler.runtime.example</module>
-		<module>org.eclipse.bpmn2.modeler.feature</module>
-		<module>org.eclipse.bpmn2.modeler.jboss.runtime.feature</module>
-		<module>org.eclipse.bpmn2.modeler.examples.feature</module>
-		<module>org.eclipse.bpmn2.modeler.updatesite.feature</module>
-	</modules>
-
-	<repositories>
-		<repository>
-			<id>eclipse-platform</id>
-			<layout>p2</layout>
-			<url>${eclipse-site}</url>
-		</repository>
-
-		<repository>
-			<id>eclipse-bpmn2</id>
-			<!--  TODO: change this when BPMN2 metamodel finds a permanent home -->
-			<url>https://hudson.eclipse.org/hudson/job/bpmn2-nightly/lastSuccessfulBuild/artifact/org.eclipse.bpmn2.site/target/site/</url>
-			<layout>p2</layout>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-		</repository>
-
-		<repository>
-			<id>eclipse-bpel</id>
-			<url>http://download.eclipse.org/bpel/site/1.0.2</url>
-			<layout>p2</layout>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-		</repository>
-
-		<repository>
-			<id>eclipse-graphiti</id>
-			<url>http://download.eclipse.org/graphiti/updates/0.9.0</url>
-			<layout>p2</layout>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-		</repository>
-
-		<repository>
-			<id>eclipse-emf</id>
-			<url>http://download.eclipse.org/modeling/emf/updates/releases/</url>
-			<layout>p2</layout>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-		</repository>
-
-		<repository>
-			<id>eclipse-gef</id>
-			<url>http://download.eclipse.org/tools/gef/updates/releases/</url>
-			<layout>p2</layout>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-		</repository>
-
-	</repositories>
-
-	<pluginRepositories>
-		<pluginRepository>
-			<!-- need maven-findbugs-2.3.2-SNAPSHOT, see http://jira.codehaus.org/browse/MFINDBUGS-122 
-				remove this when this version is released -->
-			<id>codehaus.snapshots</id>
-			<url>http://snapshots.repository.codehaus.org/</url>
-		</pluginRepository>
-	</pluginRepositories>
-
-	<build>
-		<plugins>
-			<plugin>
-				<groupId>org.eclipse.tycho</groupId>
-				<artifactId>tycho-maven-plugin</artifactId>
-				<version>${tycho-version}</version>
-				<extensions>true</extensions>
-			</plugin>
-			<plugin>
-				<groupId>org.eclipse.tycho</groupId>
-				<artifactId>target-platform-configuration</artifactId>
-				<version>${tycho-version}</version>
-				<configuration>
-					<resolver>p2</resolver>
-				</configuration>
-			</plugin>
-		</plugins>
-		<pluginManagement>
-			<plugins>
-				<plugin>
-					<groupId>org.eclipse.tycho</groupId>
-					<artifactId>maven-osgi-compiler-plugin</artifactId>
-					<version>${tycho-version}</version>
-					<configuration>
-						<encoding>UTF-8</encoding>
-					</configuration>
-				</plugin>
-				<plugin>
-					<!-- TODO remove workaround when https://issues.sonatype.org/browse/TYCHO-473 
-						is fixed -->
-					<groupId>org.eclipse.tycho</groupId>
-					<artifactId>maven-osgi-source-plugin</artifactId>
-					<version>${tycho-version}</version>
-					<executions>
-						<execution>
-							<id>attach-source</id>
-							<phase>process-classes</phase>
-							<goals>
-								<goal>plugin-source</goal>
-							</goals>
-						</execution>
-					</executions>
-				</plugin>
-				<plugin>
-					<groupId>org.apache.maven.plugins</groupId>
-					<artifactId>maven-resources-plugin</artifactId>
-					<version>2.4.1</version>
-					<configuration>
-						<encoding>ISO-8859-1</encoding>
-					</configuration>
-				</plugin>
-				<plugin>
-					<groupId>org.apache.maven.plugins</groupId>
-					<artifactId>maven-antrun-plugin</artifactId>
-					<version>1.3</version>
-				</plugin>
-				<plugin>
-					<groupId>org.codehaus.mojo</groupId>
-					<artifactId>findbugs-maven-plugin</artifactId>
-					<version>2.3.2-SNAPSHOT</version>
-					<configuration>
-						<findbugsXmlOutput>true</findbugsXmlOutput>
-						<failOnError>false</failOnError>
-					</configuration>
-					<executions>
-						<execution>
-							<goals>
-								<goal>check</goal>
-							</goals>
-						</execution>
-					</executions>
-				</plugin>
-				<plugin>
-					<groupId>org.apache.maven.plugins</groupId>
-					<artifactId>maven-pmd-plugin</artifactId>
-					<version>2.5</version>
-					<configuration>
-						<sourceEncoding>utf-8</sourceEncoding>
-						<minimumTokens>100</minimumTokens>
-						<targetJdk>1.5</targetJdk>
-						<format>xml</format>
-						<failOnViolation>false</failOnViolation>
-					</configuration>
-					<executions>
-						<execution>
-							<goals>
-								<goal>cpd-check</goal>
-							</goals>
-						</execution>
-					</executions>
-				</plugin>
-			</plugins>
-		</pluginManagement>
-	</build>
-
-
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

+	<modelVersion>4.0.0</modelVersion>

+

+	<prerequisites>

+		<maven>3.0</maven>

+	</prerequisites>

+

+	<groupId>org.eclipse.bpmn2.modeler</groupId>

+	<artifactId>org.eclipse.bpmn2.modeler.parent</artifactId>

+	<version>0.2.0-SNAPSHOT</version>

+	<packaging>pom</packaging>

+

+	<name>BPMN2 Modeler Parent</name>

+	<description>Parent POM for the Eclipse BPMN2 Modeler Project</description>

+

+	<licenses>

+		<license>

+			<name>Eclipse Public License v1.0</name>

+			<comments>

+       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.htm

+      </comments>

+		</license>

+	</licenses>

+

+	<properties>

+		<tycho-version>0.13.0</tycho-version>

+	</properties>

+

+	<profiles>

+		<profile>

+			<id>platform-helios</id>

+			<activation>

+				<property>

+					<name>platform-version-name</name>

+					<value>helios</value>

+				</property>

+			</activation>

+			<properties>

+				<eclipse-site>http://download.eclipse.org/releases/helios</eclipse-site>

+				<platform-version>[3.6,3.7)</platform-version>

+			</properties>

+		</profile>

+		<profile>

+			<id>platform-indigo</id>

+			<activation>

+				<property>

+					<name>platform-version-name</name>

+					<value>indigo</value>

+				</property>

+			</activation>

+			<properties>

+				<eclipse-site>http://download.eclipse.org/releases/indigo</eclipse-site>

+				<platform-version>[3.7,3.8)</platform-version>

+			</properties>

+		</profile>

+		<profile>

+			<id>platform-juno</id>

+			<activation>

+				<property>

+					<name>platform-version-name</name>

+					<value>juno</value>

+				</property>

+			</activation>

+			<properties>

+				<eclipse-site>http://download.eclipse.org/releases/juno</eclipse-site>

+				<platform-version>[4.2,4.3)</platform-version>

+			</properties>

+		</profile>

+	</profiles>

+

+	<modules>

+		<module>org.eclipse.bpmn2.modeler.core</module>

+		<module>org.eclipse.bpmn2.modeler.ui</module>

+		<module>org.eclipse.bpmn2.modeler.runtime.jboss.jbpm5</module>

+		<module>org.eclipse.bpmn2.modeler.runtime.example</module>

+		<module>org.eclipse.bpmn2.modeler.feature</module>

+		<module>org.eclipse.bpmn2.modeler.jboss.runtime.feature</module>

+		<module>org.eclipse.bpmn2.modeler.examples.feature</module>

+		<module>org.eclipse.bpmn2.modeler.updatesite.feature</module>

+	</modules>

+

+	<repositories>

+		<repository>

+			<id>eclipse-platform</id>

+			<layout>p2</layout>

+			<url>${eclipse-site}</url>

+		</repository>

+

+		<repository>

+			<id>eclipse-bpmn2</id>

+			<!--  TODO: change this when BPMN2 metamodel finds a permanent home -->

+			<url>https://hudson.eclipse.org/hudson/job/bpmn2-nightly/lastSuccessfulBuild/artifact/org.eclipse.bpmn2.site/target/site/</url>

+			<layout>p2</layout>

+			<snapshots>

+				<enabled>true</enabled>

+			</snapshots>

+			<releases>

+				<enabled>true</enabled>

+			</releases>

+		</repository>

+

+		<repository>

+			<id>eclipse-bpel</id>

+			<url>http://download.eclipse.org/bpel/site/1.0.2</url>

+			<layout>p2</layout>

+			<snapshots>

+				<enabled>true</enabled>

+			</snapshots>

+			<releases>

+				<enabled>true</enabled>

+			</releases>

+		</repository>

+

+		<repository>

+			<id>eclipse-graphiti</id>

+			<url>http://download.eclipse.org/graphiti/updates/0.8.2</url>

+			<layout>p2</layout>

+			<snapshots>

+				<enabled>true</enabled>

+			</snapshots>

+			<releases>

+				<enabled>true</enabled>

+			</releases>

+		</repository>

+

+		<repository>

+			<id>eclipse-emf</id>

+			<url>http://download.eclipse.org/modeling/emf/updates/releases/</url>

+			<layout>p2</layout>

+			<snapshots>

+				<enabled>true</enabled>

+			</snapshots>

+			<releases>

+				<enabled>true</enabled>

+			</releases>

+		</repository>

+

+		<repository>

+			<id>eclipse-gef</id>

+			<url>http://download.eclipse.org/tools/gef/updates/releases/</url>

+			<layout>p2</layout>

+			<snapshots>

+				<enabled>true</enabled>

+			</snapshots>

+			<releases>

+				<enabled>true</enabled>

+			</releases>

+		</repository>

+

+	</repositories>

+

+	<pluginRepositories>

+		<pluginRepository>

+			<!-- need maven-findbugs-2.3.2-SNAPSHOT, see http://jira.codehaus.org/browse/MFINDBUGS-122 

+				remove this when this version is released -->

+			<id>codehaus.snapshots</id>

+			<url>http://snapshots.repository.codehaus.org/</url>

+		</pluginRepository>

+	</pluginRepositories>

+

+	<build>

+		<plugins>

+			<plugin>

+				<groupId>org.eclipse.tycho</groupId>

+				<artifactId>tycho-maven-plugin</artifactId>

+				<version>${tycho-version}</version>

+				<extensions>true</extensions>

+			</plugin>

+			<plugin>

+				<groupId>org.eclipse.tycho</groupId>

+				<artifactId>target-platform-configuration</artifactId>

+				<version>${tycho-version}</version>

+				<configuration>

+					<resolver>p2</resolver>

+				</configuration>

+			</plugin>

+		</plugins>

+		<pluginManagement>

+			<plugins>

+				<plugin>

+					<groupId>org.eclipse.tycho</groupId>

+					<artifactId>maven-osgi-compiler-plugin</artifactId>

+					<version>${tycho-version}</version>

+					<configuration>

+						<encoding>UTF-8</encoding>

+					</configuration>

+				</plugin>

+				<plugin>

+					<!-- TODO remove workaround when https://issues.sonatype.org/browse/TYCHO-473 

+						is fixed -->

+					<groupId>org.eclipse.tycho</groupId>

+					<artifactId>maven-osgi-source-plugin</artifactId>

+					<version>${tycho-version}</version>

+					<executions>

+						<execution>

+							<id>attach-source</id>

+							<phase>process-classes</phase>

+							<goals>

+								<goal>plugin-source</goal>

+							</goals>

+						</execution>

+					</executions>

+				</plugin>

+				<plugin>

+					<groupId>org.apache.maven.plugins</groupId>

+					<artifactId>maven-resources-plugin</artifactId>

+					<version>2.4.1</version>

+					<configuration>

+						<encoding>ISO-8859-1</encoding>

+					</configuration>

+				</plugin>

+				<plugin>

+					<groupId>org.apache.maven.plugins</groupId>

+					<artifactId>maven-antrun-plugin</artifactId>

+					<version>1.3</version>

+				</plugin>

+				<plugin>

+					<groupId>org.codehaus.mojo</groupId>

+					<artifactId>findbugs-maven-plugin</artifactId>

+					<version>2.3.2-SNAPSHOT</version>

+					<configuration>

+						<findbugsXmlOutput>true</findbugsXmlOutput>

+						<failOnError>false</failOnError>

+					</configuration>

+					<executions>

+						<execution>

+							<goals>

+								<goal>check</goal>

+							</goals>

+						</execution>

+					</executions>

+				</plugin>

+				<plugin>

+					<groupId>org.apache.maven.plugins</groupId>

+					<artifactId>maven-pmd-plugin</artifactId>

+					<version>2.5</version>

+					<configuration>

+						<sourceEncoding>utf-8</sourceEncoding>

+						<minimumTokens>100</minimumTokens>

+						<targetJdk>1.5</targetJdk>

+						<format>xml</format>

+						<failOnViolation>false</failOnViolation>

+					</configuration>

+					<executions>

+						<execution>

+							<goals>

+								<goal>cpd-check</goal>

+							</goals>

+						</execution>

+					</executions>

+				</plugin>

+			</plugins>

+		</pluginManagement>

+	</build>

+

+

+</project>