Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Create three nodes using one creation tool?
Create three nodes using one creation tool? [message #219890] Tue, 24 February 2009 14:49 Go to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hi,

I was wondering if it is possible to add three nodes that represent three
different metaclasses directly to the drawing canvas using one creation
tool (palette button)?

Does anyone has addressed such an issue?

Thanks,

Achilleas
Re: Create three nodes using one creation tool? [message #219918 is a reply to message #219890] Tue, 24 February 2009 17:05 Go to previous messageGo to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hi again,

I am trying to use the Feature Seq Initialiser to do this and the
Reference New Element Spec but I always get the following error when
validating the gmfmap model:

'feature' of 'ReferenceNewElementSpec' must refer to containment
ecore::EReference

I don't understand what this error denotes specifically. Actually the
feature element of the ReferenceNewElementSpec is an ecore::EReference. I
don't know why this occurs!

Any pointers on tutorials that show how to use ReferenceNewElementSpec are
appreciated!

Thanks,

Achilleas
Re: Create three nodes using one creation tool? [message #219980 is a reply to message #219918] Wed, 25 February 2009 12:44 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Achilleas,

> I don't understand what this error denotes specifically. Actually the
> feature element of the ReferenceNewElementSpec is an
> ecore::EReference. I don't know why this occurs!
corresponding ecore::EReference intance should has "containment" property
set to true.

-----------------
Alex Shatalin
Re: Create three nodes using one creation tool? [message #220340 is a reply to message #219980] Mon, 02 March 2009 11:53 Go to previous messageGo to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hi again,

I followed the advice given but I am not reaching essentially to the
result I want to obtain.

To explain what I would like to do I will try to provide an example. If
for example I have a metamodel which has 2 classes "A" and "B" that are
related by a reference association named "relation"; i.e. A-->B.

Is is possible to use one creation tool from the palette (i.e. palette
button "CreateAll") to create directly the three figures onto the canvas?
I would like to know if anyone had try it and if it is possible?

Thanks,

Achilleas.
Re: Create three nodes using one creation tool? [message #220373 is a reply to message #220340] Mon, 02 March 2009 13:33 Go to previous messageGo to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hi Alex,

If I set the containment property to TRUE as you suggested i am able to
use the feature seq initialiser and the reference new element spec as
required.

The problem is that when I create the Node A the instances of the rest are
created but cannot be viewed visually. That means that Node A has an
association to Node B directly initialised in the properties but neither
the connection nor the Node B are shown visually.

Is there a way to solve this problem?

Thanks,

Achilleas
Re: Create three nodes using one creation tool? [message #220386 is a reply to message #220373] Mon, 02 March 2009 15:13 Go to previous messageGo to next message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Guys,

Anyone has any idea on this? I am kind of stuck here.

Thanks.
Re: Create three nodes using one creation tool? [message #220891 is a reply to message #220340] Tue, 10 March 2009 12:08 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Achilleas,

> To explain what I would like to do I will try to provide an example.
> If for example I have a metamodel which has 2 classes "A" and "B" that
> are related by a reference association named "relation"; i.e. A-->B.
I think it is not possible with Feature Sequence initializer - this featue
was created to initialize some properties (or references) of just created
object, but you are going to create one more _sibling_ object B and a reference
to it... I suggest you to modify generated ACreateCommand.doExecuteWithResult()
method to create necessary model elements there.

-----------------
Alex Shatalin
Re: Create three nodes using one creation tool? [message #221011 is a reply to message #220891] Tue, 10 March 2009 15:02 Go to previous message
Achilleas is currently offline AchilleasFriend
Messages: 88
Registered: July 2009
Member
Hello Alex,

I will try to learn what the ACreateCommand.doExecuteWithResult() does and
try to modify it to do what I want.

Thanks,

Achilleas
Previous Topic:Figure Ref Child Attributes aren't overtaken to the referenced Figures
Next Topic:Get default line Color?
Goto Forum:
  


Current Time: Wed Mar 03 09:07:10 GMT 2021

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

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

Back to the top