Xcore and FeatureMaps [message #1011295] |
Tue, 19 February 2013 04:01  |
Eclipse User |
|
|
|
Hi,
I am trying to get FeatureMaps to work with Xcore. Is this possible and if yes, how can this be done?
Thanks
Jan
|
|
|
|
|
|
|
|
|
Re: Xcore and FeatureMaps [message #1011763 is a reply to message #1011757] |
Wed, 20 February 2013 03:02   |
Eclipse User |
|
|
|
Jan,
Please open a bugzilla with the details and the example. The import
"org.eclipse.emf.ecore.EFeatureMapEntry" refers to the EDataType in
Ecore.ecore; you won't find it in Java. In general Xcore's imports can
refer to EClassifiers or to Java types (or even to both, e.g., for
generated EClasses).
On 20/02/2013 8:56 AM, Jan Rosczak wrote:
> Hi,
>
> yes, the reflective feature delegation breaks feature maps.
>
>
> Supplier supplier = ModelFactory.eINSTANCE.createSupplier();
>
> PurchaseOrder preferredOrder =
> ModelFactory.eINSTANCE.createPurchaseOrder();
> PurchaseOrder standardOrder =
> ModelFactory.eINSTANCE.createPurchaseOrder();
>
> supplier.getOrders().add(ModelPackage.Literals.SUPPLIER__PREFERRED_ORDERS,
> preferredOrder);
> supplier.getOrders().add(ModelPackage.Literals.SUPPLIER__STANDARD_ORDERS,
> standardOrder);
>
> System.out.println(supplier.getOrders().size()); // prints 2
> System.out.println(supplier.getPreferredOrders().size()); // prints 0
> System.out.println(supplier.getStandardOrders().size()); // prints 0
>
>
> If the feature map would still work, the last two lines should each
> print "1".
> ----
>
> In the example you showed, the import of
> "org.eclipse.emf.ecore.EFeatureMapEntry" bothered me. In which plugin
> can this class be found (I looked in git repository with no result)?
> Thats why I changed it to:
> type EFeatureMapEntry wraps FeatureMap$Entry
>
> That works.
>
|
|
|
|
Re: Xcore and FeatureMaps [message #1391047 is a reply to message #1390945] |
Mon, 30 June 2014 07:18  |
Eclipse User |
|
|
|
Marco,
I don't recall. If it's not working in the latest release (in the Luna
repo), please open a bugzilla.
On 30/06/2014 10:00 AM, Marco Descher wrote:
> Was there a bug created on this? Currently trying to get FeatureMaps
> running with XCore ... any updates? Thank you!
|
|
|
Powered by
FUDForum. Page generated in 0.05289 seconds