Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Returning non-EMF data types from EOperations generated by Post-processor
Returning non-EMF data types from EOperations generated by Post-processor [message #778395] Thu, 12 January 2012 18:26 Go to next message
Daniel Tuohy is currently offline Daniel TuohyFriend
Messages: 41
Registered: July 2009
Member
Hello all,

I followed the second example here to add EOperations to our Xtext-generated EClasses. This is a very handy feature, but I'm curious if it is possible for such operations to have a plain Java (non-EMF) return type. For example, can the post-processor generate an operation that returns a java.awt.Color? Even if the type had to be fully qualified, that would be fine.

Thanks,

Daniel
Re: Returning non-EMF data types from EOperations generated by Post-processor [message #778500 is a reply to message #778395] Thu, 12 January 2012 21:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
HI,

you have at least to create a EDataType that maps to your java class.

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Returning non-EMF data types from EOperations generated by Post-processor [message #778512 is a reply to message #778500] Thu, 12 January 2012 23:57 Go to previous message
Daniel Tuohy is currently offline Daniel TuohyFriend
Messages: 41
Registered: July 2009
Member
I thought that might be the case. Thanks!
Previous Topic:JvmTypesBuilder.toConstructor does not set the body
Next Topic:TemplatesView
Goto Forum:
  


Current Time: Sat Apr 20 01:27:48 GMT 2024

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

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

Back to the top