You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ke...@apache.org on 2007/01/30 12:51:42 UTC

svn commit: r501378 [3/3] - in /incubator/tuscany/java/sdo: impl/src/main/java/org/apache/tuscany/sdo/impl/ tools/src/main/java/org/apache/tuscany/sdo/generate/templates/model/ tools/src/test/resources/ tools/templates/models/

Added: incubator/tuscany/java/sdo/tools/src/test/resources/TUSCANY1050.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/src/test/resources/TUSCANY1050.xsd?view=auto&rev=501378
==============================================================================
--- incubator/tuscany/java/sdo/tools/src/test/resources/TUSCANY1050.xsd (added)
+++ incubator/tuscany/java/sdo/tools/src/test/resources/TUSCANY1050.xsd Tue Jan 30 03:51:41 2007
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:tns="http://test.data" 
+            xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+            elementFormDefault="qualified" 
+            targetNamespace="http://test.data">
+
+   <xsd:element name="description" type="tns:description"/>
+    <xsd:complexType name="description">
+        <xsd:sequence>
+            <xsd:element name="field1" type="xsd:string"/>
+            <xsd:element name="field2" type="xsd:string"/>
+            <xsd:element name="field3" type="xsd:string"/>
+            <xsd:element name="field4" type="xsd:string"/>
+        </xsd:sequence>
+    </xsd:complexType>
+
+
+    <xsd:element name="Wrapper" type="tns:Wrapper"/>
+    <xsd:complexType name="Wrapper">
+        <xsd:sequence>
+            <xsd:element name="description" nillable="true" type="tns:description"/>
+        </xsd:sequence>
+    </xsd:complexType>
+</xsd:schema>
+

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/TUSCANY1050.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/TUSCANY1050.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sdo/tools/src/test/resources/TUSCANY1050.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet?view=diff&rev=501378&r1=501377&r2=501378
==============================================================================
--- incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet (original)
+++ incubator/tuscany/java/sdo/tools/templates/models/SDOClass.javajet Tue Jan 30 03:51:41 2007
@@ -938,8 +938,11 @@
         <%if (!genModel.isSuppressNotification()) {%>
 		if (isNotifying())
 		{
-			<%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%> notification = new <%=genModel.getImportedName("org.eclipse.emf.ecore.impl.ENotificationImpl")%>(this, <%=genModel.getImportedName("org.eclipse.emf.common.notify.Notification")%>.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? old<%=genFeature.getCapName()%> : null<%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>old<%=genFeature.getCapName()%>_set_<%}%>);
-			if (changeContext == null) changeContext = notification; else changeContext.add(notification);
+            <%if (genFeature.isUnsettable()) {%>
+			addNotification(this, ChangeKind.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>isSetChange ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, null, <%if (genModel.isVirtualDelegation()) {%>isSetChange<%} else {%>!old<%=genFeature.getCapName()%>_set_<%}%>, changeContext);
+            <%} else {%>
+			addNotification(this, ChangeKind.UNSET, <%=genFeature.getUpperName()%>, <%if (genModel.isVirtualDelegation()) {%>old<%=genFeature.getCapName()%> == EVIRTUAL_NO_VALUE ? null : old<%=genFeature.getCapName()%><%} else {%>old<%=genFeature.getCapName()%><%}%>, null, changeContext);
+            <%}%>
 		}
 		return changeContext;
         <%}%>
@@ -1000,10 +1003,10 @@
 		if (<%=genFeature.getSafeName()%> != null)
 		{
 			ChangeContext changeContext = null;
-        <%if (!genFeature.isBidirectional()) {%>
-			changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
-        <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
-			changeContext = ((<%=genModel.getImportedName("org.eclipse.emf.ecore.InternalEObject")%>)<%=genFeature.getSafeName()%>).inverseRemove(this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
+            <%if (!genFeature.isBidirectional()) {%>
+			changeContext = inverseRemove(<%=genFeature.getSafeName()%>, this, EOPPOSITE_FEATURE_BASE - <%=genFeature.getUpperName()%>, null, changeContext);
+            <%} else { GenFeature reverseFeature = genFeature.getReverse(); GenClass targetClass = reverseFeature.getGenClass();%>
+			changeContext = inverseRemove(<%=genFeature.getSafeName()%>, this, <%=targetClass.getQualifiedFeatureID(reverseFeature)%>, <%=targetClass.getImportedInterfaceName()%>.class, changeContext);
         <%}%>
 			changeContext = basicUnset<%=genFeature.getAccessorName()%>(changeContext);
 			if (changeContext != null) dispatch(changeContext);



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org