[Xcore] Using non EMF classes in operations [message #987388] |
Mon, 26 November 2012 12:01 |
Jan Rosczak Messages: 53 Registered: July 2009 Location: Hamburg, Germany |
Member |
|
|
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
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.
[Updated on: Mon, 26 November 2012 13:24] Report message to a moderator
|
|
|
Re: [Xcore] Using non EMF classes in operations [message #987461 is a reply to message #987388] |
Mon, 26 November 2012 17:11 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Jan,
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 Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02769 seconds