Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Feature Seq Initializer with a boolean attribute
Feature Seq Initializer with a boolean attribute [message #148817] Mon, 03 September 2007 20:09 Go to next message
Eclipse UserFriend
Originally posted by: elena.renzi.hotmail.com

Hi all,
I have an EClass in my Ecore model with a boolean Eattribute which default
value is set to false. I want to map this class in two different nodes,
the first one with this attribute set to its default value (false), and
the second one with the attribute set to true.
I tried to use "Feature Seq Initializer" under "Node Mapping" for node
representing the class with his attribut set to true, then I add "Feature
Value Spec" but I don't know how to specify this property in the body...

Thanks and regards,
Elena
Re: Feature Seq Initializer with a boolean attribute [message #148849 is a reply to message #148817] Tue, 04 September 2007 05:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bmoros.um.es

Elena, probably this post could help you:
http://dev.eclipse.org/newslists/news.eclipse.modeling.gmf/m sg07794.html

After generating the genmodel and diagram code you should go to the class
XXX.diagram.providers.XXXElementTypes. There is a internal static class
called Java where you will find the skeleton of the Java method that you
specified in the 'body' property of the 'Feature Value Spec'. You also have
to specify the 'name', that is, the attribute that is going to be initialize
(it will be the parameter of the initialization method) and language =
'java'. So, you only have to implement this method.

I hope it helps,
Bego
Re: Feature Seq Initializer with a boolean attribute [message #148873 is a reply to message #148849] Tue, 04 September 2007 10:01 Go to previous message
Eclipse UserFriend
Originally posted by: elena.renzi.gmail.com

Begoña,
thanks for your reply and for your help. Now it works as I want it does!
Best regards,

Elena
Previous Topic:GMF command vs EMF Command
Next Topic:Putting label in the middle with 2.0
Goto Forum:
  


Current Time: Tue Jun 10 01:57:07 EDT 2025

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

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

Back to the top