Hi all.
I have made an ecore diagram.
Thanks to it I generate an editor and a diagram configurator so I can
create graphically my models (CHANNELS).
In my model I have a main package (lets call him MAIN) containing others
objects (packages or classes).
I want to use the attribute ID of MAIN in the value of an attribute in a
class (lets call her CHILD) in the main package when I create it
graphically.
I have edited the java code of the editor.
I have changed the constructor for CHILD so he take a string as argument
(this works fine)
I have found the method where the constructor is called in the factory
implementation.
But I tried everything to get the value of the MAIN attribute withour
success (all I can get is the attribute name).
I red the documentation about EMF in the eclipse web site and I did this
to get the attribute value but it only send me the attribute name.
ChannelFactory factory = ChannelFactory.eINSTANCE;
ChannelPackage pack = ChannelPackage.eINSTANCE;
EAttribute attr = pack.getCLASS_NAME__ID();
EObject obj = pack.getCLASS_NAME();
String s = (String)obj.eGet(attr);
Is there something bad in my way to do this ?
Is there an other way to get these datas ?
Arnaud
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users