Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [n] Multiplicity problem in EMFATIC file
[n] Multiplicity problem in EMFATIC file [message #586671] Wed, 24 February 2010 14:25
Zied is currently offline Zied
Messages: 26
Registered: February 2010
Junior Member
Hi,

I have generated a flowchart diagram from the EMF file below, but the multiplicity in ContainerClass is not respected
I can put many instance of innerClasses


@gmf.node(label="name", label.icon="false")
class ContainerClass extends IShape {
@gmf.compartment(foo="bar")
val IShape[*] shapes;
val ClassNoGetMultiSend[*] shapesNGMS;
val ClassNoSendMultiGet[*] shapesNSMG;
val ContainerClass[1] innerClasses;
}


EMF FILE:

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

@gmf.diagram(foo="bar")
class FlowChartDiagram {
val ClassNSMG[*] NSMG; // No send Multiple get (link)
val ClassNGMS[*] NGMS; // No get multiple send
val IShape[*] shapes;
val ISLink[*] links;
val TestShape[*] testsNodes;
val STARTNode[1] startNode;
val FinalNode[*] finalnodes;
}

////////////////////// Abstract //////////////////////////
abstract interface IShape extends ClassNoSendMultiGet, ClassNoGetMultiSend,ILabelNamed {

}

abstract interface ILabelNamed{
attr String name;
}

abstract interface ClassNoGetMultiSend{
ref ISLink#source outcoming;
}

abstract interface ClassNoSendMultiGet {
ref ISLink#target incoming;
}
// simple Link type
abstract interface ISLink { //Interface Simple Link
ref ClassNoGetMultiSend#outcoming source;
ref ClassNoSendMultiGet#incoming target;
}
// complex link type
abstract interface ICLink extends ISLink{
ref ContainerClass#incoming targets;
ref ContainerClass#outcoming sources;

}


///////////////////////// Standard Nodes and links ////////////////////
@gmf.node(label="TestName", label.icon="false")
class TestShape extends ClassNoSendMultiGet {
attr String TestName = "TEST";

@gmf.link(label="Yes", target.decoration="arrow", style="dash")
ref ClassNoSendMultiGet yesAction;

@gmf.link(label="No", target.decoration="arrow", style="dash")
ref ClassNoSendMultiGet noAction;
}

@gmf.link(label="description", source="source", target="target", target.decoration="arrow")
class Link extends ICLink {
attr String description;
}
// start Node
@gmf.node(label="name", label.icon="false")
class STARTNode extends ClassNoGetMultiSend {
attr String name="START";
}
@gmf.node(label="name", label.icon="false")
class FinalNode extends ClassNoSendMultiGet{
attr String name="END";
}
//////////////////////////////////////////////
@gmf.node(label="name", label.icon="false")
class ContainerClass extends IShape {
@gmf.compartment(foo="bar")
val IShape[*] shapes;
val ClassNoGetMultiSend[*] shapesNGMS;
val ClassNoSendMultiGet[*] shapesNSMG;
val ContainerClass[1] innerClasses;
}

//
@gmf.node(label="name", label.icon="false")
class ClassNGMS extends ClassNoGetMultiSend {
attr String name="NGMS";
}

//
@gmf.node(label="name", label.icon="false")
class ClassNSMG extends ClassNoSendMultiGet {
attr String name="END";
}

// simple Node type
@gmf.node(label="name", label.icon="false")
class ClassMGMS extends IShape {
}
Previous Topic:problem executing .eol with ant
Next Topic:storing model from ant script
Goto Forum:
  


Current Time: Tue Sep 16 03:11:52 GMT 2014

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

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