Stashing current work
diff --git a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java
index f84b915..4f8a5a2 100644
--- a/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java
+++ b/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/merrimac/dialogs/FeatureEditingDialog.java
@@ -42,7 +42,7 @@
 	public FeatureEditingDialog(DiagramEditor editor, EObject object, EStructuralFeature feature) {
 		super(editor, object, (EClass)feature.getEType());
 		this.feature = feature;
-		this.newObject = null;
+		this.newObject = (EObject) object.eGet(feature);
 	}
 
 	protected Composite createDialogContent(Composite parent) {
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java
index d4a467f..b5b2544 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/ActivityDetailComposite.java
@@ -37,9 +37,9 @@
 
 public class ActivityDetailComposite extends DefaultDetailComposite {
 
+	private Button noneButton;
 	private Button addStandardLoopButton;
 	private Button addMultiLoopButton;
-	private Button removeLoopButton;
 	protected AbstractDetailComposite loopCharacteristicsComposite;
 	
 	public ActivityDetailComposite(Composite parent, int style) {
@@ -56,6 +56,7 @@
 	@Override
 	public void cleanBindings() {
 		super.cleanBindings();
+		noneButton = null;
 		addStandardLoopButton = null;
 		addMultiLoopButton = null;
 		loopCharacteristicsComposite = null;
@@ -98,18 +99,22 @@
 			final Activity activity = (Activity) businessObject;
 			LoopCharacteristics loopCharacteristics = (LoopCharacteristics) activity.getLoopCharacteristics();
 				
-			if (loopCharacteristics != null) {
-				loopCharacteristicsComposite = PropertiesCompositeFactory.createDetailComposite(
-						loopCharacteristics.eClass().getInstanceClass(), this, SWT.NONE);
-				loopCharacteristicsComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
+			Composite composite = getAttributesParent();
 
-				loopCharacteristicsComposite.setBusinessObject(loopCharacteristics);
-
-				removeLoopButton = toolkit.createButton(loopCharacteristicsComposite.getAttributesParent(), "Remove Loop Characteristics", SWT.PUSH);
-				removeLoopButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 3, 1));
-				removeLoopButton.addSelectionListener(new SelectionAdapter() {
-					
-					public void widgetSelected(SelectionEvent e) {
+			createLabel(composite, "Loop Characteristics");
+			
+			Composite buttonComposite = toolkit.createComposite(composite);
+			buttonComposite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
+			FillLayout layout = new FillLayout();
+			layout.marginWidth = 20;
+			buttonComposite.setLayout(layout);
+			
+			noneButton = toolkit.createButton(buttonComposite, "None", SWT.RADIO);
+			noneButton.setSelection(loopCharacteristics == null);
+			noneButton.addSelectionListener(new SelectionAdapter() {
+				
+				public void widgetSelected(SelectionEvent e) {
+					if (noneButton.getSelection()) {
 						@SuppressWarnings("restriction")
 						TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
 						domain.getCommandStack().execute(new RecordingCommand(domain) {
@@ -121,72 +126,68 @@
 							}
 						});
 					}
-				});
+				}
+			});
+			
+			addStandardLoopButton = toolkit.createButton(buttonComposite, "Standard", SWT.RADIO);
+			addStandardLoopButton.setSelection(loopCharacteristics instanceof StandardLoopCharacteristics);
+			addStandardLoopButton.addSelectionListener(new SelectionAdapter() {
 				
+				public void widgetSelected(SelectionEvent e) {
+					if (addStandardLoopButton.getSelection()) {
+						@SuppressWarnings("restriction")
+						TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
+						domain.getCommandStack().execute(new RecordingCommand(domain) {
+							@Override
+							protected void doExecute() {
+								StandardLoopCharacteristics loopChar = FACTORY.createStandardLoopCharacteristics();
+								activity.setLoopCharacteristics(loopChar);
+								ModelUtil.setID(loopChar);
+								setBusinessObject(activity);
+							}
+						});
+					}
+				}
+			});
+
+			addMultiLoopButton = toolkit.createButton(buttonComposite, "Multi-Instance", SWT.RADIO);
+			addMultiLoopButton.setSelection(loopCharacteristics instanceof MultiInstanceLoopCharacteristics);
+			addMultiLoopButton.addSelectionListener(new SelectionAdapter() {
+				
+				public void widgetSelected(SelectionEvent e) {
+					if (addMultiLoopButton.getSelection()) {
+						@SuppressWarnings("restriction")
+						TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
+						domain.getCommandStack().execute(new RecordingCommand(domain) {
+							@Override
+							protected void doExecute() {
+								MultiInstanceLoopCharacteristics loopChar = FACTORY.createMultiInstanceLoopCharacteristics();
+								activity.setLoopCharacteristics(loopChar);
+								ModelUtil.setID(loopChar);
+								setBusinessObject(activity);
+							}
+						});
+					}
+				}
+			});
+			
+			if (loopCharacteristics != null) {
+				loopCharacteristicsComposite = PropertiesCompositeFactory.createDetailComposite(
+						loopCharacteristics.eClass().getInstanceClass(), this, SWT.NONE);
+				loopCharacteristicsComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
+				loopCharacteristicsComposite.setBusinessObject(loopCharacteristics);
 				loopCharacteristicsComposite.setTitle(loopCharacteristics instanceof StandardLoopCharacteristics ?
 						"Standard Loop Characteristics" : "Multi-Instance Loop Characteristics");
 			}
-			else {
-				Composite composite = getAttributesParent();
-
-				createLabel(composite, "Loop Characteristics");
-				
-				Composite buttonComposite = toolkit.createComposite(composite);
-				buttonComposite.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));
-				FillLayout layout = new FillLayout();
-				layout.marginWidth = 20;
-				buttonComposite.setLayout(layout);
-				
-				Button noneButton = toolkit.createButton(buttonComposite, "None", SWT.RADIO);
-				noneButton.setSelection(true);
-				
-				addStandardLoopButton = toolkit.createButton(buttonComposite, "Standard", SWT.RADIO);
-				if (!isModelObjectEnabled(PACKAGE.getStandardLoopCharacteristics()))
-					addStandardLoopButton.setVisible(false);
-				addStandardLoopButton.addSelectionListener(new SelectionAdapter() {
-					
-					public void widgetSelected(SelectionEvent e) {
-						if (addStandardLoopButton.getSelection()) {
-							@SuppressWarnings("restriction")
-							TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
-							domain.getCommandStack().execute(new RecordingCommand(domain) {
-								@Override
-								protected void doExecute() {
-									StandardLoopCharacteristics loopChar = FACTORY.createStandardLoopCharacteristics();
-									activity.setLoopCharacteristics(loopChar);
-									ModelUtil.setID(loopChar);
-									setBusinessObject(activity);
-								}
-							});
-						}
-					}
-				});
-	
-				addMultiLoopButton = toolkit.createButton(buttonComposite, "Multi-Instance", SWT.RADIO);
-				if (!isModelObjectEnabled(PACKAGE.getMultiInstanceLoopCharacteristics()))
-					addMultiLoopButton.setVisible(false);
-				addMultiLoopButton.addSelectionListener(new SelectionAdapter() {
-					
-					public void widgetSelected(SelectionEvent e) {
-						if (addMultiLoopButton.getSelection()) {
-							@SuppressWarnings("restriction")
-							TransactionalEditingDomain domain = getDiagramEditor().getEditingDomain();
-							domain.getCommandStack().execute(new RecordingCommand(domain) {
-								@Override
-								protected void doExecute() {
-									MultiInstanceLoopCharacteristics loopChar = FACTORY.createMultiInstanceLoopCharacteristics();
-									activity.setLoopCharacteristics(loopChar);
-									ModelUtil.setID(loopChar);
-									setBusinessObject(activity);
-								}
-							});
-						}
-					}
-				});
+			else if (loopCharacteristicsComposite!=null) {
+				loopCharacteristicsComposite.dispose();
+				loopCharacteristicsComposite = null;
 			}
-			redrawPage();
+
 		}
 		else
 			super.bindReference(parent, object, reference);
+		
+		redrawPage();
 	}
 }
\ No newline at end of file
diff --git a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java
index 0e39c56..1002d40 100644
--- a/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java
+++ b/org.eclipse.bpmn2.modeler.ui/src/org/eclipse/bpmn2/modeler/ui/property/tasks/DataAssociationDetailComposite.java
@@ -27,6 +27,7 @@
 import org.eclipse.bpmn2.FormalExpression;
 import org.eclipse.bpmn2.InputOutputSpecification;
 import org.eclipse.bpmn2.ItemAwareElement;
+import org.eclipse.bpmn2.MultiInstanceLoopCharacteristics;
 import org.eclipse.bpmn2.ThrowEvent;
 import org.eclipse.bpmn2.modeler.core.adapters.InsertionAdapter;
 import org.eclipse.bpmn2.modeler.core.merrimac.clad.AbstractBpmn2PropertySection;
@@ -174,12 +175,13 @@
 		}
 		parameter = (ItemAwareElement)be;
 		
+		Activity activity = null;
 		List<? extends DataAssociation> associations = null;
 		EObject container = be.eContainer();
-		if (container instanceof InputOutputSpecification) {
+		if (container instanceof InputOutputSpecification || container instanceof MultiInstanceLoopCharacteristics) {
 			EObject containerContainer = container.eContainer();
 			if (containerContainer instanceof Activity) {
-				Activity activity = (Activity)containerContainer;
+				activity = (Activity)containerContainer;
 				if (isInput)
 					associations = activity.getDataInputAssociations();
 				else
@@ -210,8 +212,8 @@
 			CatchEvent catchEvent = (CatchEvent)container;
 			associations = catchEvent.getDataOutputAssociation();
 			if (associations.size()==0) {
-				association = FACTORY.createDataInputAssociation();
-				association.setTargetRef((ItemAwareElement) be);
+				association = FACTORY.createDataOutputAssociation();
+				association.getSourceRef().add((ItemAwareElement) be);
 				InsertionAdapter.add(catchEvent, PACKAGE.getCatchEvent_DataOutputAssociation(), association);
 			}
 			DataInputOutputDetailComposite details = new DataInputOutputDetailComposite(this,SWT.NONE);
@@ -249,6 +251,19 @@
 						break;
 				}
 			}
+			if (association==null && activity!=null) {
+				// create a new DataAssociation
+				if (isInput) {
+					association = FACTORY.createDataInputAssociation();
+					association.setTargetRef((ItemAwareElement) be);
+					InsertionAdapter.add(activity, PACKAGE.getActivity_DataInputAssociations(), association);
+				}
+				else {
+					association = FACTORY.createDataOutputAssociation();
+					association.getSourceRef().add((ItemAwareElement) be);
+					InsertionAdapter.add(activity, PACKAGE.getActivity_DataOutputAssociations(), association);
+				}
+			}
 		}
 		createWidgets();
 	}
@@ -564,7 +579,7 @@
 		if (show != transformationWidgetsShowing) {
 			if (show) {
 				if (transformationComposite==null) {
-					transformationComposite = toolkit.createComposite(this, SWT.BORDER);
+					transformationComposite = toolkit.createComposite(this, SWT.NONE);
 					transformationComposite.setLayout(new GridLayout(1,false));
 					transformationComposite.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,true,3,1));
 				}
@@ -687,7 +702,7 @@
 		if (show != advancedMappingWidgetsShowing) {
 			if (show) {
 				if (transformationComposite==null) {
-					transformationComposite = toolkit.createComposite(this, SWT.BORDER);
+					transformationComposite = toolkit.createComposite(this, SWT.NONE);
 					transformationComposite.setLayout(new GridLayout(1,false));
 					transformationComposite.setLayoutData(new GridData(SWT.FILL,SWT.TOP,true,true,3,1));
 				}