Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[Xcore] Using non EMF classes in operations
https://www.eclipse.org/forums/index.php/mv/msg/440616/987388/#msg_987388
I am trying to write operations in Xcore that use classes not defined in an ecore model, such as the Java collection classes or any other non primitiv class, as parameter or return value.
The error I've got is:
A generic type in this context must refer to a classifier or a type parameter
Should this be doable and Xcore currently does not support this or is this simply against the philosophy of Xcore/EMF?
Thanks for helping
Jan
Update:
I re-read the Xcore wiki and found the answer: datatype. But still, it seems a little inconvient to have to define a datatype just to be able to use a Java class as a return type for a method. For any other features it is understandable.]]>Jan Rosczak2012-11-26T12:01:23-00:00Re: [Xcore] Using non EMF classes in operations
https://www.eclipse.org/forums/index.php/mv/msg/440616/987461/#msg_987461
You must define EDataType (type Foo wraps Bar) for any types you want to
use in operations.
On 26/11/2012 1:01 PM, Jan Rosczak wrote:
> Hi,
>
> I am trying to write operations in Xcore that use classes not defined
> in an ecore model, such as the Java collection classes or any other
> non primitiv class, as parameter or return value.
>
> The error I've got is:
> A generic type in this context must refer to a classifier or a type
> parameter
>
> Should this be doable and Xcore currently does not support this or is
> this simply against the philosophy of Xcore/EMF?
>
> Thanks for helping
> Jan]]>Ed Merks2012-11-26T17:11:56-00:00