diff --git a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/PropertiesPage.java b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/PropertiesPage.java
index be07060..8a1451b 100644
--- a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/PropertiesPage.java
+++ b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/PropertiesPage.java
@@ -8,17 +8,20 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: PropertiesPage.java,v 1.10 2009/07/07 09:36:47 bcabe Exp $
+ * $Id: PropertiesPage.java,v 1.11 2009/07/07 21:52:28 bcabe Exp $
  */
 package org.eclipse.pde.ds.ui.internal.editor;
 
 import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
+import org.eclipse.emf.edit.command.*;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
 import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.IWrapperItemProvider;
 import org.eclipse.jface.databinding.viewers.ViewerProperties;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.pde.ds.scr.*;
 import org.eclipse.pde.ds.ui.internal.editor.masterdetail.PropertiesMasterDetail;
 import org.eclipse.pde.emfforms.editor.AbstractEmfFormPage;
 import org.eclipse.pde.emfforms.editor.EmfFormEditor;
@@ -41,37 +44,40 @@
 
 		bindingContext.bindValue(ViewerProperties.input().observe(_propertiesMasterDetail.getTreeViewer()), getEditor().getInputObservable());
 
-		/*
-				_propertiesMasterDetail.getAddButtonProperty().addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						Object sel = ((IStructuredSelection) _propertiesMasterDetail.getTreeViewer().getSelection()).getFirstElement();
-						int idx = CommandParameter.NO_INDEX;
-						if (sel != null) {
-							Object unwrappedElement = AdapterFactoryEditingDomain.unwrap(sel);
-							idx = ((Component) getObservedValue().getValue()).getAllProperties().indexOf(unwrappedElement);
-						}
+		_propertiesMasterDetail.getAddButtonProperty().addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				Object sel = ((IStructuredSelection) _propertiesMasterDetail.getTreeViewer().getSelection()).getFirstElement();
+				int idx = CommandParameter.NO_INDEX;
+				if (sel != null) {
+					Object unwrappedElement = ((IWrapperItemProvider) sel).getValue();
+					idx = ((Component) getEditor().getInputObservable().getValue()).getAllProperties().indexOf(unwrappedElement);
+				}
 
-						Property p = ScrFactory.eINSTANCE.createProperty();
-						p.setName("property" + System.currentTimeMillis()); //$NON-NLS-1$
-						Entry entryP = FeatureMapUtil.createEntry(ScrPackage.Literals.COMPONENT__PROPERTY, p);
-						Command command = AddCommand.create(editingDomain, getObservedValue().getValue(), null, entryP, idx);
-						editingDomain.getCommandStack().execute(command);
+				Property p = ScrFactory.eINSTANCE.createProperty();
+				Command command = AddCommand.create(editingDomain, getEditor().getInputObservable().getValue(), ScrPackage.Literals.COMPONENT__ALL_PROPERTIES, FeatureMapUtil.createEntry(ScrPackage.Literals.COMPONENT__PROPERTY, p), idx);
+				editingDomain.getCommandStack().execute(command);
 
-						getViewer().setSelection(new StructuredSelection(AdapterFactoryEditingDomain.getWrapper(p, editingDomain)), true);
-					}
-				});
+				getViewer().setSelection(new StructuredSelection(AdapterFactoryEditingDomain.getWrapper(p, editingDomain)), true);
+			}
+		});
 
-				_propertiesMasterDetail.getAddButtonProperties().addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						Properties p = ScrFactory.eINSTANCE.createProperties();
-						p.setEntry("properties" + System.currentTimeMillis()); //$NON-NLS-1$
-						Command command = AddCommand.create(editingDomain, getObservedValue().getValue(), null, FeatureMapUtil.createEntry(ScrPackage.Literals.COMPONENT__PROPERTIES, p), 0);
-						editingDomain.getCommandStack().execute(command);
+		_propertiesMasterDetail.getAddButtonProperties().addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				Object sel = ((IStructuredSelection) _propertiesMasterDetail.getTreeViewer().getSelection()).getFirstElement();
+				int idx = CommandParameter.NO_INDEX;
+				if (sel != null) {
+					Object unwrappedElement = ((IWrapperItemProvider) sel).getValue();
+					idx = ((Component) getEditor().getInputObservable().getValue()).getAllProperties().indexOf(unwrappedElement);
+				}
 
-						getViewer().setSelection(new StructuredSelection(AdapterFactoryEditingDomain.getWrapper(p, editingDomain)), true);
-					}
-				});
-		*/
+				Properties p = ScrFactory.eINSTANCE.createProperties();
+				Command command = AddCommand.create(editingDomain, getEditor().getInputObservable().getValue(), ScrPackage.Literals.COMPONENT__ALL_PROPERTIES, FeatureMapUtil.createEntry(ScrPackage.Literals.COMPONENT__PROPERTIES, p), idx);
+				editingDomain.getCommandStack().execute(command);
+
+				getViewer().setSelection(new StructuredSelection(AdapterFactoryEditingDomain.getWrapper(p, editingDomain)), true);
+			}
+		});
+
 		_propertiesMasterDetail.getRemoveButton().addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
 				Object sel = ((IStructuredSelection) _propertiesMasterDetail.getTreeViewer().getSelection()).getFirstElement();
diff --git a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/ServicesPage.java b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/ServicesPage.java
index 9ba91e6..563f447 100644
--- a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/ServicesPage.java
+++ b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/ServicesPage.java
@@ -8,16 +8,18 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: ServicesPage.java,v 1.2 2009/07/07 09:36:47 bcabe Exp $
+ * $Id: ServicesPage.java,v 1.3 2009/07/07 21:52:28 bcabe Exp $
  */
 package org.eclipse.pde.ds.ui.internal.editor;
 
 import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.emf.edit.command.*;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
 import org.eclipse.emf.edit.domain.EditingDomain;
 import org.eclipse.jface.databinding.viewers.ViewerProperties;
 import org.eclipse.jface.viewers.*;
+import org.eclipse.pde.ds.scr.*;
 import org.eclipse.pde.ds.ui.internal.editor.masterdetail.ServicesMasterDetail;
 import org.eclipse.pde.emfforms.editor.AbstractEmfFormPage;
 import org.eclipse.pde.emfforms.editor.EmfFormEditor;
@@ -39,28 +41,40 @@
 		final EditingDomain editingDomain = ((DSEditor) getEditor()).getEditingDomain();
 
 		bindingContext.bindValue(ViewerProperties.input().observe(_servicesMasterDetail.getTreeViewer()), getEditor().getInputObservable());
-		/*
-				_servicesMasterDetail.getBtnAddProvided().addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						Object sel = ((IStructuredSelection) getViewer().getSelection()).getFirstElement();
-						Provide p = ScrFactory.eINSTANCE.createProvide();
-						Command command = AddCommand.create(editingDomain, ((Component) getObservedValue().getValue()).getService(), null, p);
-						editingDomain.getCommandStack().execute(command);
 
-						getViewer().setSelection(new StructuredSelection(AdapterFactoryEditingDomain.getWrapper(p, editingDomain)), true);
-					}
-				});
+		_servicesMasterDetail.getBtnAddProvided().addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				Object sel = ((IStructuredSelection) _servicesMasterDetail.getTreeViewer().getSelection()).getFirstElement();
+				int idx = CommandParameter.NO_INDEX;
+				if (sel != null) {
+					Object unwrappedElement = AdapterFactoryEditingDomain.unwrap(sel);
+					idx = ((Component) getEditor().getInputObservable().getValue()).getService().getProvide().indexOf(unwrappedElement);
+				}
 
-				_servicesMasterDetail.getBtnAddRequired().addSelectionListener(new SelectionAdapter() {
-					public void widgetSelected(SelectionEvent e) {
-						Reference r = ScrFactory.eINSTANCE.createReference();
-						r.setName("ref" + System.currentTimeMillis()); //$NON-NLS-1$
-						Command command = AddCommand.create(editingDomain, getObservedValue().getValue(), null, FeatureMapUtil.createEntry(ScrPackage.Literals.COMPONENT__REFERENCE, r), 0);
-						editingDomain.getCommandStack().execute(command);
+				Provide p = ScrFactory.eINSTANCE.createProvide();
+				Command command = AddCommand.create(editingDomain, ((Component) getEditor().getInputObservable().getValue()).getService(), ScrPackage.Literals.SERVICE__PROVIDE, p, idx);
+				editingDomain.getCommandStack().execute(command);
 
-						getViewer().setSelection(new StructuredSelection(AdapterFactoryEditingDomain.getWrapper(r, editingDomain)), true);
-					}
-				});*/
+				getViewer().setSelection(new StructuredSelection(AdapterFactoryEditingDomain.getWrapper(p, editingDomain)), true);
+			}
+		});
+
+		_servicesMasterDetail.getBtnAddRequired().addSelectionListener(new SelectionAdapter() {
+			public void widgetSelected(SelectionEvent e) {
+				Object sel = ((IStructuredSelection) _servicesMasterDetail.getTreeViewer().getSelection()).getFirstElement();
+				int idx = CommandParameter.NO_INDEX;
+				if (sel != null) {
+					Object unwrappedElement = AdapterFactoryEditingDomain.unwrap(sel);
+					idx = ((Component) getEditor().getInputObservable().getValue()).getReference().indexOf(unwrappedElement);
+				}
+
+				Reference r = ScrFactory.eINSTANCE.createReference();
+				Command command = AddCommand.create(editingDomain, getEditor().getInputObservable().getValue(), ScrPackage.Literals.COMPONENT__REFERENCE, r, idx);
+				editingDomain.getCommandStack().execute(command);
+
+				getViewer().setSelection(new StructuredSelection(AdapterFactoryEditingDomain.getWrapper(r, editingDomain)), true);
+			}
+		});
 
 		_servicesMasterDetail.getRemoveButton().addSelectionListener(new SelectionAdapter() {
 			public void widgetSelected(SelectionEvent e) {
diff --git a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/masterdetail/PropertiesMasterDetail.java b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/masterdetail/PropertiesMasterDetail.java
index 0d5fd3c..6c8d70e 100644
--- a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/masterdetail/PropertiesMasterDetail.java
+++ b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/masterdetail/PropertiesMasterDetail.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: PropertiesMasterDetail.java,v 1.11 2009/07/13 19:45:41 bcabe Exp $
+ * $Id: PropertiesMasterDetail.java,v 1.12 2009/07/18 14:42:41 bcabe Exp $
  */
 package org.eclipse.pde.ds.ui.internal.editor.masterdetail;
 
@@ -22,6 +22,7 @@
 import org.eclipse.pde.emfforms.editor.EmfFormEditor;
 import org.eclipse.pde.emfforms.editor.EmfMasterDetailBlock;
 import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.forms.IDetailsPage;
 
 public class PropertiesMasterDetail extends EmfMasterDetailBlock {
@@ -31,6 +32,7 @@
 
 	public PropertiesMasterDetail(EmfFormEditor<?> editor) {
 		super(editor, "Properties");
+		useGenericAddButton = false;
 	}
 
 	public IDetailsPage getPage(Object key) {
@@ -45,6 +47,12 @@
 		return null;
 	}
 
+	@Override
+	protected void createCustomAddButtons(Composite parent) {
+		addButtonProperty = createButton(parent, "Add Property");
+		addButtonProperties = createButton(parent, "Add Properties");
+	}
+
 	public Button getAddButtonProperty() {
 		return addButtonProperty;
 	}
diff --git a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/masterdetail/ServicesMasterDetail.java b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/masterdetail/ServicesMasterDetail.java
index 5bb95ab..54ad52d 100644
--- a/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/masterdetail/ServicesMasterDetail.java
+++ b/modeling/plugins/org.eclipse.pde.ds.ui/src/org/eclipse/pde/ds/ui/internal/editor/masterdetail/ServicesMasterDetail.java
@@ -8,17 +8,16 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: ServicesMasterDetail.java,v 1.6 2009/07/18 14:42:41 bcabe Exp $
+ * $Id: ServicesMasterDetail.java,v 1.7 2009/07/18 15:29:53 bcabe Exp $
  */
 package org.eclipse.pde.ds.ui.internal.editor.masterdetail;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.eclipse.core.databinding.DataBindingContext;
 import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
 import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
 import org.eclipse.pde.ds.scr.*;
 import org.eclipse.pde.ds.ui.internal.editor.detailpart.services.ProvideDetailsPart;
 import org.eclipse.pde.ds.ui.internal.editor.detailpart.services.ReferenceDetailsPart;
@@ -30,16 +29,12 @@
 import org.eclipse.ui.forms.IManagedForm;
 
 public class ServicesMasterDetail extends EmfMasterDetailBlock {
-
-	private TreeViewer _viewer;
-	private EditingDomain _editingDomain;
-	private DataBindingContext _databindingContext;
-
 	private Button _btnAddProvided;
 	private Button _btnAddRequired;
 
 	public ServicesMasterDetail(EmfFormEditor<?> editor) {
 		super(editor, "Services");
+		useGenericAddButton = false;
 	}
 
 	@Override
@@ -63,7 +58,6 @@
 				return l.toArray();
 			}
 		});
-
 	}
 
 	public IDetailsPage getPage(Object key) {
@@ -78,6 +72,12 @@
 		return null;
 	}
 
+	@Override
+	protected void createCustomAddButtons(Composite parent) {
+		_btnAddRequired = createButton(parent, "Add Reference");
+		_btnAddProvided = createButton(parent, "Add Provided");
+	}
+
 	public Button getBtnAddProvided() {
 		return _btnAddProvided;
 	}
diff --git a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/EmfMasterDetailBlock.java b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/EmfMasterDetailBlock.java
index ebbdfaa..dd57271 100644
--- a/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/EmfMasterDetailBlock.java
+++ b/modeling/plugins/org.eclipse.pde.emfforms/src/org/eclipse/pde/emfforms/editor/EmfMasterDetailBlock.java
@@ -8,7 +8,7 @@
  * Contributors:
  *     Anyware Technologies - initial API and implementation
  *
- * $Id: EmfMasterDetailBlock.java,v 1.9 2009/07/18 20:13:00 bcabe Exp $
+ * $Id: EmfMasterDetailBlock.java,v 1.10 2009/07/18 20:26:56 bcabe Exp $
  */
 package org.eclipse.pde.emfforms.editor;
 
@@ -34,11 +34,12 @@
 
 public abstract class EmfMasterDetailBlock extends MasterDetailsBlock implements IDetailsPageProvider, IMenuListener {
 
+	protected EmfFormEditor<?> parentEditor;
+	protected boolean useGenericAddButton = true;
 	private String title;
 	private TreeViewer treeViewer;
 	private Button addButton;
 	private Button removeButton;
-	protected EmfFormEditor<?> parentEditor;
 
 	public EmfMasterDetailBlock(EmfFormEditor<?> editor, String title) {
 		this.title = title;
@@ -65,13 +66,12 @@
 		Composite buttonComposite = new Composite(client, SWT.NONE);
 		GridLayoutFactory.fillDefaults().numColumns(1).applyTo(buttonComposite);
 
-		addButton = new Button(buttonComposite, SWT.FLAT | SWT.PUSH);
-		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).applyTo(addButton);
-		addButton.setText("Add..."); //$NON-NLS-1$
+		if (useGenericAddButton)
+			addButton = createButton(buttonComposite, "Add...");
 
-		removeButton = new Button(buttonComposite, SWT.FLAT | SWT.PUSH);
-		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).applyTo(removeButton);
-		removeButton.setText("Remove"); //$NON-NLS-1$
+		createCustomAddButtons(buttonComposite);
+
+		removeButton = createButton(buttonComposite, "Remove"); //$NON-NLS-1$
 
 		GridDataFactory.fillDefaults().grab(false, false).applyTo(buttonComposite);
 
@@ -104,6 +104,14 @@
 		section.setClient(client);
 	}
 
+	protected Button createButton(Composite parent, String btnText) {
+		Button btn = new Button(parent, SWT.FLAT | SWT.PUSH);
+		GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).applyTo(btn);
+		btn.setText(btnText); //$NON-NLS-1$
+
+		return btn;
+	}
+
 	/**
 	 * Return a ViewerFilter to apply on the treeViewer
 	 * 
@@ -129,10 +137,17 @@
 		return treeViewer;
 	}
 
-	public Button getAddButton() {
+	/**
+	 * @return The "Add..." button that can be used to hook an element creation wizard, or <code>null</code> if the {@link EmfMasterDetailBlock#useGenericAddButton} flag is set to <code>false</code> 
+	 */
+	public Button getGenericAddButton() {
 		return addButton;
 	}
 
+	protected void createCustomAddButtons(Composite parent) {
+		// Should be overriden by clients wanting to contribute their own "add" button(s) 
+	}
+
 	public Button getRemoveButton() {
 		return removeButton;
 	}
