Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EUGENIA] EAttribute like EType
[EUGENIA] EAttribute like EType [message #584850] Sat, 23 January 2010 14:19
Eclipse UserFriend
Originally posted by: nicolas.rempulski.univ-lr.fr

Hi everybody,

First "bravo" for Eugenia, it's a very usefull tool. I remember playing
with EMF/GMF few years ago and building graph/tool/map files was a real
pain for me.

I try to create an editor to define Entities with Variables. My first
version worked well and Eugenia generated the editor as i meant it to be :

----------

@namespace(uri="entite",prefix="entite")
package entite;

@gmf.node(label = "name")
class EntityClass{
attr String name;

@gmf.link(target.decoration="arrow", style="dash")
ref EntityClass[*] superClass;

@gmf.compartment(foo="bar")
val Variable[*] varsEtat;
}

@gmf.node(label = "name,type", pattern="{0} : {1}")
class Variable{
attr String name;

attr String type;
}

@gmf.diagram(model.extension="entite", diagram.extension="entite_diagram")
class EntityDeclarationDiagram{
val EntityClass[*] classe;
}

----------

"Variable.type" is here encoded in String.

But now I would like to specify the attribute "Variable.type" as a
javaType (Bool, Int, ...) in order to obtain something like EType of
EAttribute in eCore (ComboBox with all EType mapped to Java types).

My first guess was to set the attribute "type" as an java.lang.Object(or
EJavaObject). But as said there
http://dev.eclipse.org/newslists/news.eclipse.tools.emf/msg3 5228.html
It's quite difficult to create an Object with string as input ;)

Now I've no clue how I can obtain my EAttribute "type" to propose a list
of java Type. I played with EClass and EDataType but it seems to be
beyond my understanding. So I'm sending out an SoS to find clues ^^

Thanks !

Nicolas
Previous Topic:problemas ETL: operation
Next Topic:problems with generating gmf graph, gmf tool and gmf map models
Goto Forum:
  


Current Time: Thu Apr 25 04:36:13 GMT 2024

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

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

Back to the top