Adding a "reset" button the assoc end names
diff --git a/plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/ComponentNameProvider.java b/plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/ComponentNameProvider.java
index 8936dfb..af6c38e 100644
--- a/plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/ComponentNameProvider.java
+++ b/plugins/org.eclipse.tigerstripe.workbench.base/src/java/org/eclipse/tigerstripe/workbench/internal/core/model/ComponentNameProvider.java
@@ -335,7 +335,7 @@
 	 *
 	 */
 	public String getNewAssociationEndName(IPattern pattern,IAbstractArtifact artifact, int whichEnd) {
-		if (extension != null){
+		if (extension != null && pattern != null){
 			String extensionName = null;
 			final IAbstractArtifact aArtifact = artifact;
 			final int fWhichEnd = whichEnd;
diff --git a/plugins/org.eclipse.tigerstripe.workbench.ui.base/src/java/org/eclipse/tigerstripe/workbench/ui/internal/editors/artifacts/association/AssociationSpecificsSection.java b/plugins/org.eclipse.tigerstripe.workbench.ui.base/src/java/org/eclipse/tigerstripe/workbench/ui/internal/editors/artifacts/association/AssociationSpecificsSection.java
index 77bdc56..815a1a9 100644
--- a/plugins/org.eclipse.tigerstripe.workbench.ui.base/src/java/org/eclipse/tigerstripe/workbench/ui/internal/editors/artifacts/association/AssociationSpecificsSection.java
+++ b/plugins/org.eclipse.tigerstripe.workbench.ui.base/src/java/org/eclipse/tigerstripe/workbench/ui/internal/editors/artifacts/association/AssociationSpecificsSection.java
@@ -44,8 +44,10 @@
 import org.eclipse.tigerstripe.workbench.internal.adapt.TigerstripeURIAdapterFactory;
 import org.eclipse.tigerstripe.workbench.internal.builder.AssociationArtifactAuditor;
 import org.eclipse.tigerstripe.workbench.internal.core.model.AssociationEnd;
+import org.eclipse.tigerstripe.workbench.internal.core.model.ComponentNameProvider;
 import org.eclipse.tigerstripe.workbench.internal.core.model.IAbstractArtifactInternal;
 import org.eclipse.tigerstripe.workbench.internal.core.model.Type;
+import org.eclipse.tigerstripe.workbench.model.IComponentNameProvider;
 import org.eclipse.tigerstripe.workbench.model.deprecated_.IAbstractArtifact;
 import org.eclipse.tigerstripe.workbench.model.deprecated_.IAssociationArtifact;
 import org.eclipse.tigerstripe.workbench.model.deprecated_.IAssociationEnd;
@@ -121,6 +123,8 @@
 
     private Text aEndTypeText;
 
+    private Button aEndRenameButton;
+
     private ControlDecoration aEndTypeDecoration;
 
     private Button aEndTypeBrowseButton;
@@ -163,6 +167,8 @@
 
     private Text zEndTypeText;
 
+    private Button zEndRenameButton;
+
     private ControlDecoration zEndTypeDecoration;
 
     private Button zEndTypeBrowseButton;
@@ -181,8 +187,11 @@
 
     private StereotypeSectionManager zStereotypeManager;
 
+    private  ComponentNameProvider nameFactory;
+
     public AssociationSpecificsSection(TigerstripeFormPage page, Composite parent, FormToolkit toolkit) {
         super(page, parent, toolkit, null, null, Section.NO_TITLE);
+        nameFactory = ComponentNameProvider.getInstance();
         createContent();
     }
 
@@ -251,12 +260,22 @@
         aEndClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
 
         toolkit.createLabel(aEndClient, "Name:").setEnabled(!isReadonly());
-        aEndNameText = toolkit.createText(aEndClient, "");
+        
+        Composite c = toolkit.createComposite(aEndClient);
+        c.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
+        layout = TigerstripeLayoutFactory.createFormPaneTableWrapLayout(2, false);
+        c.setLayout(layout);
+        
+        aEndNameText = toolkit.createText(c, "");
         aEndNameText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
         aEndNameText.setEnabled(!isReadonly());
         aEndNameText.addModifyListener(listener);
 
         aEndNameDecoration = ArtifactSectionPart.decorate(aEndNameText);
+        
+        aEndRenameButton = toolkit.createButton(c, "Reset", SWT.PUSH);
+        aEndRenameButton.setEnabled(!isReadonly());
+        aEndRenameButton.addSelectionListener(listener);
 
         toolkit.createLabel(aEndClient, "Description:").setEnabled(!isReadonly());
         aEndCommentText = toolkit.createText(aEndClient, "", SWT.WRAP | SWT.MULTI | SWT.V_SCROLL);
@@ -287,7 +306,7 @@
             }
         });
 
-        Composite c = toolkit.createComposite(aEndClient);
+        c = toolkit.createComposite(aEndClient);
         c.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
         layout = TigerstripeLayoutFactory.createFormPaneTableWrapLayout(2, false);
         c.setLayout(layout);
@@ -419,13 +438,23 @@
         zEndClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
 
         toolkit.createLabel(zEndClient, "Name:").setEnabled(!isReadonly());
-        zEndNameText = toolkit.createText(zEndClient, "");
-        zEndNameText.setEnabled(!isReadonly());
+        
+        Composite c = toolkit.createComposite(zEndClient);
+        c.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
+        layout = TigerstripeLayoutFactory.createFormPaneTableWrapLayout(2, false);
+        c.setLayout(layout);
+
+        zEndNameText = toolkit.createText(c, "");
         zEndNameText.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
+        zEndNameText.setEnabled(!isReadonly());
         zEndNameText.addModifyListener(listener);
 
         zEndNameDecoration = ArtifactSectionPart.decorate(zEndNameText);
 
+        zEndRenameButton = toolkit.createButton(c, "Reset", SWT.PUSH);
+        zEndRenameButton.setEnabled(!isReadonly());
+        zEndRenameButton.addSelectionListener(listener);
+        
         toolkit.createLabel(zEndClient, "Description:").setEnabled(!isReadonly());
         zEndCommentText = toolkit.createText(zEndClient, "", SWT.WRAP | SWT.MULTI | SWT.V_SCROLL);
         td = new TableWrapData(TableWrapData.FILL_GRAB);
@@ -455,7 +484,7 @@
             }
         });
 
-        Composite c = toolkit.createComposite(zEndClient);
+        c = toolkit.createComposite(zEndClient);
         c.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
         layout = TigerstripeLayoutFactory.createFormPaneTableWrapLayout(2, false);
         c.setLayout(layout);
@@ -641,6 +670,9 @@
             aEndMultiplicityCombo.select(indexIn(mulStrs, aEnd.getMultiplicity().getLabel()));
             aEndIsNavigableButton.setSelection(aEnd.isNavigable());
 
+            String aEndName = nameFactory.getNewAssociationEndName(null ,getIArtifact(), IComponentNameProvider.AEND);
+            aEndRenameButton.setEnabled( ! aEndName.equals(aEndNameText.getText()));
+
             if (aEnd.getMultiplicity().isArray()) {
                 aEndIsOrderedButton.setEnabled(true);
                 aEndIsOrderedButton.setSelection(aEnd.isOrdered());
@@ -671,6 +703,9 @@
             zEndMultiplicityCombo.select(indexIn(mulStrs, zEnd.getMultiplicity().getLabel()));
             zEndIsNavigableButton.setSelection(zEnd.isNavigable());
 
+            String zEndName = nameFactory.getNewAssociationEndName(null ,getIArtifact(), IComponentNameProvider.ZEND);
+            zEndRenameButton.setEnabled( ! zEndName.equals(zEndNameText.getText()));
+
             if (zEnd.getMultiplicity().isArray()) {
                 zEndIsOrderedButton.setEnabled(true);
                 zEndIsOrderedButton.setSelection(zEnd.isOrdered());
@@ -701,12 +736,16 @@
                 aEnd.setName(aEndNameText.getText().trim());
                 firePropertyChanged(aEnd, oldValue, IArtifactComponentChangeListener.Prop.NAME);
                 markPageModified();
+                String aEndName = nameFactory.getNewAssociationEndName(null ,getIArtifact(), IComponentNameProvider.AEND);
+                aEndRenameButton.setEnabled( ! aEndName.equals(aEndNameText.getText()));
             } else if (e.getSource() == zEndNameText) {
                 IAssociationEnd zEnd = assoc.getZEnd();
                 String oldValue = zEnd.getName();
                 zEnd.setName(zEndNameText.getText().trim());
                 firePropertyChanged(zEnd, oldValue, IArtifactComponentChangeListener.Prop.NAME);
                 markPageModified();
+                String zEndName = nameFactory.getNewAssociationEndName(null ,getIArtifact(), IComponentNameProvider.ZEND);
+                zEndRenameButton.setEnabled( ! zEndName.equals(zEndNameText.getText()));
             } else if (e.getSource() == aEndCommentText) {
                 IAssociationEnd aEnd = assoc.getAEnd();
                 aEnd.setComment(aEndCommentText.getText().trim());
@@ -887,7 +926,20 @@
                 zEnd.setVisibility(getZEndVisibility());
                 firePropertyChanged(zEnd, oldValue, IArtifactComponentChangeListener.Prop.VISIBILITY);
                 markPageModified();
+            } else if (e.getSource() == aEndRenameButton) {
+                // Pass in "Null" pattern - this will use the default behaviour in ALL cases.
+                String name = nameFactory.getNewAssociationEndName(null ,getIArtifact(), IComponentNameProvider.AEND);
+                aEnd.setName(name);
+                aEndNameText.setText(name);
+                // This has a side-effect of doing the pageModified,, so no need to repeat that
+
+            } else if (e.getSource() == zEndRenameButton) {
+                // Pass in "Null" pattern - this will use the default behaviour in ALL cases.
+                String name = nameFactory.getNewAssociationEndName(null ,getIArtifact(), IComponentNameProvider.ZEND);
+                zEnd.setName(name);
+                zEndNameText.setText(name);
             }
+
         }
     }
 
diff --git a/plugins/org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram/src/org/eclipse/tigerstripe/workbench/ui/visualeditor/diagram/dialogs/AssociationPropertiesEditDialog.java b/plugins/org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram/src/org/eclipse/tigerstripe/workbench/ui/visualeditor/diagram/dialogs/AssociationPropertiesEditDialog.java
index 56dc0cc..9f7b2c3 100644
--- a/plugins/org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram/src/org/eclipse/tigerstripe/workbench/ui/visualeditor/diagram/dialogs/AssociationPropertiesEditDialog.java
+++ b/plugins/org.eclipse.tigerstripe.workbench.ui.visualeditor.diagram/src/org/eclipse/tigerstripe/workbench/ui/visualeditor/diagram/dialogs/AssociationPropertiesEditDialog.java
@@ -48,7 +48,9 @@
 import org.eclipse.tigerstripe.workbench.TigerstripeCore;
 import org.eclipse.tigerstripe.workbench.TigerstripeException;
 import org.eclipse.tigerstripe.workbench.internal.core.TigerstripeRuntime;
+import org.eclipse.tigerstripe.workbench.internal.core.model.ComponentNameProvider;
 import org.eclipse.tigerstripe.workbench.internal.core.profile.stereotype.Stereotype;
+import org.eclipse.tigerstripe.workbench.model.IComponentNameProvider;
 import org.eclipse.tigerstripe.workbench.model.deprecated_.IAbstractArtifact;
 import org.eclipse.tigerstripe.workbench.model.deprecated_.IArtifactManagerSession;
 import org.eclipse.tigerstripe.workbench.model.deprecated_.IAssociationArtifact;
@@ -76,758 +78,848 @@
 
 public class AssociationPropertiesEditDialog extends NewTSMessageDialog {
 
-	private IArtifactManagerSession artifactMgrSession;
+    private IArtifactManagerSession artifactMgrSession;
 
-	private final DiagramGraphicalViewer mapViewer;
+    private final DiagramGraphicalViewer mapViewer;
 
-	private final AbstractArtifact source;
+    private final AbstractArtifact source;
 
-	private final AbstractArtifact target;
+    private final AbstractArtifact target;
 
-	private IAbstractArtifact sourceArtifact;
+    private IAbstractArtifact sourceArtifact;
 
-	private IAbstractArtifact targetArtifact;
+    private IAbstractArtifact targetArtifact;
 
-	private Text associationNameField;
+    private Text associationNameField;
 
-	private Text associationStereotypesField;
+    private Text associationStereotypesField;
 
-	private List<Stereotype> newAssocStereotypes;
+    private List<Stereotype> newAssocStereotypes;
 
-	private String origAssociationStereotypesStringVal;
+    private String origAssociationStereotypesStringVal;
 
-	private String aEndRoleName;
+    private String aEndRoleName;
 
-	private String zEndRoleName;
+    private String zEndRoleName;
 
-	private Association association = null;
+    private Association association = null;
 
-	private IAbstractArtifact iAssociation = null;
+    private IAbstractArtifact iAssociation = null;
 
-	private Text aEndTypeField;
-	
-	private Text aEndRoleNameField;
+    private Text aEndTypeField;
 
-	private Combo aEndMultiplicityCombo;
+    private Text aEndRoleNameField;
 
-	private Combo aEndVisibilityCombo;
+    private Button aEndRoleResetButton;
 
-	private Combo aEndAggregationCombo;
+    private Combo aEndMultiplicityCombo;
 
-	private Button aEndIsNavigableButton;
+    private Combo aEndVisibilityCombo;
 
-	private Button aEndIsUniqueButton;
+    private Combo aEndAggregationCombo;
 
-	private Button aEndIsOrderedButton;
-	
-	private Text zEndTypeField;
+    private Button aEndIsNavigableButton;
 
-	private Text zEndRoleNameField;
+    private Button aEndIsUniqueButton;
 
-	private Combo zEndMultiplicityCombo;
+    private Button aEndIsOrderedButton;
 
-	private Combo zEndVisibilityCombo;
+    private Text zEndTypeField;
 
-	private Combo zEndAggregationCombo;
+    private Text zEndRoleNameField;
 
-	private Button zEndIsNavigableButton;
+    private Button zEndRoleResetButton;
 
-	private Button zEndIsUniqueButton;
+    private Combo zEndMultiplicityCombo;
 
-	private Button zEndIsOrderedButton;
+    private Combo zEndVisibilityCombo;
 
-	private final Map<String, Object> changedValuesMap = new HashMap<String, Object>();
+    private Combo zEndAggregationCombo;
 
-	public AssociationPropertiesEditDialog(Shell parent,
-			MapEditPart mapEditPart, Association association) {
-		super(parent, "", "Edit Association Properties");
-		this.association = association;
-		this.source = association.getAEnd();
-		this.target = association.getZEnd();
-		String sourceFQN = source.getFullyQualifiedName();
-		String targetFQN = target.getFullyQualifiedName();
-		mapViewer = (DiagramGraphicalViewer) mapEditPart.getViewer();
-		DiagramEditDomain domain = (DiagramEditDomain) mapViewer
-				.getEditDomain();
-		IResource res = (IResource) domain.getEditorPart().getEditorInput()
-				.getAdapter(IResource.class);
-		IAbstractTigerstripeProject aProject = (IAbstractTigerstripeProject) res
-				.getProject().getAdapter(IAbstractTigerstripeProject.class);
-		if (!(aProject instanceof ITigerstripeModelProject))
-			throw new RuntimeException("non-Tigerstripe Project found");
-		ITigerstripeModelProject project = (ITigerstripeModelProject) aProject;
-		try {
-			artifactMgrSession = project.getArtifactManagerSession();
-			sourceArtifact = artifactMgrSession
-					.getArtifactByFullyQualifiedName(sourceFQN);
-			targetArtifact = artifactMgrSession
-					.getArtifactByFullyQualifiedName(targetFQN);
-			iAssociation = association.getCorrespondingIArtifact();
-		} catch (TigerstripeException e) {
-			throw new RuntimeException("matching IAbstractArtifact not found");
-		}
-	}
+    private Button zEndIsNavigableButton;
 
-	@Override
-	public Control createDialogArea(Composite parent) {
-		Composite area = (Composite) super.createDialogArea(parent);
-		area.setLayout(new FillLayout());
-		initializeDialogUnits(parent);
-		Composite composite = new Composite(area, SWT.NONE);
-		initDialog();
-		createMessageArea(composite, 8);
-		messageArea.link.setText("<a>open in editor</a>");
-		messageArea.link.addSelectionListener(new SelectionAdapter() {
-			@Override
-			public void widgetSelected(SelectionEvent e) {
-				if (iAssociation != null) {
-					close();
-					TSOpenAction.openEditor(iAssociation, PlatformUI
-							.getWorkbench().getActiveWorkbenchWindow()
-							.getActivePage());
-				}
-			}
-		});
-		createAssociationEditControl(composite);
-		return area;
-	}
+    private Button zEndIsUniqueButton;
 
-	protected void initDialog() {
-		if (association instanceof AssociationClass) {
-			this.setTitleString("Edit "
-					+ ArtifactMetadataFactory.INSTANCE.getMetadata(
-							IAssociationClassArtifact.class.getName())
-							.getLabel(association) + " Properties");
-			getShell().setText(
-					ArtifactMetadataFactory.INSTANCE.getMetadata(
-							IAssociationClassArtifact.class.getName())
-							.getLabel(association)
-							+ " Property Editor");
-		} else {
-			this.setTitleString("Edit "
-					+ ArtifactMetadataFactory.INSTANCE.getMetadata(
-							IAssociationArtifact.class.getName()).getLabel(
-							association) + " Properties");
-			getShell().setText(
-					ArtifactMetadataFactory.INSTANCE.getMetadata(
-							IAssociationArtifact.class.getName()).getLabel(
-							association)
-							+ " Property Editor");
-		}
-		getShell().setMinimumSize(250, 200);
+    private Button zEndIsOrderedButton;
 
-	}
+    private  ComponentNameProvider nameFactory;
 
-	protected void updateOkButton() {
-		Button okButton = this.getButton(IDialogConstants.OK_ID);
-		if (okButton == null)
-			return;
+    private final Map<String, Object> changedValuesMap = new HashMap<String, Object>();
 
-		aEndRoleName = aEndRoleNameField.getText();
-		zEndRoleName = zEndRoleNameField.getText();
-		IStatus status = validate();
-		if (status.isOK()) {
-			okButton.setEnabled(true);
-			setInfoMessage("");
-		} else {
-			okButton.setEnabled(false);
-			switch (status.getSeverity()) {
-			case IStatus.ERROR:
-				setErrorMessage(status.getMessage());
-				break;
-			case IStatus.WARNING:
-				setWarningMessage(status.getMessage());
-				break;
-			default:
-				setInfoMessage(status.getMessage());
-			}
-		}
-	}
+    public AssociationPropertiesEditDialog(Shell parent,
+            MapEditPart mapEditPart, Association association) {
+        super(parent, "", "Edit Association Properties");
+        this.association = association;
+        this.source = association.getAEnd();
+        this.target = association.getZEnd();
+        String sourceFQN = source.getFullyQualifiedName();
+        String targetFQN = target.getFullyQualifiedName();
+        nameFactory = ComponentNameProvider.getInstance();
+        mapViewer = (DiagramGraphicalViewer) mapEditPart.getViewer();
+        DiagramEditDomain domain = (DiagramEditDomain) mapViewer
+                .getEditDomain();
+        IResource res = (IResource) domain.getEditorPart().getEditorInput()
+                .getAdapter(IResource.class);
+        IAbstractTigerstripeProject aProject = (IAbstractTigerstripeProject) res
+                .getProject().getAdapter(IAbstractTigerstripeProject.class);
+        if (!(aProject instanceof ITigerstripeModelProject))
+            throw new RuntimeException("non-Tigerstripe Project found");
+        ITigerstripeModelProject project = (ITigerstripeModelProject) aProject;
+        try {
+            artifactMgrSession = project.getArtifactManagerSession();
+            sourceArtifact = artifactMgrSession
+                    .getArtifactByFullyQualifiedName(sourceFQN);
+            targetArtifact = artifactMgrSession
+                    .getArtifactByFullyQualifiedName(targetFQN);
+            iAssociation = association.getCorrespondingIArtifact();
+        } catch (TigerstripeException e) {
+            throw new RuntimeException("matching IAbstractArtifact not found");
+        }
+    }
 
-	protected IStatus validate() {
-		if (aEndRoleName == null || "".equals(aEndRoleName)) {
-			return createStatus(IStatus.INFO, "Enter aEnd role name");
-		} else if (zEndRoleName == null || "".equals(zEndRoleName)) {
-			return createStatus(IStatus.INFO, "Enter zEnd role name");
-		} else {
-			return Status.OK_STATUS;
-		}
-	}
+    @Override
+    public Control createDialogArea(Composite parent) {
+        Composite area = (Composite) super.createDialogArea(parent);
+        area.setLayout(new FillLayout());
+        initializeDialogUnits(parent);
+        Composite composite = new Composite(area, SWT.NONE);
+        initDialog();
+        createMessageArea(composite, 8);
+        messageArea.link.setText("<a>open in editor</a>");
+        messageArea.link.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                if (iAssociation != null) {
+                    close();
+                    TSOpenAction.openEditor(iAssociation, PlatformUI
+                            .getWorkbench().getActiveWorkbenchWindow()
+                            .getActivePage());
+                }
+            }
+        });
+        createAssociationEditControl(composite);
+        return area;
+    }
 
-	private IStatus createStatus(int severity, String message) {
-		return new Status(severity, TigerstripeDiagramEditorPlugin.ID, message);
-	}
+    protected void initDialog() {
+        if (association instanceof AssociationClass) {
+            this.setTitleString("Edit "
+                    + ArtifactMetadataFactory.INSTANCE.getMetadata(
+                            IAssociationClassArtifact.class.getName())
+                    .getLabel(association) + " Properties");
+            getShell().setText(
+                    ArtifactMetadataFactory.INSTANCE.getMetadata(
+                            IAssociationClassArtifact.class.getName())
+                    .getLabel(association)
+                    + " Property Editor");
+        } else {
+            this.setTitleString("Edit "
+                    + ArtifactMetadataFactory.INSTANCE.getMetadata(
+                            IAssociationArtifact.class.getName()).getLabel(
+                                    association) + " Properties");
+            getShell().setText(
+                    ArtifactMetadataFactory.INSTANCE.getMetadata(
+                            IAssociationArtifact.class.getName()).getLabel(
+                                    association)
+                    + " Property Editor");
+        }
+        getShell().setMinimumSize(250, 200);
 
-	private void createAssociationEditControl(Composite composite) {
-		int nameLabelCols = 2;
-		int nameValueCols = 6;
-		int totalNumCols = nameLabelCols + nameValueCols;
-		int endControlPanelCols = totalNumCols / 2;
-		int numRowsControlPanels = 10;
-		// set the composite so that it has the right layout data...
-		GridLayout layout = new GridLayout();
-		layout.numColumns = totalNumCols;
-		composite.setLayout(layout);
-		// add the label, button, and text for the stereotype definition...
-		Label stereotypeLabel = new Label(composite, SWT.NULL);
-		stereotypeLabel.setText("Stereotypes :");
-		GridData bgd = new GridData();
-		bgd.horizontalSpan = nameLabelCols;
-		stereotypeLabel.setLayoutData(bgd);
-		Button stereoTypeSelButton = new Button(composite, SWT.NULL);
-		stereoTypeSelButton.setText("...");
-		stereoTypeSelButton.addSelectionListener(new SelectionListener() {
-			public void widgetDefaultSelected(SelectionEvent e) {
-			}
+    }
 
-			public void widgetSelected(SelectionEvent e) {
-				Object source = e.getSource();
-				if (source instanceof Button) {
-					List<String> stereotypeVals = new ArrayList<String>();
-					if (newAssocStereotypes != null) {
-						for (IStereotype stereo : newAssocStereotypes) {
-							stereotypeVals.add(stereo.getName());
-						}
-					} else {
-						stereotypeVals.addAll(association.getStereotypes());
-					}
-					try {
-						IAbstractArtifact iArtifact = association
-								.getCorrespondingIArtifact();
-						IStereotype[] availableStereotypes = getAvailableStereotypes(iArtifact);
+    protected void updateOkButton() {
+        Button okButton = this.getButton(IDialogConstants.OK_ID);
+        if (okButton == null)
+            return;
 
-						List<IStereotype> selectedStereotypeList = new ArrayList<IStereotype>();
-						for (IStereotype availStereotype : availableStereotypes) {
-							if (stereotypeVals.contains(availStereotype
-									.getName())) {
-								selectedStereotypeList.add(availStereotype);
-							}
-						}
-						ListSelectionDialog stereotypeSelDialog = new ListSelectionDialog(
-								getShell(), availableStereotypes,
-								new ArrayContentProvider(),
-								new LabelProvider(), "Select Stereotypes");
-						stereotypeSelDialog
-								.setInitialElementSelections(selectedStereotypeList);
-						stereotypeSelDialog.create();
-						boolean returnStatus = (stereotypeSelDialog.open() == Window.OK);
-						if (returnStatus) {
-							Object[] results = stereotypeSelDialog.getResult();
-							List tmpList = Arrays.asList(results);
-							newAssocStereotypes = new ArrayList<Stereotype>();
-							newAssocStereotypes.addAll(tmpList);
-							associationStereotypesField
-									.setText(getStereotypeLabel(tmpList));
-						}
-					} catch (TigerstripeException tsException) {
-					    TigerstripeRuntime.getDefaultInstance().logInfoMessage(
-								"TigerstripeException detected", tsException);
-					}
-				}
-			}
-		});
-		associationStereotypesField = new Text(composite, SWT.BORDER | SWT.FLAT);
-		try {
-			origAssociationStereotypesStringVal = ModelElementStereotypesHelper
-					.getStereotypessAsString(false, association.getCorrespondingIArtifact());
-		} catch (TigerstripeException e) {
-			EclipsePlugin.log(e);
-		}
-		associationStereotypesField
-				.setText(origAssociationStereotypesStringVal);
-		associationStereotypesField
-				.setToolTipText("The stereotypes defined for the association");
-		associationStereotypesField.setEditable(false);
-		setFillLayout(associationStereotypesField, nameValueCols - 1, 1);
-		// and add the label and text for the name of the association
-		Label assocNameLabel = new Label(composite, SWT.NULL);
-		assocNameLabel.setText("Association Name:");
-		bgd = new GridData();
-		bgd.horizontalSpan = nameLabelCols;
-		assocNameLabel.setLayoutData(bgd);
-		associationNameField = new Text(composite, SWT.BORDER);
-		associationNameField.setText(association.getName());
-		associationNameField.setToolTipText("The name of the association");
+        aEndRoleName = aEndRoleNameField.getText();
+        zEndRoleName = zEndRoleNameField.getText();
+        
+        IStatus status = validate();
+        if (status.isOK()) {
+            okButton.setEnabled(true);
+            setInfoMessage("");
+        } else {
+            okButton.setEnabled(false);
+            switch (status.getSeverity()) {
+            case IStatus.ERROR:
+                setErrorMessage(status.getMessage());
+                break;
+            case IStatus.WARNING:
+                setWarningMessage(status.getMessage());
+                break;
+            default:
+                setInfoMessage(status.getMessage());
+            }
+        }
+    }
+    
+    protected void setResetButtonStatuses() {
 
-		// Bugzilla 320052: Names should only be modified using the refactor framework
-		associationNameField.setEditable(false);	
+        IAbstractArtifact art;
+        try {
+            art = association.getCorrespondingIArtifact();
+            if (art != null) {
+                String zName = nameFactory.getNewAssociationEndName(null ,art, IComponentNameProvider.ZEND);
+                zEndRoleResetButton.setEnabled( ! zName.equals(zEndRoleNameField.getText()));
+                
+                String aName = nameFactory.getNewAssociationEndName(null ,art, IComponentNameProvider.AEND);
+                aEndRoleResetButton.setEnabled( ! aName.equals(aEndRoleNameField.getText()));
+            }
+        } catch (TigerstripeException e1) {
+            aEndRoleResetButton.setEnabled(true);
+            zEndRoleResetButton.setEnabled(true);
+        }
+    
+    
+    }
 
-		setFillLayout(associationNameField, nameValueCols, 1);
-		// now, define the controls for defining the aEnd properties...to do
-		// this, first add a
-		// new group to contain these controls
-		Group aEndBox = new Group(composite, SWT.NULL);
-		aEndBox.setText("aEnd Properties");
-		GridLayout bLayout = new GridLayout();
-		bLayout.numColumns = endControlPanelCols;
-		aEndBox.setLayout(bLayout);
-		setFillBothLayout(aEndBox, endControlPanelCols, numRowsControlPanels);
-		// then define a text box (and a label for that text box) for editing
-		// type
-		// the role name
-		// for the aEnd
+    protected IStatus validate() {
+        if (aEndRoleName == null || "".equals(aEndRoleName)) {
+            return createStatus(IStatus.INFO, "Enter aEnd role name");
+        } else if (zEndRoleName == null || "".equals(zEndRoleName)) {
+            return createStatus(IStatus.INFO, "Enter zEnd role name");
+        } else {
+            return Status.OK_STATUS;
+        }
+    }
 
-		// N.M - Bugzilla 325546: Add type field to association edit dialog
-		Label aEndTypeLabel = new Label(aEndBox, SWT.NONE);
-		aEndTypeLabel.setText("Type:");
-		bgd = new GridData();
-		bgd.horizontalSpan = 1;
-		aEndTypeLabel.setLayoutData(bgd);
-		aEndTypeField = new Text(aEndBox, SWT.READ_ONLY | SWT.BORDER);
-		AbstractArtifact artifact = association.getAEnd();
-		if (artifact != null) 
-			aEndTypeField.setText(artifact.getName());	
-		aEndTypeField.setToolTipText("The aEnd type");
-		bgd = new GridData();
-		bgd.horizontalSpan = endControlPanelCols - 1;
-		bgd.verticalSpan = 1;
-		bgd.widthHint = 200;
-		aEndTypeField.setLayoutData(bgd);
+    private IStatus createStatus(int severity, String message) {
+        return new Status(severity, TigerstripeDiagramEditorPlugin.ID, message);
+    }
 
-		Label aEndRoleLabel = new Label(aEndBox, SWT.NULL);
-		aEndRoleLabel.setText("Role Name:");
-		bgd = new GridData();
-		bgd.horizontalSpan = 1;
-		aEndRoleLabel.setLayoutData(bgd);
-		aEndRoleNameField = new Text(aEndBox, SWT.BORDER);
-		aEndRoleNameField.setText(association.getAEndName());
-		aEndRoleNameField.setToolTipText("The aEnd role name");
-		aEndRoleNameField.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				updateOkButton();
-			}
-		});
-		bgd = new GridData();
-		bgd.horizontalSpan = endControlPanelCols - 1;
-		bgd.verticalSpan = 1;
-		bgd.widthHint = 200;
-		aEndRoleNameField.setLayoutData(bgd);
-		// add the control used to select the multiplicity
-		String[] multLabels = IModelComponent.EMultiplicity.labels();
-		AssocMultiplicity aEndMult = association.getAEndMultiplicity();
-		Label aEndMultiplicityLabel = new Label(aEndBox, SWT.NULL);
-		aEndMultiplicityLabel.setText("Multiplicity:");
-		aEndMultiplicityCombo = new Combo(aEndBox, SWT.READ_ONLY);
-		for (String multLabel : multLabels) {
-			aEndMultiplicityCombo.add(multLabel);
-		}
-		aEndMultiplicityCombo.select(IModelComponent.EMultiplicity
-				.indexOf(aEndMult.getLiteral()));
-		aEndMultiplicityCombo.setVisibleItemCount(IModelComponent.EMultiplicity
-				.values().length);
+    private void createAssociationEditControl(Composite composite) {
+        int nameLabelCols = 2;
+        int nameValueCols = 6;
+        int totalNumCols = nameLabelCols + nameValueCols;
+        int endControlPanelCols = totalNumCols / 2;
+        int numRowsControlPanels = 10;
+        // set the composite so that it has the right layout data...
+        GridLayout layout = new GridLayout();
+        layout.numColumns = totalNumCols;
+        composite.setLayout(layout);
+        // add the label, button, and text for the stereotype definition...
+        Label stereotypeLabel = new Label(composite, SWT.NULL);
+        stereotypeLabel.setText("Stereotypes :");
+        GridData bgd = new GridData();
+        bgd.horizontalSpan = nameLabelCols;
+        stereotypeLabel.setLayoutData(bgd);
+        Button stereoTypeSelButton = new Button(composite, SWT.NULL);
+        stereoTypeSelButton.setText("...");
+        stereoTypeSelButton.addSelectionListener(new SelectionListener() {
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
 
-		// N.M: Bugzilla 321524: Inconsistent behaviour between association pop-up editor and association form
-		aEndMultiplicityCombo.addSelectionListener(new SelectionAdapter() {
-			@Override
-			public void widgetSelected(SelectionEvent e) {
-				Object source = e.getSource();
-				if (source instanceof Combo) {
-					String value = ((Combo) source).getText();
+            public void widgetSelected(SelectionEvent e) {
+                Object source = e.getSource();
+                if (source instanceof Button) {
+                    List<String> stereotypeVals = new ArrayList<String>();
+                    if (newAssocStereotypes != null) {
+                        for (IStereotype stereo : newAssocStereotypes) {
+                            stereotypeVals.add(stereo.getName());
+                        }
+                    } else {
+                        stereotypeVals.addAll(association.getStereotypes());
+                    }
+                    try {
+                        IAbstractArtifact iArtifact = association
+                                .getCorrespondingIArtifact();
+                        IStereotype[] availableStereotypes = getAvailableStereotypes(iArtifact);
+
+                        List<IStereotype> selectedStereotypeList = new ArrayList<IStereotype>();
+                        for (IStereotype availStereotype : availableStereotypes) {
+                            if (stereotypeVals.contains(availStereotype
+                                    .getName())) {
+                                selectedStereotypeList.add(availStereotype);
+                            }
+                        }
+                        ListSelectionDialog stereotypeSelDialog = new ListSelectionDialog(
+                                getShell(), availableStereotypes,
+                                new ArrayContentProvider(),
+                                new LabelProvider(), "Select Stereotypes");
+                        stereotypeSelDialog
+                        .setInitialElementSelections(selectedStereotypeList);
+                        stereotypeSelDialog.create();
+                        boolean returnStatus = (stereotypeSelDialog.open() == Window.OK);
+                        if (returnStatus) {
+                            Object[] results = stereotypeSelDialog.getResult();
+                            List tmpList = Arrays.asList(results);
+                            newAssocStereotypes = new ArrayList<Stereotype>();
+                            newAssocStereotypes.addAll(tmpList);
+                            associationStereotypesField
+                            .setText(getStereotypeLabel(tmpList));
+                        }
+                    } catch (TigerstripeException tsException) {
+                        TigerstripeRuntime.getDefaultInstance().logInfoMessage(
+                                "TigerstripeException detected", tsException);
+                    }
+                }
+            }
+        });
+        associationStereotypesField = new Text(composite, SWT.BORDER | SWT.FLAT);
+        try {
+            origAssociationStereotypesStringVal = ModelElementStereotypesHelper
+                    .getStereotypessAsString(false, association.getCorrespondingIArtifact());
+        } catch (TigerstripeException e) {
+            EclipsePlugin.log(e);
+        }
+        associationStereotypesField
+        .setText(origAssociationStereotypesStringVal);
+        associationStereotypesField
+        .setToolTipText("The stereotypes defined for the association");
+        associationStereotypesField.setEditable(false);
+        setFillLayout(associationStereotypesField, nameValueCols - 1, 1);
+        // and add the label and text for the name of the association
+        Label assocNameLabel = new Label(composite, SWT.NULL);
+        assocNameLabel.setText("Association Name:");
+        bgd = new GridData();
+        bgd.horizontalSpan = nameLabelCols;
+        assocNameLabel.setLayoutData(bgd);
+        associationNameField = new Text(composite, SWT.BORDER);
+        associationNameField.setText(association.getName());
+        associationNameField.setToolTipText("The name of the association");
+
+        // Bugzilla 320052: Names should only be modified using the refactor framework
+        associationNameField.setEditable(false);	
+
+        setFillLayout(associationNameField, nameValueCols, 1);
+        // now, define the controls for defining the aEnd properties...to do
+        // this, first add a
+        // new group to contain these controls
+        Group aEndBox = new Group(composite, SWT.NULL);
+        aEndBox.setText("aEnd Properties");
+        GridLayout bLayout = new GridLayout();
+        bLayout.numColumns = endControlPanelCols;
+        aEndBox.setLayout(bLayout);
+        setFillBothLayout(aEndBox, endControlPanelCols, numRowsControlPanels);
+        // then define a text box (and a label for that text box) for editing
+        // type
+        // the role name
+        // for the aEnd
+
+        // N.M - Bugzilla 325546: Add type field to association edit dialog
+        Label aEndTypeLabel = new Label(aEndBox, SWT.NONE);
+        aEndTypeLabel.setText("Type:");
+        bgd = new GridData();
+        bgd.horizontalSpan = 1;
+        aEndTypeLabel.setLayoutData(bgd);
+        aEndTypeField = new Text(aEndBox, SWT.READ_ONLY | SWT.BORDER);
+        AbstractArtifact artifact = association.getAEnd();
+        if (artifact != null) 
+            aEndTypeField.setText(artifact.getName());	
+        aEndTypeField.setToolTipText("The aEnd type");
+        bgd = new GridData();
+        bgd.horizontalSpan = endControlPanelCols - 1;
+        bgd.verticalSpan = 1;
+        bgd.widthHint = 250;
+        aEndTypeField.setLayoutData(bgd);
+
+        Label aEndRoleLabel = new Label(aEndBox, SWT.NULL);
+        aEndRoleLabel.setText("Name:");
+        bgd = new GridData();
+        bgd.horizontalSpan = 1;
+        aEndRoleLabel.setLayoutData(bgd);
+
+        aEndRoleNameField = new Text(aEndBox, SWT.BORDER);
+        aEndRoleNameField.setText(association.getAEndName());
+        aEndRoleNameField.setToolTipText("The aEnd role name");
+        aEndRoleNameField.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                updateOkButton();
+                setResetButtonStatuses();
+            }
+        });
+        bgd = new GridData();
+        bgd.horizontalSpan = endControlPanelCols - 2;
+        bgd.verticalSpan = 1;
+        bgd.widthHint = 200;
+        aEndRoleNameField.setLayoutData(bgd);
+
+        aEndRoleResetButton = new Button(aEndBox, SWT.PUSH);
+        aEndRoleResetButton.setText("Reset");
+        bgd = new GridData();
+        bgd.horizontalSpan = 1;
+        bgd.verticalSpan = 1;
+        bgd.widthHint = 50;
+        aEndRoleResetButton.setLayoutData(bgd);
+        aEndRoleResetButton.addSelectionListener( new SelectionAdapter() {
+
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                IAbstractArtifact art;
+                try {
+                    art = association.getCorrespondingIArtifact();
+                    if (art != null) {
+                        String name = nameFactory.getNewAssociationEndName(null ,art, IComponentNameProvider.AEND);
+                        aEndRoleNameField.setText(name);
+                    }
+                } catch (TigerstripeException e1) {
+                   //just leave it as is..
+                }
+            }
+
+        });
+
+        // add the control used to select the multiplicity
+        String[] multLabels = IModelComponent.EMultiplicity.labels();
+        AssocMultiplicity aEndMult = association.getAEndMultiplicity();
+        Label aEndMultiplicityLabel = new Label(aEndBox, SWT.NULL);
+        aEndMultiplicityLabel.setText("Multiplicity:");
+        aEndMultiplicityCombo = new Combo(aEndBox, SWT.READ_ONLY);
+        for (String multLabel : multLabels) {
+            aEndMultiplicityCombo.add(multLabel);
+        }
+        aEndMultiplicityCombo.select(IModelComponent.EMultiplicity
+                .indexOf(aEndMult.getLiteral()));
+        aEndMultiplicityCombo.setVisibleItemCount(IModelComponent.EMultiplicity
+                .values().length);
+
+        // N.M: Bugzilla 321524: Inconsistent behaviour between association pop-up editor and association form
+        aEndMultiplicityCombo.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Object source = e.getSource();
+                if (source instanceof Combo) {
+                    String value = ((Combo) source).getText();
+
+                    if (value.equals(AssocMultiplicity.ONE_LITERAL.getLiteral())
+                            || value.equals(AssocMultiplicity.ZERO_LITERAL
+                                    .getLiteral())
+                            || value.equals(AssocMultiplicity.ZERO_ONE_LITERAL
+                                    .getLiteral())) {
+                        aEndIsUniqueButton.setEnabled(false);
+                        aEndIsUniqueButton.setSelection(true);
+                        aEndIsOrderedButton.setEnabled(false);
+                        aEndIsOrderedButton.setSelection(false);
+                    } else {
+                        aEndIsUniqueButton.setEnabled(true);
+                        aEndIsOrderedButton.setEnabled(true);
+                    }
+                }
+            }
+        });
+
+        Label aEndMultiplicityFiller = new Label(aEndBox, SWT.NULL);
+        this.setFillLayout(aEndMultiplicityFiller, 2, 1);
+        // add the control used to select the visibility
+        List<Visibility> visibilityValues = Visibility.VALUES;
+        List<String> visibilityStrVals = new ArrayList<String>(visibilityValues
+                .size());
+        for (int i = 0; i < visibilityValues.size(); i++)
+            visibilityStrVals.add(i, visibilityValues.get(i).getName()
+                    .toLowerCase());
+        String[] visibilityStrValArray = new String[visibilityValues.size()];
+        visibilityStrVals.toArray(visibilityStrValArray);
+        Visibility aEndVisibility = association.getAEndVisibility();
+        Label aEndVisibilityLabel = new Label(aEndBox, SWT.NULL);
+        aEndVisibilityLabel.setText("Visibility:");
+        aEndVisibilityCombo = new Combo(aEndBox, SWT.READ_ONLY);
+        for (String visibilityStrVal : visibilityStrVals) {
+            aEndVisibilityCombo.add(visibilityStrVal);
+        }
+        aEndVisibilityCombo.select(aEndVisibility.getValue());
+        Label aEndVisibilityFiller = new Label(aEndBox, SWT.NULL);
+        this.setFillLayout(aEndVisibilityFiller, 2, 1);
+        // add the control used to select none/composition/aggregation
+        List<AggregationEnum> aggregationValues = AggregationEnum.VALUES;
+        List<String> aggregationStrVals = new ArrayList<String>(
+                aggregationValues.size());
+        for (int i = 0; i < aggregationValues.size(); i++)
+            aggregationStrVals.add(i, aggregationValues.get(i).getName());
+        String[] aggregationStrValArray = new String[aggregationValues.size()];
+        aggregationStrVals.toArray(aggregationStrValArray);
+        AggregationEnum aEndAggregation = association.getAEndAggregation();
+        Label aEndAggregationLabel = new Label(aEndBox, SWT.NULL);
+        aEndAggregationLabel.setText("Aggregation:");
+        aEndAggregationCombo = new Combo(aEndBox, SWT.READ_ONLY);
+        for (String aggregationStrVal : aggregationStrVals) {
+            aEndAggregationCombo.add(aggregationStrVal);
+        }
+        aEndAggregationCombo.select(aEndAggregation.getValue());
+        aEndAggregationCombo.addSelectionListener(new SelectionListener() {
+
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
+
+            public void widgetSelected(SelectionEvent e) {
+                EAggregationEnum ag = EAggregationEnum
+                        .parse(aEndAggregationCombo
+                                .getItem(aEndAggregationCombo
+                                        .getSelectionIndex()));
+                EAggregationEnum oag = EAggregationEnum
+                        .parse(aEndAggregationCombo
+                                .getItem(zEndAggregationCombo
+                                        .getSelectionIndex()));
 
-					if (value.equals(AssocMultiplicity.ONE_LITERAL.getLiteral())
-							|| value.equals(AssocMultiplicity.ZERO_LITERAL
-									.getLiteral())
-							|| value.equals(AssocMultiplicity.ZERO_ONE_LITERAL
-									.getLiteral())) {
-						aEndIsUniqueButton.setEnabled(false);
-						aEndIsUniqueButton.setSelection(true);
-						aEndIsOrderedButton.setEnabled(false);
-						aEndIsOrderedButton.setSelection(false);
-					} else {
-						aEndIsUniqueButton.setEnabled(true);
-						aEndIsOrderedButton.setEnabled(true);
-					}
-				}
-			}
-		});
+                if (ag != EAggregationEnum.NONE && oag != EAggregationEnum.NONE) {
+                    zEndAggregationCombo.select(0);
+                }
+            }
 
-		Label aEndMultiplicityFiller = new Label(aEndBox, SWT.NULL);
-		this.setFillLayout(aEndMultiplicityFiller, 2, 1);
-		// add the control used to select the visibility
-		List<Visibility> visibilityValues = Visibility.VALUES;
-		List<String> visibilityStrVals = new ArrayList<String>(visibilityValues
-				.size());
-		for (int i = 0; i < visibilityValues.size(); i++)
-			visibilityStrVals.add(i, visibilityValues.get(i).getName()
-					.toLowerCase());
-		String[] visibilityStrValArray = new String[visibilityValues.size()];
-		visibilityStrVals.toArray(visibilityStrValArray);
-		Visibility aEndVisibility = association.getAEndVisibility();
-		Label aEndVisibilityLabel = new Label(aEndBox, SWT.NULL);
-		aEndVisibilityLabel.setText("Visibility:");
-		aEndVisibilityCombo = new Combo(aEndBox, SWT.READ_ONLY);
-		for (String visibilityStrVal : visibilityStrVals) {
-			aEndVisibilityCombo.add(visibilityStrVal);
-		}
-		aEndVisibilityCombo.select(aEndVisibility.getValue());
-		Label aEndVisibilityFiller = new Label(aEndBox, SWT.NULL);
-		this.setFillLayout(aEndVisibilityFiller, 2, 1);
-		// add the control used to select none/composition/aggregation
-		List<AggregationEnum> aggregationValues = AggregationEnum.VALUES;
-		List<String> aggregationStrVals = new ArrayList<String>(
-				aggregationValues.size());
-		for (int i = 0; i < aggregationValues.size(); i++)
-			aggregationStrVals.add(i, aggregationValues.get(i).getName());
-		String[] aggregationStrValArray = new String[aggregationValues.size()];
-		aggregationStrVals.toArray(aggregationStrValArray);
-		AggregationEnum aEndAggregation = association.getAEndAggregation();
-		Label aEndAggregationLabel = new Label(aEndBox, SWT.NULL);
-		aEndAggregationLabel.setText("Aggregation:");
-		aEndAggregationCombo = new Combo(aEndBox, SWT.READ_ONLY);
-		for (String aggregationStrVal : aggregationStrVals) {
-			aEndAggregationCombo.add(aggregationStrVal);
-		}
-		aEndAggregationCombo.select(aEndAggregation.getValue());
-		aEndAggregationCombo.addSelectionListener(new SelectionListener() {
+        });
 
-			public void widgetDefaultSelected(SelectionEvent e) {
-			}
+        Label aEndAggregationFiller = new Label(aEndBox, SWT.NULL);
+        this.setFillLayout(aEndAggregationFiller, 2, 1);
+        // add the controls to chose if the end is navigable, ordered, and/or
+        // unique
+        boolean aEndIsNavigable = association.isAEndIsNavigable();
+        aEndIsNavigableButton = new Button(aEndBox, SWT.CHECK);
+        aEndIsNavigableButton.setText("isNavigable");
+        aEndIsNavigableButton.setSelection(aEndIsNavigable);
+        aEndIsNavigableButton.addSelectionListener(new SelectionListener() {
 
-			public void widgetSelected(SelectionEvent e) {
-				EAggregationEnum ag = EAggregationEnum
-						.parse(aEndAggregationCombo
-								.getItem(aEndAggregationCombo
-										.getSelectionIndex()));
-				EAggregationEnum oag = EAggregationEnum
-						.parse(aEndAggregationCombo
-								.getItem(zEndAggregationCombo
-										.getSelectionIndex()));
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
 
-				if (ag != EAggregationEnum.NONE && oag != EAggregationEnum.NONE) {
-					zEndAggregationCombo.select(0);
-				}
-			}
+            public void widgetSelected(SelectionEvent e) {
+                boolean sel = aEndIsNavigableButton.getSelection();
+                if (!sel && !zEndIsNavigableButton.getSelection()) {
+                    zEndIsNavigableButton.setSelection(true);
+                }
+            }
 
-		});
+        });
 
-		Label aEndAggregationFiller = new Label(aEndBox, SWT.NULL);
-		this.setFillLayout(aEndAggregationFiller, 2, 1);
-		// add the controls to chose if the end is navigable, ordered, and/or
-		// unique
-		boolean aEndIsNavigable = association.isAEndIsNavigable();
-		aEndIsNavigableButton = new Button(aEndBox, SWT.CHECK);
-		aEndIsNavigableButton.setText("isNavigable");
-		aEndIsNavigableButton.setSelection(aEndIsNavigable);
-		aEndIsNavigableButton.addSelectionListener(new SelectionListener() {
+        boolean aEndIsOrdered = association.isAEndIsOrdered();
+        aEndIsOrderedButton = new Button(aEndBox, SWT.CHECK);
+        aEndIsOrderedButton.setText("isOrdered");
+        aEndIsOrderedButton.setSelection(aEndIsOrdered);
+        boolean aEndIsUnique = association.isAEndIsUnique();
+        aEndIsUniqueButton = new Button(aEndBox, SWT.CHECK);
+        aEndIsUniqueButton.setText("isUnique");
+        aEndIsUniqueButton.setSelection(aEndIsUnique);
 
-			public void widgetDefaultSelected(SelectionEvent e) {
-			}
+        // N.M: Bugzilla 321524: Inconsistent behaviour between association pop-up editor and association form
+        if (aEndMult.equals(AssocMultiplicity.ONE_LITERAL) || aEndMult.equals(AssocMultiplicity.ZERO_LITERAL) || aEndMult.equals(AssocMultiplicity.ZERO_ONE_LITERAL)) {
+            aEndIsUniqueButton.setEnabled(false);
+            aEndIsUniqueButton.setSelection(true);
+            aEndIsOrderedButton.setEnabled(false);
+            aEndIsOrderedButton.setSelection(false);
+        }
 
-			public void widgetSelected(SelectionEvent e) {
-				boolean sel = aEndIsNavigableButton.getSelection();
-				if (!sel && !zEndIsNavigableButton.getSelection()) {
-					zEndIsNavigableButton.setSelection(true);
-				}
-			}
+        // now, define the controls for defining the zEnd properties...to do
+        // this, first add a
+        // new group to contain these controls
+        Group zEndBox = new Group(composite, SWT.NULL);
+        zEndBox.setText("zEnd Properties");
+        bLayout = new GridLayout();
+        bLayout.numColumns = endControlPanelCols;
+        zEndBox.setLayout(bLayout);
+        setFillBothLayout(zEndBox, endControlPanelCols, numRowsControlPanels);
+        // then define a text box (and a label for that text box) for editing
+        // type
+        // the role name
+        // for the zEnd
 
-		});
+        // N.M - Bugzilla 325546: Add type field to association edit dialog
+        Label zEndTypeLabel = new Label(zEndBox, SWT.NONE);
+        zEndTypeLabel.setText("Type:");
+        bgd = new GridData();
+        bgd.horizontalSpan = 1;
+        zEndTypeLabel.setLayoutData(bgd);
+        zEndTypeField = new Text(zEndBox, SWT.READ_ONLY | SWT.BORDER);
+        artifact = association.getZEnd();
+        if (artifact != null) 
+            zEndTypeField.setText(artifact.getName());	
+        zEndTypeField.setToolTipText("The zEnd type");
+        bgd = new GridData();
+        bgd.horizontalSpan = endControlPanelCols - 1;
+        bgd.verticalSpan = 1;
+        bgd.widthHint = 250;
+        zEndTypeField.setLayoutData(bgd);
 
-		boolean aEndIsOrdered = association.isAEndIsOrdered();
-		aEndIsOrderedButton = new Button(aEndBox, SWT.CHECK);
-		aEndIsOrderedButton.setText("isOrdered");
-		aEndIsOrderedButton.setSelection(aEndIsOrdered);
-		boolean aEndIsUnique = association.isAEndIsUnique();
-		aEndIsUniqueButton = new Button(aEndBox, SWT.CHECK);
-		aEndIsUniqueButton.setText("isUnique");
-		aEndIsUniqueButton.setSelection(aEndIsUnique);
 
-		// N.M: Bugzilla 321524: Inconsistent behaviour between association pop-up editor and association form
-		if (aEndMult.equals(AssocMultiplicity.ONE_LITERAL) || aEndMult.equals(AssocMultiplicity.ZERO_LITERAL) || aEndMult.equals(AssocMultiplicity.ZERO_ONE_LITERAL)) {
-			aEndIsUniqueButton.setEnabled(false);
-			aEndIsUniqueButton.setSelection(true);
-			aEndIsOrderedButton.setEnabled(false);
-			aEndIsOrderedButton.setSelection(false);
-		}
+        Label zEndRoleLabel = new Label(zEndBox, SWT.NULL);
+        zEndRoleLabel.setText("Name:");
+        bgd = new GridData();
+        bgd.horizontalSpan = 1;
+        zEndRoleLabel.setLayoutData(bgd);
+        zEndRoleNameField = new Text(zEndBox, SWT.BORDER);
+        zEndRoleNameField.setText(association.getZEndName());
+        zEndRoleNameField.setToolTipText("The zEnd role name");
+        zEndRoleNameField.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                updateOkButton();
+                setResetButtonStatuses();
+            }
+        });
+        bgd = new GridData();
+        bgd.horizontalSpan = endControlPanelCols - 2;
+        bgd.verticalSpan = 1;
+        bgd.widthHint = 200;
+        zEndRoleNameField.setLayoutData(bgd);
+        
+        
+        zEndRoleResetButton = new Button(zEndBox, SWT.PUSH);
+        zEndRoleResetButton.setText("Reset");
+        bgd = new GridData();
+        bgd.horizontalSpan = 1;
+        bgd.verticalSpan = 1;
+        bgd.widthHint = 50;
+        zEndRoleResetButton.setLayoutData(bgd);
+        zEndRoleResetButton.addSelectionListener( new SelectionAdapter() {
 
-		// now, define the controls for defining the zEnd properties...to do
-		// this, first add a
-		// new group to contain these controls
-		Group zEndBox = new Group(composite, SWT.NULL);
-		zEndBox.setText("zEnd Properties");
-		bLayout = new GridLayout();
-		bLayout.numColumns = endControlPanelCols;
-		zEndBox.setLayout(bLayout);
-		setFillBothLayout(zEndBox, endControlPanelCols, numRowsControlPanels);
-		// then define a text box (and a label for that text box) for editing
-		// type
-		// the role name
-		// for the zEnd
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                IAbstractArtifact art;
+                try {
+                    art = association.getCorrespondingIArtifact();
+                    if (art != null) {
+                        String name = nameFactory.getNewAssociationEndName(null ,art, IComponentNameProvider.ZEND);
+                        zEndRoleNameField.setText(name);
+                    }
+                } catch (TigerstripeException e1) {
+                   //just leave it as is..
+                }
+            }
 
-		// N.M - Bugzilla 325546: Add type field to association edit dialog
-		Label zEndTypeLabel = new Label(zEndBox, SWT.NONE);
-		zEndTypeLabel.setText("Type:");
-		bgd = new GridData();
-		bgd.horizontalSpan = 1;
-		zEndTypeLabel.setLayoutData(bgd);
-		zEndTypeField = new Text(zEndBox, SWT.READ_ONLY | SWT.BORDER);
-		artifact = association.getZEnd();
-		if (artifact != null) 
-			zEndTypeField.setText(artifact.getName());	
-		zEndTypeField.setToolTipText("The zEnd type");
-		bgd = new GridData();
-		bgd.horizontalSpan = endControlPanelCols - 1;
-		bgd.verticalSpan = 1;
-		bgd.widthHint = 200;
-		zEndTypeField.setLayoutData(bgd);
+        });
+        
+        
+        
+        
+        // add the control used to select the multiplicity
+        AssocMultiplicity zEndMult = association.getZEndMultiplicity();
+        Label zEndMultiplicityLabel = new Label(zEndBox, SWT.NULL);
+        zEndMultiplicityLabel.setText("Multiplicity:");
+        zEndMultiplicityCombo = new Combo(zEndBox, SWT.READ_ONLY);
+        for (String multLabel : multLabels) {
+            zEndMultiplicityCombo.add(multLabel);
+        }
+        zEndMultiplicityCombo.select(IModelComponent.EMultiplicity
+                .indexOf(zEndMult.getLiteral()));
+        zEndMultiplicityCombo.setVisibleItemCount(IModelComponent.EMultiplicity
+                .values().length);
 
+        // N.M: Bugzilla 321524: Inconsistent behaviour between association pop-up editor and association form
+        zEndMultiplicityCombo.addSelectionListener(new SelectionAdapter() {
+            @Override
+            public void widgetSelected(SelectionEvent e) {
+                Object source = e.getSource();
+                if (source instanceof Combo) {
+                    String value = ((Combo)source).getText();
 
-		Label zEndRoleLabel = new Label(zEndBox, SWT.NULL);
-		zEndRoleLabel.setText("Role Name:");
-		bgd = new GridData();
-		bgd.horizontalSpan = 1;
-		zEndRoleLabel.setLayoutData(bgd);
-		zEndRoleNameField = new Text(zEndBox, SWT.BORDER);
-		zEndRoleNameField.setText(association.getZEndName());
-		zEndRoleNameField.setToolTipText("The zEnd role name");
-		zEndRoleNameField.addModifyListener(new ModifyListener() {
-			public void modifyText(ModifyEvent e) {
-				updateOkButton();
-			}
-		});
-		bgd = new GridData();
-		bgd.horizontalSpan = endControlPanelCols - 1;
-		bgd.verticalSpan = 1;
-		bgd.widthHint = 200;
-		zEndRoleNameField.setLayoutData(bgd);
-		// add the control used to select the multiplicity
-		AssocMultiplicity zEndMult = association.getZEndMultiplicity();
-		Label zEndMultiplicityLabel = new Label(zEndBox, SWT.NULL);
-		zEndMultiplicityLabel.setText("Multiplicity:");
-		zEndMultiplicityCombo = new Combo(zEndBox, SWT.READ_ONLY);
-		for (String multLabel : multLabels) {
-			zEndMultiplicityCombo.add(multLabel);
-		}
-		zEndMultiplicityCombo.select(IModelComponent.EMultiplicity
-				.indexOf(zEndMult.getLiteral()));
-		zEndMultiplicityCombo.setVisibleItemCount(IModelComponent.EMultiplicity
-				.values().length);
+                    if (value.equals(AssocMultiplicity.ONE_LITERAL.getLiteral()) || value.equals(AssocMultiplicity.ZERO_LITERAL.getLiteral()) || value.equals(AssocMultiplicity.ZERO_ONE_LITERAL.getLiteral())) {
+                        zEndIsUniqueButton.setEnabled(false);
+                        zEndIsUniqueButton.setSelection(true);
+                        zEndIsOrderedButton.setEnabled(false);
+                        zEndIsOrderedButton.setSelection(false);
+                    } else {
+                        zEndIsUniqueButton.setEnabled(true);
+                        zEndIsOrderedButton.setEnabled(true);
+                    }
+                }
+            }
+        });
 
-		// N.M: Bugzilla 321524: Inconsistent behaviour between association pop-up editor and association form
-		zEndMultiplicityCombo.addSelectionListener(new SelectionAdapter() {
-			@Override
-			public void widgetSelected(SelectionEvent e) {
-				Object source = e.getSource();
-				if (source instanceof Combo) {
-					String value = ((Combo)source).getText();
-					
-					if (value.equals(AssocMultiplicity.ONE_LITERAL.getLiteral()) || value.equals(AssocMultiplicity.ZERO_LITERAL.getLiteral()) || value.equals(AssocMultiplicity.ZERO_ONE_LITERAL.getLiteral())) {
-						zEndIsUniqueButton.setEnabled(false);
-						zEndIsUniqueButton.setSelection(true);
-						zEndIsOrderedButton.setEnabled(false);
-						zEndIsOrderedButton.setSelection(false);
-					} else {
-						zEndIsUniqueButton.setEnabled(true);
-						zEndIsOrderedButton.setEnabled(true);
-					}
-				}
-			}
-		});
+        Label zEndMultiplicityFiller = new Label(zEndBox, SWT.NULL);
+        this.setFillLayout(zEndMultiplicityFiller, 2, 1);
+        // add the control used to select the visibility
+        Visibility zEndVisibility = association.getZEndVisibility();
+        Label zEndVisibilityLabel = new Label(zEndBox, SWT.NULL);
+        zEndVisibilityLabel.setText("Visibility:");
+        zEndVisibilityCombo = new Combo(zEndBox, SWT.READ_ONLY);
+        for (String visibilityStrVal : visibilityStrVals) {
+            zEndVisibilityCombo.add(visibilityStrVal);
+        }
+        zEndVisibilityCombo.select(zEndVisibility.getValue());
+        Label zEndVisibilityFiller = new Label(zEndBox, SWT.NULL);
+        this.setFillLayout(zEndVisibilityFiller, 2, 1);
+        // add the control used to select none/composition/aggregation
+        AggregationEnum zEndAggregation = association.getZEndAggregation();
+        Label zEndAggregationLabel = new Label(zEndBox, SWT.NULL);
+        zEndAggregationLabel.setText("Aggregation:");
+        zEndAggregationCombo = new Combo(zEndBox, SWT.READ_ONLY);
+        for (String aggregationStrVal : aggregationStrVals) {
+            zEndAggregationCombo.add(aggregationStrVal);
+        }
+        zEndAggregationCombo.select(zEndAggregation.getValue());
+        zEndAggregationCombo.addSelectionListener(new SelectionListener() {
 
-		Label zEndMultiplicityFiller = new Label(zEndBox, SWT.NULL);
-		this.setFillLayout(zEndMultiplicityFiller, 2, 1);
-		// add the control used to select the visibility
-		Visibility zEndVisibility = association.getZEndVisibility();
-		Label zEndVisibilityLabel = new Label(zEndBox, SWT.NULL);
-		zEndVisibilityLabel.setText("Visibility:");
-		zEndVisibilityCombo = new Combo(zEndBox, SWT.READ_ONLY);
-		for (String visibilityStrVal : visibilityStrVals) {
-			zEndVisibilityCombo.add(visibilityStrVal);
-		}
-		zEndVisibilityCombo.select(zEndVisibility.getValue());
-		Label zEndVisibilityFiller = new Label(zEndBox, SWT.NULL);
-		this.setFillLayout(zEndVisibilityFiller, 2, 1);
-		// add the control used to select none/composition/aggregation
-		AggregationEnum zEndAggregation = association.getZEndAggregation();
-		Label zEndAggregationLabel = new Label(zEndBox, SWT.NULL);
-		zEndAggregationLabel.setText("Aggregation:");
-		zEndAggregationCombo = new Combo(zEndBox, SWT.READ_ONLY);
-		for (String aggregationStrVal : aggregationStrVals) {
-			zEndAggregationCombo.add(aggregationStrVal);
-		}
-		zEndAggregationCombo.select(zEndAggregation.getValue());
-		zEndAggregationCombo.addSelectionListener(new SelectionListener() {
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
 
-			public void widgetDefaultSelected(SelectionEvent e) {
-			}
+            public void widgetSelected(SelectionEvent e) {
+                EAggregationEnum ag = EAggregationEnum
+                        .parse(zEndAggregationCombo
+                                .getItem(zEndAggregationCombo
+                                        .getSelectionIndex()));
+                EAggregationEnum oag = EAggregationEnum
+                        .parse(aEndAggregationCombo
+                                .getItem(aEndAggregationCombo
+                                        .getSelectionIndex()));
 
-			public void widgetSelected(SelectionEvent e) {
-				EAggregationEnum ag = EAggregationEnum
-						.parse(zEndAggregationCombo
-								.getItem(zEndAggregationCombo
-										.getSelectionIndex()));
-				EAggregationEnum oag = EAggregationEnum
-						.parse(aEndAggregationCombo
-								.getItem(aEndAggregationCombo
-										.getSelectionIndex()));
+                if (ag != EAggregationEnum.NONE && oag != EAggregationEnum.NONE) {
+                    aEndAggregationCombo.select(0);
+                }
+            }
 
-				if (ag != EAggregationEnum.NONE && oag != EAggregationEnum.NONE) {
-					aEndAggregationCombo.select(0);
-				}
-			}
+        });
+        Label zEndAggregationFiller = new Label(zEndBox, SWT.NULL);
+        this.setFillLayout(zEndAggregationFiller, 2, 1);
+        // add the controls to chose if the end is navigable, ordered, and/or
+        // unique
+        boolean zEndIsNavigable = association.isZEndIsNavigable();
+        zEndIsNavigableButton = new Button(zEndBox, SWT.CHECK);
+        zEndIsNavigableButton.setText("isNavigable");
+        zEndIsNavigableButton.setSelection(zEndIsNavigable);
+        zEndIsNavigableButton.addSelectionListener(new SelectionListener() {
 
-		});
-		Label zEndAggregationFiller = new Label(zEndBox, SWT.NULL);
-		this.setFillLayout(zEndAggregationFiller, 2, 1);
-		// add the controls to chose if the end is navigable, ordered, and/or
-		// unique
-		boolean zEndIsNavigable = association.isZEndIsNavigable();
-		zEndIsNavigableButton = new Button(zEndBox, SWT.CHECK);
-		zEndIsNavigableButton.setText("isNavigable");
-		zEndIsNavigableButton.setSelection(zEndIsNavigable);
-		zEndIsNavigableButton.addSelectionListener(new SelectionListener() {
+            public void widgetDefaultSelected(SelectionEvent e) {
+            }
 
-			public void widgetDefaultSelected(SelectionEvent e) {
-			}
+            public void widgetSelected(SelectionEvent e) {
+                boolean sel = zEndIsNavigableButton.getSelection();
+                if (!sel && !aEndIsNavigableButton.getSelection()) {
+                    aEndIsNavigableButton.setSelection(true);
+                }
+            }
 
-			public void widgetSelected(SelectionEvent e) {
-				boolean sel = zEndIsNavigableButton.getSelection();
-				if (!sel && !aEndIsNavigableButton.getSelection()) {
-					aEndIsNavigableButton.setSelection(true);
-				}
-			}
+        });
+        boolean zEndIsOrdered = association.isZEndIsOrdered();
+        zEndIsOrderedButton = new Button(zEndBox, SWT.CHECK);
+        zEndIsOrderedButton.setText("isOrdered");
+        zEndIsOrderedButton.setSelection(zEndIsOrdered);
+        boolean zEndIsUnique = association.isZEndIsUnique();
+        zEndIsUniqueButton = new Button(zEndBox, SWT.CHECK);
+        zEndIsUniqueButton.setText("isUnique");
+        zEndIsUniqueButton.setSelection(zEndIsUnique);
 
-		});
-		boolean zEndIsOrdered = association.isZEndIsOrdered();
-		zEndIsOrderedButton = new Button(zEndBox, SWT.CHECK);
-		zEndIsOrderedButton.setText("isOrdered");
-		zEndIsOrderedButton.setSelection(zEndIsOrdered);
-		boolean zEndIsUnique = association.isZEndIsUnique();
-		zEndIsUniqueButton = new Button(zEndBox, SWT.CHECK);
-		zEndIsUniqueButton.setText("isUnique");
-		zEndIsUniqueButton.setSelection(zEndIsUnique);
-		
-		// N.M: Bugzilla 321524: Inconsistent behaviour between association pop-up editor and association form
-		if (zEndMult.equals(AssocMultiplicity.ONE_LITERAL) || zEndMult.equals(AssocMultiplicity.ZERO_LITERAL) || zEndMult.equals(AssocMultiplicity.ZERO_ONE_LITERAL)) {
-			zEndIsUniqueButton.setEnabled(false);
-			zEndIsUniqueButton.setSelection(true);
-			zEndIsOrderedButton.setEnabled(false);
-			zEndIsOrderedButton.setSelection(false);
-		}
-	}
+        // N.M: Bugzilla 321524: Inconsistent behaviour between association pop-up editor and association form
+        if (zEndMult.equals(AssocMultiplicity.ONE_LITERAL) || zEndMult.equals(AssocMultiplicity.ZERO_LITERAL) || zEndMult.equals(AssocMultiplicity.ZERO_ONE_LITERAL)) {
+            zEndIsUniqueButton.setEnabled(false);
+            zEndIsUniqueButton.setSelection(true);
+            zEndIsOrderedButton.setEnabled(false);
+            zEndIsOrderedButton.setSelection(false);
+        }
+        
+        // Set initial state
+        setResetButtonStatuses();
+    }
 
-	private IStereotype[] getAvailableStereotypes(IAbstractArtifact iArtifact) {
-		List<IStereotype> stereotypes = new ArrayList<IStereotype>();
-		IWorkbenchProfile profile = TigerstripeCore
-				.getWorkbenchProfileSession().getActiveProfile();
-		stereotypes.addAll(profile.getAvailableStereotypeForCapable(iArtifact));
+    private IStereotype[] getAvailableStereotypes(IAbstractArtifact iArtifact) {
+        List<IStereotype> stereotypes = new ArrayList<IStereotype>();
+        IWorkbenchProfile profile = TigerstripeCore
+                .getWorkbenchProfileSession().getActiveProfile();
+        stereotypes.addAll(profile.getAvailableStereotypeForCapable(iArtifact));
 
-		Collections.sort(stereotypes, new Comparator<IStereotype>() {
-			public int compare(IStereotype o1, IStereotype o2) {
-				return o1.getName().compareTo(o2.getName());
-			}
-		});
-		return stereotypes.toArray(new IStereotype[stereotypes.size()]);
-	}
+        Collections.sort(stereotypes, new Comparator<IStereotype>() {
+            public int compare(IStereotype o1, IStereotype o2) {
+                return o1.getName().compareTo(o2.getName());
+            }
+        });
+        return stereotypes.toArray(new IStereotype[stereotypes.size()]);
+    }
 
-	private String getStereotypeLabel(List stereotypeVals) {
-		if (stereotypeVals.size() > 0) {
-			StringBuffer buff = new StringBuffer();
-			buff.append("<<");
-			int count = 0;
-			for (Object stereotypeVal : stereotypeVals) {
-				buff.append(stereotypeVal.toString());
-				if (++count < stereotypeVals.size())
-					buff.append(", ");
-			}
-			buff.append(">>");
-			return buff.toString();
-		}
-		return "";
-	}
+    private String getStereotypeLabel(List stereotypeVals) {
+        if (stereotypeVals.size() > 0) {
+            StringBuffer buff = new StringBuffer();
+            buff.append("<<");
+            int count = 0;
+            for (Object stereotypeVal : stereotypeVals) {
+                buff.append(stereotypeVal.toString());
+                if (++count < stereotypeVals.size())
+                    buff.append(", ");
+            }
+            buff.append(">>");
+            return buff.toString();
+        }
+        return "";
+    }
 
-	private void setFillLayout(Control control, int nCols, int nRows) {
-		GridData bgd = new GridData(GridData.FILL_HORIZONTAL
-				| GridData.GRAB_HORIZONTAL);
-		bgd.horizontalSpan = nCols;
-		bgd.verticalSpan = nRows;
-		control.setLayoutData(bgd);
-	}
+    private void setFillLayout(Control control, int nCols, int nRows) {
+        GridData bgd = new GridData(GridData.FILL_HORIZONTAL
+                | GridData.GRAB_HORIZONTAL);
+        bgd.horizontalSpan = nCols;
+        bgd.verticalSpan = nRows;
+        control.setLayoutData(bgd);
+    }
 
-	private void setFillBothLayout(Control control, int nCols, int nRows) {
-		GridData bgd = new GridData(GridData.FILL_BOTH
-				| GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
-		bgd.horizontalSpan = nCols;
-		bgd.verticalSpan = nRows;
-		control.setLayoutData(bgd);
-	}
+    private void setFillBothLayout(Control control, int nCols, int nRows) {
+        GridData bgd = new GridData(GridData.FILL_BOTH
+                | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);
+        bgd.horizontalSpan = nCols;
+        bgd.verticalSpan = nRows;
+        control.setLayoutData(bgd);
+    }
 
 
-	@Override
-	protected void okPressed() {
+    @Override
+    protected void okPressed() {
 
-		changedValuesMap.clear();
+        changedValuesMap.clear();
 
-		String newAssociationStereotypes = associationStereotypesField
-				.getText();
-		if (!origAssociationStereotypesStringVal
-				.equals(newAssociationStereotypes)) {
-			List<Stereotype> newAssocStereotypeVals = new ArrayList();
-			newAssocStereotypeVals.addAll(newAssocStereotypes);
-			changedValuesMap.put("assocStereotypes", newAssocStereotypeVals);
-		}
-		// add any changed aEnd properites to the changedValuesMap
-		if ((aEndRoleName!=null) && (!aEndRoleName.equals(association.getAEndName())))
-			changedValuesMap.put("aEndName", aEndRoleName);
-		String newAEndMultiplicity = IModelComponent.EMultiplicity.at(
-				aEndMultiplicityCombo.getSelectionIndex()).getLabel();
-		if (!newAEndMultiplicity.equals(association.getAEndMultiplicity()
-				.getLiteral()))
-			changedValuesMap.put("aEndMultiplicity", newAEndMultiplicity);
-		String newAEndVisibility = Visibility.get(
-				aEndVisibilityCombo.getSelectionIndex()).getName();
-		if (!newAEndVisibility.equals(association.getAEndVisibility()
-				.getLiteral()))
-			changedValuesMap.put("aEndVisibility", newAEndVisibility);
-		String newAEndAggregation = AggregationEnum.get(
-				aEndAggregationCombo.getSelectionIndex()).getName();
-		if (!newAEndAggregation.equals(association.getAEndAggregation()
-				.getLiteral()))
-			changedValuesMap.put("aEndAggregation", newAEndAggregation);
-		boolean aEndIsNavigable = aEndIsNavigableButton.getSelection();
-		if (aEndIsNavigable != association.isAEndIsNavigable())
-			changedValuesMap.put("aEndIsNavigable", Boolean
-					.valueOf(aEndIsNavigable));
-		boolean aEndIsUnique = aEndIsUniqueButton.getSelection();
-		if (aEndIsUnique != association.isAEndIsUnique())
-			changedValuesMap.put("aEndIsUnique", Boolean.valueOf(aEndIsUnique));
-		boolean aEndIsOrdered = aEndIsOrderedButton.getSelection();
-		if (aEndIsOrdered != association.isAEndIsOrdered())
-			changedValuesMap.put("aEndIsOrdered", Boolean
-					.valueOf(aEndIsOrdered));
-		// and do the same for any changed zEnd properties...
-		if ((zEndRoleName!=null) && (!zEndRoleName.equals(association.getZEndName())))
-			changedValuesMap.put("zEndName", zEndRoleName);
-		String newZEndMultiplicity = IModelComponent.EMultiplicity.at(
-				zEndMultiplicityCombo.getSelectionIndex()).getLabel();
-		if (!newZEndMultiplicity.equals(association.getZEndMultiplicity()
-				.getLiteral()))
-			changedValuesMap.put("zEndMultiplicity", newZEndMultiplicity);
-		String newZEndVisibility = Visibility.get(
-				zEndVisibilityCombo.getSelectionIndex()).getName();
-		if (!newZEndVisibility.equals(association.getZEndVisibility()
-				.getLiteral()))
-			changedValuesMap.put("zEndVisibility", newZEndVisibility);
-		String newZEndAggregation = AggregationEnum.get(
-				zEndAggregationCombo.getSelectionIndex()).getName();
-		if (!newZEndAggregation.equals(association.getZEndAggregation()
-				.getLiteral()))
-			changedValuesMap.put("zEndAggregation", newZEndAggregation);
-		boolean zEndIsNavigable = zEndIsNavigableButton.getSelection();
-		if (zEndIsNavigable != association.isZEndIsNavigable())
-			changedValuesMap.put("zEndIsNavigable", Boolean
-					.valueOf(zEndIsNavigable));
-		boolean zEndIsUnique = zEndIsUniqueButton.getSelection();
-		if (zEndIsUnique != association.isZEndIsUnique())
-			changedValuesMap.put("zEndIsUnique", Boolean.valueOf(zEndIsUnique));
-		boolean zEndIsOrdered = zEndIsOrderedButton.getSelection();
-		if (zEndIsOrdered != association.isZEndIsOrdered())
-			changedValuesMap.put("zEndIsOrdered", Boolean
-					.valueOf(zEndIsOrdered));
-		super.okPressed();
-	}
+        String newAssociationStereotypes = associationStereotypesField
+                .getText();
+        if (!origAssociationStereotypesStringVal
+                .equals(newAssociationStereotypes)) {
+            List<Stereotype> newAssocStereotypeVals = new ArrayList();
+            newAssocStereotypeVals.addAll(newAssocStereotypes);
+            changedValuesMap.put("assocStereotypes", newAssocStereotypeVals);
+        }
+        // add any changed aEnd properites to the changedValuesMap
+        if ((aEndRoleName!=null) && (!aEndRoleName.equals(association.getAEndName())))
+            changedValuesMap.put("aEndName", aEndRoleName);
+        String newAEndMultiplicity = IModelComponent.EMultiplicity.at(
+                aEndMultiplicityCombo.getSelectionIndex()).getLabel();
+        if (!newAEndMultiplicity.equals(association.getAEndMultiplicity()
+                .getLiteral()))
+            changedValuesMap.put("aEndMultiplicity", newAEndMultiplicity);
+        String newAEndVisibility = Visibility.get(
+                aEndVisibilityCombo.getSelectionIndex()).getName();
+        if (!newAEndVisibility.equals(association.getAEndVisibility()
+                .getLiteral()))
+            changedValuesMap.put("aEndVisibility", newAEndVisibility);
+        String newAEndAggregation = AggregationEnum.get(
+                aEndAggregationCombo.getSelectionIndex()).getName();
+        if (!newAEndAggregation.equals(association.getAEndAggregation()
+                .getLiteral()))
+            changedValuesMap.put("aEndAggregation", newAEndAggregation);
+        boolean aEndIsNavigable = aEndIsNavigableButton.getSelection();
+        if (aEndIsNavigable != association.isAEndIsNavigable())
+            changedValuesMap.put("aEndIsNavigable", Boolean
+                    .valueOf(aEndIsNavigable));
+        boolean aEndIsUnique = aEndIsUniqueButton.getSelection();
+        if (aEndIsUnique != association.isAEndIsUnique())
+            changedValuesMap.put("aEndIsUnique", Boolean.valueOf(aEndIsUnique));
+        boolean aEndIsOrdered = aEndIsOrderedButton.getSelection();
+        if (aEndIsOrdered != association.isAEndIsOrdered())
+            changedValuesMap.put("aEndIsOrdered", Boolean
+                    .valueOf(aEndIsOrdered));
+        // and do the same for any changed zEnd properties...
+        if ((zEndRoleName!=null) && (!zEndRoleName.equals(association.getZEndName())))
+            changedValuesMap.put("zEndName", zEndRoleName);
+        String newZEndMultiplicity = IModelComponent.EMultiplicity.at(
+                zEndMultiplicityCombo.getSelectionIndex()).getLabel();
+        if (!newZEndMultiplicity.equals(association.getZEndMultiplicity()
+                .getLiteral()))
+            changedValuesMap.put("zEndMultiplicity", newZEndMultiplicity);
+        String newZEndVisibility = Visibility.get(
+                zEndVisibilityCombo.getSelectionIndex()).getName();
+        if (!newZEndVisibility.equals(association.getZEndVisibility()
+                .getLiteral()))
+            changedValuesMap.put("zEndVisibility", newZEndVisibility);
+        String newZEndAggregation = AggregationEnum.get(
+                zEndAggregationCombo.getSelectionIndex()).getName();
+        if (!newZEndAggregation.equals(association.getZEndAggregation()
+                .getLiteral()))
+            changedValuesMap.put("zEndAggregation", newZEndAggregation);
+        boolean zEndIsNavigable = zEndIsNavigableButton.getSelection();
+        if (zEndIsNavigable != association.isZEndIsNavigable())
+            changedValuesMap.put("zEndIsNavigable", Boolean
+                    .valueOf(zEndIsNavigable));
+        boolean zEndIsUnique = zEndIsUniqueButton.getSelection();
+        if (zEndIsUnique != association.isZEndIsUnique())
+            changedValuesMap.put("zEndIsUnique", Boolean.valueOf(zEndIsUnique));
+        boolean zEndIsOrdered = zEndIsOrderedButton.getSelection();
+        if (zEndIsOrdered != association.isZEndIsOrdered())
+            changedValuesMap.put("zEndIsOrdered", Boolean
+                    .valueOf(zEndIsOrdered));
+        super.okPressed();
+    }
 
-	public Map<String, Object> getChangedValuesMap() {
-		return changedValuesMap;
-	}
+    public Map<String, Object> getChangedValuesMap() {
+        return changedValuesMap;
+    }
 
 }