Skip to main content


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 15:40
Toñi  Reina is currently offline Toñi ReinaFriend
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
Previous Topic:Unicode Characters in ETL Strings
Next Topic:[EVL] Question about the HasName constraint in the filesystemExample.
Goto Forum:
  


Current Time: Thu Apr 25 00:05:23 GMT 2024

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

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

Back to the top