Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Integrating external classes into ecore models
Integrating external classes into ecore models [message #422417] Fri, 05 September 2008 08:39 Go to next message
Maik Wurdel is currently offline Maik WurdelFriend
Messages: 9
Registered: July 2009
Junior Member
Hi,

I've a question regarding ecore models. Is there a way to integrate
external classes (e.g. java.lang.Object or custom not ecore/emf based
classes) into ecore models.

I'm using an external libary which is not based ecore/emf. Can I refer to
external classes within the ecore file?

It would be even satisfying to use java.lang.Object and add cast
statements. I just need an attribute of this custom type. Of course I can
manually add the attribute in the generated code but it would be much
cleaner to do it using ecore/emf.

Thanks for your effort.
Maik Wurdel
Re: Integrating external classes into ecore models [message #422424 is a reply to message #422417] Fri, 05 September 2008 12:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090700040709040005000602
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Maik,

Comments below.

Maik Wurdel wrote:
> Hi,
>
> I've a question regarding ecore models. Is there a way to integrate
> external classes (e.g. java.lang.Object or custom not ecore/emf based
> classes) into ecore models.
> I'm using an external libary which is not based ecore/emf. Can I refer
> to external classes within the ecore file?
You can define EDataTypes that are act as wrappers for existing
classes. Ecore itself has ones like that for java.lang.String, i.e.,
EString. There's even EJavaObject for referring to things of type
java.lang.Object.
>
> It would be even satisfying to use java.lang.Object and add cast
> statements. I just need an attribute of this custom type. Of course I
> can manually add the attribute in the generated code but it would be
> much cleaner to do it using ecore/emf.
Read the section on "Data Types" in

http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/references/overview/EMF.html

>
> Thanks for your effort.
> Maik Wurdel
>

--------------090700040709040005000602
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Maik,<br>
<br>
Comments below.<br>
<br>
Maik Wurdel wrote:
<blockquote
cite="mid:bacec6984fb18c7330c9181e8edf6950$1@www.eclipse.org"
type="cite">Hi,
<br>
<br>
I've a question regarding ecore models. Is there a way to integrate
external classes (e.g. java.lang.Object or custom not ecore/emf based
classes) into ecore models. <br>
I'm using an external libary which is not based ecore/emf. Can I refer
to external classes within the ecore file?
<br>
</blockquote>
You can define EDataTypes that are act as wrappers for existing
classes.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Integrating external classes into ecore models [message #422427 is a reply to message #422424] Fri, 05 September 2008 12:45 Go to previous message
Maik Wurdel is currently offline Maik WurdelFriend
Messages: 9
Registered: July 2009
Junior Member
This works perfectly fine and is very handy.

Thanks
Maik


Ed Merks wrote:

> Maik,

> Comments below.

> Maik Wurdel wrote:
>> Hi,
>>
>> I've a question regarding ecore models. Is there a way to integrate
>> external classes (e.g. java.lang.Object or custom not ecore/emf based
>> classes) into ecore models.
>> I'm using an external libary which is not based ecore/emf. Can I refer
>> to external classes within the ecore file?
> You can define EDataTypes that are act as wrappers for existing
> classes. Ecore itself has ones like that for java.lang.String, i.e.,
> EString. There's even EJavaObject for referring to things of type
> java.lang.Object.
>>
>> It would be even satisfying to use java.lang.Object and add cast
>> statements. I just need an attribute of this custom type. Of course I
>> can manually add the attribute in the generated code but it would be
>> much cleaner to do it using ecore/emf.
> Read the section on "Data Types" in

>
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.emf.doc/references/overview/EMF.html

>>
>> Thanks for your effort.
>> Maik Wurdel
>>
Previous Topic:[databinding] bind to a null EReference
Next Topic:Adding attributes dinamically
Goto Forum:
  


Current Time: Fri Apr 26 03:50:47 GMT 2024

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

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

Back to the top