[EVL] Question about the HasName constraint in the filesystemExample. [message #591080] |
Fri, 30 July 2010 15:40 |
Toñi Reina Messages: 209 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
|
|
|
Powered by
FUDForum. Page generated in 0.02506 seconds