Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » how can we import a specific Ecore model in another Ecore
how can we import a specific Ecore model in another Ecore [message #892203] Wed, 27 June 2012 11:56 Go to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
hi

i'm trying to build my own ecore model using the ecore diagram, and i wanted to know if it is possible to import an ecore in another ecore ?
for example:
i have 4 ecore files A.ecore , B.ecore , C.ecore , D.ecore, and since in my ecore A and B i am using D and in my ecore C i am using B , i don't want to redefine A, B and D everytime i want to use it. so i'm looking for a way define it one-time and just import it any time i need it.

and if it is possible how can we do it (represent it) using an ecore diagram
Best regards ,
Frank
Re: how can we import a specific Ecore model in another Ecore [message #892205 is a reply to message #892203] Wed, 27 June 2012 12:01 Go to previous messageGo to next message
Tim Schaefer is currently offline Tim SchaeferFriend
Messages: 49
Registered: June 2011
Location: Marburg, Germany
Member
Hi,

in the Sample Ecore Editor you can use "Load Resource ..." dialog from context-menu.
In the diagram editor you might want to use "Create Shortcut" instead and in the opening dialog you can select the class you want to re-use.

Regards,
Tim
Re: how can we import a specific Ecore model in another Ecore [message #892276 is a reply to message #892205] Wed, 27 June 2012 15:04 Go to previous messageGo to next message
frank fotso is currently offline frank fotsoFriend
Messages: 91
Registered: May 2012
Member
thks for your help.

can you tell me please how to fix an attibute of a class , that means if i have a class B and that class has an attribute c of type integer , i just want to fixe the attribute c for examples saying c is equal to c , or saying that the attributesof type integer is between 2 and 6( ie the integer c must between 2 and 6)?

Best regards ,
Frank
Re: how can we import a specific Ecore model in another Ecore [message #892318 is a reply to message #892276] Wed, 27 June 2012 17:20 Go to previous messageGo to next message
Tim Schaefer is currently offline Tim SchaeferFriend
Messages: 49
Registered: June 2011
Location: Marburg, Germany
Member
Hi Frank,

what do you mean with "fixing" an attribute?
You can specify constraints on your model, for example with OCL.
If that's what you mean, it's best to use the OCLInEcoreEditor
http://wiki.eclipse.org/MDT/OCLinEcore

Regards,
Tim
Re: how can we import a specific Ecore model in another Ecore [message #892326 is a reply to message #892276] Wed, 27 June 2012 17:50 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Frank.<br>
<br>
XML Schema supports simple data types with these types of range
constraints and EMF supports extended metadata annotations for
that.  You'd have to define a specialized EDataType for that.<br>
<blockquote><a
href="http://www.eclipse.org/modeling/emf/docs/overviews/XMLSchemaToEcoreMapping.pdf">XML
Schema to Ecore Mapping</a><br>
<br>
</blockquote>
<div class="moz-cite-prefix">On 27/06/2012 5:04 PM, frank fotso
wrote:<br>
</div>
<blockquote cite="mid:jsf7d6$74u$1@xxxxxxxxe.org" type="cite">thks
for  your help.
<br>
<br>
can you tell me please  how to fix an attibute of a class , that
means if  i have a class B and that class has an attribute c of
type integer , i just want to fixe the attribute c for examples
saying c is equal to c , or saying that the attributesof type
integer is between 2 and  6( ie  the integer c must between 2 and 
6)?
<br>
<br>
Best regards ,
<br>
Frank
<br>
</blockquote>
<br>
<br>
</body>
</html>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:What are New and Noteworthy inside the EMF project?
Next Topic:[CDO] Installing on E4.2
Goto Forum:
  


Current Time: Wed Apr 24 22:52:33 GMT 2024

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

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

Back to the top