create class instances without placing them to the diagram [message #149452] |
Fri, 07 September 2007 05:25  |
Eclipse User |
|
|
|
Hello,
I'm wondering if it's possible to create instances of a class without a
graphical representation on a GMF diagram. For example, let say I have the
following model
Root <#>----- Book ----- <#>---- Chapters
I'd like to place a Book element on my GMF editor and add some Chapters to
the book without using a graphical element. I could use a EAttribute
(String[] chapters) in the Book but that's what I want to simulate !.
Actually I can't use a string array cos I transform my model with a JET2
plugin , and JET2 can't read Arrays.
thanks
Regards,
Tex.
|
|
|
Re: create class instances without placing them to the diagram [message #149460 is a reply to message #149452] |
Fri, 07 September 2007 07:54  |
Eclipse User |
|
|
|
Tex,
Yes, you can create an instance of Chapter using an EMF command such as CreateChildCommand.
Koji
From: "Tex Twil" <chaljan@hotmail.com>
Subject: create class instances without placing them to the diagram
Date: Fri, 7 Sep 2007 11:25:49 +0200
> Hello,
> I'm wondering if it's possible to create instances of a class without a
> graphical representation on a GMF diagram. For example, let say I have the
> following model
>
> Root <#>----- Book ----- <#>---- Chapters
>
> I'd like to place a Book element on my GMF editor and add some Chapters to
> the book without using a graphical element. I could use a EAttribute
> (String[] chapters) in the Book but that's what I want to simulate !.
> Actually I can't use a string array cos I transform my model with a JET2
> plugin , and JET2 can't read Arrays.
>
> thanks
>
> Regards,
> Tex.
>
|
|
|
Powered by
FUDForum. Page generated in 0.03833 seconds