geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r480179 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java
Date Tue, 28 Nov 2006 19:56:54 GMT
Author: sppatel
Date: Tue Nov 28 11:56:52 2006
New Revision: 480179

URL: http://svn.apache.org/viewvc?view=rev&rev=480179
Log:
fix unable to add refType, assumed single value

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java?view=diff&rev=480179&r1=480178&r2=480179
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/org/apache/geronimo/st/ui/wizards/AbstractTableWizard.java
Tue Nov 28 11:56:52 2006
@@ -17,6 +17,7 @@
 package org.apache.geronimo.st.ui.wizards;
 
 import org.apache.geronimo.st.ui.Activator;
+import org.apache.geronimo.st.ui.internal.Trace;
 import org.apache.geronimo.st.ui.sections.AbstractTableSection;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EAttribute;
@@ -75,9 +76,15 @@
 			for (int i = 0; i < getTableColumnEAttributes().length; i++) {
 				String value = ((DynamicWizardPage) page).textEntries[i].getText();
 				EAttribute attribute = getTableColumnEAttributes()[i];
+				System.out.println(attribute.isMany());
 				if (attribute.getEContainingClass().equals(eObject.eClass())) {
-					if (value != null && value.trim().length() != 0)
-						eObject.eSet(attribute, value);
+					if (value != null && value.trim().length() != 0) {
+						if(attribute.isMany()) {
+							((EList) eObject.eGet(attribute)).add(value);
+						} else {
+							eObject.eSet(attribute, value);
+						}
+					}
 				} else {
 					// TODO
 				}



Mime
View raw message