Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Using EMF generated codes in external java codes
Using EMF generated codes in external java codes [message #756723] Mon, 14 November 2011 20:00 Go to next message
sohrab Missing name is currently offline sohrab Missing nameFriend
Messages: 17
Registered: November 2011
Junior Member
hello,

I use EMF to generate some codes for my project (for example modelImpl.java), I want to use these codes in other tool that runs only codes that extends from two specific classes (Like a.java and b.java). Codes that generated by EMF inherited and extended from some other classes that related to MyModel.ecore (Like EObjectImpl.java), What can I do with this?

Thanks
Re: Using EMF generated codes in external java codes [message #756732 is a reply to message #756723] Mon, 14 November 2011 20:45 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
All modeled objects must implement EObject and InternalEObject's APIs
and must do so by extending a subclass of BasicEObjectImpl. Since Java
doesn't support multiple class inheritance, you can't do what you're asking.


On 14/11/2011 9:00 PM, sohrab wrote:
> hello,
>
> I use EMF to generate some codes for my project (for example
> modelImpl.java), I want to use these codes in other tool that runs
> only codes that extends from two specific classes (Like a.java and
> b.java). Codes that generated by EMF inherited and extended from some
> other classes that related to MyModel.ecore (Like EObjectImpl.java),
> What can I do with this?
> Thanks


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Using EMF generated codes in external java codes [message #756854 is a reply to message #756732] Tue, 15 November 2011 11:00 Go to previous message
sohrab Missing name is currently offline sohrab Missing nameFriend
Messages: 17
Registered: November 2011
Junior Member
Thanks Ed Merks,

Is it any way to modeling external java codes without changing codes? I use annotated java interfaces for describing my models but It's impossible to writing interfaces for a lot of codes that I have in my external codes. Can I use design patterns or shortcut to run EMF generated codes in external codes?
Previous Topic:EMF and JPA
Next Topic:[Texo] "clear list" feature causes ConcurrentModificationException
Goto Forum:
  


Current Time: Thu Apr 25 20:16:06 GMT 2024

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

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

Back to the top