Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » create class instances without placing them to the diagram
create class instances without placing them to the diagram [message #149452] Fri, 07 September 2007 05:25 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:Ordered Compartment with drag-and-drop functionality
Next Topic:Resize childres in a List Compartment
Goto Forum:
  


Current Time: Tue Jul 15 01:26:02 EDT 2025

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

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

Back to the top