[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: Serialization: additional date formats


That is deeply spiffy. I think I'm going to stick with using AST to generate the methods so that my users don't have to think about it, but I can see this being tremendously useful for us. Thanks for the tip!


          Jason


Ed Merks wrote:
Jason,

Your wish is my demand! Err, I mean command. Here's an example of an EOperation expressed in XML Schema using appinfo.

<xsd:complexType ecore:implements="sdo:DataObject" name="EDataObject">
<xsd:annotation>
<xsd:appinfo *ecore:key="operations"* s*ource="http://www.eclipse.org/emf/2002/Ecore"*>
* <operation name="getInstanceProperties" type="sdo:EJavaList{sdo:Property}">
<body>return &lt;%org.eclipse.emf.ecore.sdo.util.SDOUtil%&gt;.getInstanceProperties(this);</body>
</operation>*
</xsd:appinfo>
</xsd:annotation>
</xsd:complexType>


You can generate your own example by using Generator->Export Model...->XML Schema from a GenModel for an Ecore model that has an EOperation with a body EAnnotation. Note that <%a.b.C%> (with escaped < and >) is the way to express something that should be imported as it's being generation.