Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Xcore] Using non EMF classes in operations
[Xcore] Using non EMF classes in operations [message #987388] Mon, 26 November 2012 07:01 Go to next message
Jan Rosczak is currently offline Jan Rosczak
Messages: 35
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 08: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 12:11 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
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
Previous Topic:Querying EMF model with Xpath
Next Topic:[CDO Hibernate Store] Unable to instantiate default tuplizer
Goto Forum:
  


Current Time: Fri Aug 22 07:55:56 EDT 2014

Powered by FUDForum. Page generated in 0.01499 seconds