[205515] unable to add/edit attribute references for complex types in schema
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeDeclarationSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeDeclarationSection.java
index ce46a7f..b3c0916 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeDeclarationSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeDeclarationSection.java
@@ -139,7 +139,6 @@
     data.horizontalAlignment = GridData.FILL;
     typeCombo = getWidgetFactory().createCCombo(composite);
     typeCombo.setLayoutData(data);
-    typeCombo.setEnabled(!isAttributeReference);
     typeCombo.addSelectionListener(this);
     
     PlatformUI.getWorkbench().getHelpSystem().setHelp(typeCombo,
@@ -450,7 +449,8 @@
         if (dialog.createAndOpen() == Window.OK)
         {
           newValue = dialog.getSelectedComponent();
-          manager.modifyComponentReference(input, newValue);
+          XSDAttributeDeclaration xsdAttribute = ((XSDAttributeDeclaration) input).getResolvedAttributeDeclaration();
+          manager.modifyComponentReference(xsdAttribute, newValue);
         }
         else{
         	typeCombo.setText(typeName);
diff --git a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java
index 35da31f..fbae5a1 100644
--- a/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java
+++ b/bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java
@@ -148,7 +148,6 @@
     typeCombo = getWidgetFactory().createCCombo(composite); //$NON-NLS-1$
     typeCombo.setEditable(false);
     typeCombo.setLayoutData(data);
-    typeCombo.setEnabled(!isElementReference);
     typeCombo.addSelectionListener(this);
     PlatformUI.getWorkbench().getHelpSystem().setHelp(typeCombo,
     		XSDEditorCSHelpIds.GENERAL_TAB__ELEMENT__TYPE);
@@ -382,7 +381,8 @@
         if (dialog.createAndOpen() == Window.OK)
         {
           newValue = dialog.getSelectedComponent();
-          manager.modifyComponentReference(input, newValue);
+          XSDElementDeclaration elementDeclaration = ((XSDElementDeclaration) input).getResolvedElementDeclaration();
+          manager.modifyComponentReference(elementDeclaration, newValue);
         }
         else
         {