|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: [Xcore] *.xmi or *.ecore as an output [message #1731583 is a reply to message #1731582] |
Sat, 07 May 2016 07:39 |
Ed Merks Messages: 33216 Registered: July 2009 |
Senior Member |
|
|
Parisa,
Both are correct and both should work fine. One refers to the static
generated EcorePackage.eINSTANCE while the other refers to the
development time instance loaded from the Ecore plugin in your target
platform. Xcore will always use the latter.
On 07.05.2016 09:09, Parisa Moosavi wrote:
> Hi,
>
> I have such a xcore file:
>
> @Ecore(nsURI="http://www.eclipse.org/emf/2002/EcoreI")
> package ecoreI
>
>
> import android.content.Intent
> import android.content.Context
>
> type Intent wraps Intent
> type Context wraps Context
>
> class PhoneBook{
> resolving contains Person[0..*] AllPersons
> }
>
> class Person{
> unique String Surname
> unique String Forename
> unique String MobileNumber
> unique String OfficeNumber
> resolving contains Address[0..1] address
>
> unique Intent intent
> unique Context context
>
> op void callMobileNumber() {
> var uri = 'tel:' + this.getMobileNumber();
> intent = new
> android.content.Intent(android.content.Intent.ACTION_CALL);
> intent.setData(android.net.Uri.parse(uri));
> intent.addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
> context.startActivity(intent);
> }
> }
>
> class Address{
> unique String City
> unique String ZIP
> unique String Street
> unique String Number
> }
>
>
>
>
> after generating ecore file from this xcore file I see such a conversion
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
> <eType xsi:type="ecore:EDataType"
> href="../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
> </eStructuralFeatures>
>
>
> but what I expected is :
>
> <eStructuralFeatures xsi:type="ecore:EAttribute" name="Surname">
> <eType xsi:type="ecore:EDataType"
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
> </eStructuralFeatures>
>
>
>
> which parameter should be set in xcore file to have a href like
> href="http://www.eclipse.org/emf/2002/Ecore#//EString"?
>
> Thanks
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.05671 seconds