Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [XCore] Type definition of array of generic.(Type definition of array of generic.)
[XCore] Type definition of array of generic. [message #1797915] Thu, 08 November 2018 13:37 Go to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Hi,

I use the latest 2018-09 Eclipse/EMF version. I found something strange while I was modelling an array of generics. Let's say I want to model the following method:

public Binding[] bindValues(DataBindingContext context, IObservableValue<?> targetObservableValue, IObservableValue[] modelObservableValues, UpdateValueStrategy<?, ?> modelToTarget)


In XCore I modeled it that way.
...
type DataBindingContext wraps DataBindingContext
type ObservableValue wraps IObservableValue<?>[]
type UpdateValueStrategy wraps UpdateValueStrategy<?, ?>
type Bindings wraps Binding[]  

type ObservableValues wraps IObservableValue[]  // XCore raise a WARNING!!!

op Bindings bindValues(DataBindingContext context, ObservableValue targetObservableValue, ObservableValues modelObservableValues, UpdateValueStrategy modelToTarget) 
..

This generate the method as expected.

However, If I fix the XCore warning that way.
type ObservableValues wraps IObservableValue<?>[]  // No warning.

Here is the way the method is generated.
public Binding[] bindValues(DataBindingContext context, IObservableValue<?> targetObservableValue, IObservableValue<?> modelObservableValues, UpdateValueStrategy<?, ?> modelToTarget) {


Is it normal?

Have a nice day.

Regent ;-)
Re: [XCore] Type definition of array of generic. [message #1797962 is a reply to message #1797915] Fri, 09 November 2018 09:24 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
There was a bug in the import manager so I opened this Bugzilla to fix it:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=540942

A build with the fix is available here:

http://download.eclipse.org/modeling/emf/emf/builds/nightly/latest


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Unusable EMF plugins in release 2018-09
Next Topic:Using Common Navigator to view EMF
Goto Forum:
  


Current Time: Tue Apr 23 16:50:01 GMT 2024

Powered by FUDForum. Page generated in 0.02926 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top