Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF Editor and CrossReference(Build an editor that allow creation of cross reference element)
EMF Editor and CrossReference [message #659211] Fri, 11 March 2011 14:57 Go to next message
David  is currently offline David Friend
Messages: 4
Registered: September 2010
Junior Member
Hi, my question is the following: Is there a way to manage two models in the same generated editor. For example :

(I have two model where i generate Model / Edit / Editor).

Model 1:
Class A , contains many 'AbstractA'
'AConcrete' extends 'AbstractA'

Model 2 (in a different plugin):
Class B extends 'AbstractA' by cross-reference to model 1.

When i generate editor for model1 and execute it, when i use the custom editor generated for model1 and i try to create new element from Class A, using the right-click .. createChild, the only element that appears is 'AConcrete'. Is there a way to show 'Class B' also?

This should not be a problem because Class B extends the same element as 'AConcrete'.

Is there something i'm doing wrong? or is there any options in the genModel that allow me to achieve this?

Thanks for your help

David C.
Re: EMF Editor and CrossReference [message #659246 is a reply to message #659211] Fri, 11 March 2011 15:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30559
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------040407020401090506050802
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

David,

If you generated them from a single GenModel it would work. Or you
could use the approach described here:

http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html


David wrote:
> Hi, my question is the following: Is there a way to manage two models
> in the same generated editor. For example :
>
> (I have two model where i generate Model / Edit / Editor).
>
> Model 1:
> Class A , contains many 'AbstractA'
> 'AConcrete' extends 'AbstractA'
>
> Model 2 (in a different plugin):
> Class B extends 'AbstractA' by cross-reference to model 1.
>
> When i generate editor for model1 and execute it, when i use the
> custom editor generated for model1 and i try to create new element
> from Class A, using the right-click .. createChild, the only element
> that appears is 'AConcrete'. Is there a way to show 'Class B' also?
>
> This should not be a problem because Class B extends the same element
> as 'AConcrete'.
>
> Is there something i'm doing wrong? or is there any options in the
> genModel that allow me to achieve this?
>
> Thanks for your help
>
> David C.

--------------040407020401090506050802
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
David,<br>
<br>
If you generated them from a single GenModel it would work.  Or you
could use the approach described here:<br>
<blockquote><a
href=" http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html"> http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html</a><br>
</blockquote>
<br>
David wrote:
<blockquote cite="mid:ildcrm$que$1@news.eclipse.org" type="cite">Hi, my
question is the following: Is there a way to manage two models in the
same generated editor. For example :
<br>
<br>
(I have two model where i generate Model / Edit / Editor).
<br>
<br>
Model 1:
<br>
Class A , contains many 'AbstractA'
<br>
'AConcrete' extends 'AbstractA'
<br>
<br>
Model 2 (in a different plugin):
<br>
Class B extends 'AbstractA' by cross-reference to model 1.
<br>
<br>
When i generate editor for model1 and execute it, when i use the custom
editor generated for model1 and i try to create new element from Class
A, using the right-click .. createChild, the only element that appears
is 'AConcrete'. Is there a way to show 'Class B' also?
<br>
<br>
This should not be a problem because Class B extends the same element
as 'AConcrete'.
<br>
<br>
Is there something i'm doing wrong? or is there any options in the
genModel that allow me to achieve this?
<br>
<br>
Thanks for your help
<br>
<br>
David C.
<br>
</blockquote>
</body>
</html>

--------------040407020401090506050802--
Re: EMF Editor and CrossReference [message #659249 is a reply to message #659246] Fri, 11 March 2011 16:42 Go to previous message
David  is currently offline David Friend
Messages: 4
Registered: September 2010
Junior Member
Thx for your reply Ed, i'll take a look at the article.

David
Previous Topic:Editing EObject properties
Next Topic:Best practices: versioning .ecore files
Goto Forum:
  


Current Time: Thu Oct 24 03:12:25 GMT 2019

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

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

Back to the top