Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EVL] Question about the HasName constraint in the filesystemExample.
[EVL] Question about the HasName constraint in the filesystemExample. [message #591080] Fri, 30 July 2010 11:40
Toñi Reina is currently offline Toñi Reina
Messages: 204
Registered: July 2009
Senior Member
Hi,

I'm testing the filesystem example validation part explained in
http://www.eclipse.org/gmt/epsilon/doc/articles/evl-gmf-inte gration/ My
question is about the HasName constraint whose context is File. I'm
wondering if this constraint is really needed, I mean, if write my
metamodel constraining the cardinality name, as I write above, the
editor shouldn't let you write a not defined name, should it?

@gmf.node(figure="figures.FileFigure",
label.icon="false", label="name", label.placement="external")
class File {
attr String [1]name;
}

Concerning to this question, I'm also wondering if the eugenia generated
editor is able to validate some cardinality constraints, without any evl
extra code. For example, if I change the Folder class to restrict the
number of files it can include (as it is shown below), could the editor
avoid the user add more than one file to a folder?

@gmf.node(label=name)
class Folder {
attr String name;
@gmf.compartment(layout="free",collapsible="true")
val File[1] contents;
}


Thanks a lot
Previous Topic:Unicode Characters in ETL Strings
Next Topic:[EVL] Question about the HasName constraint in the filesystemExample.
Goto Forum:
  


Current Time: Fri Aug 01 18:31:04 EDT 2014

Powered by FUDForum. Page generated in 0.02538 seconds