Home » Modeling » Epsilon » [Eugenia] Can't draw link in generated editor.
[Eugenia] Can't draw link in generated editor. [message #770065] |
Fri, 23 December 2011 08:31 |
|
Hello,
following .emf-Code is given:
@gmf(foo="bar")
@namespace(uri="config", prefix="config")
package config;
@gmf.diagram(foo="bar", onefile="false")
class Diagramm {
!resolve val Action[*] actions;
!resolve val Data[*] sData;
}
// Data-Nodes
abstract class Data{
ref ActionInputLink[*]#theData actionInputs;
}
@gmf.node(label="name", figure="rounded", label.placement="none", color="50,55,55")
class ResultData extends Data {
ref ActionOutputLink#result actionOutput;
}
@gmf.node(label="name", figure="ellipse", label.placement="none", color="0,0,255")
class NewData extends Data {
}
// Action-Nodes
@gmf.node(label="name", figure="rounded", size="100,200", color="219,238,253")
class ZipAction extends Action {
@gmf.compartment(layout="list", collapsible="false")
val Destination[1..3] dest;
}
abstract class Action extends NamedElement {
!resolve val ActionInputLink[1]#action input;
!resolve val ActionOutputLink[1]#action output;
}
@gmf.node(label="name, param", figure="rectangle", label.icon="false", label.pattern="{0}: {1}")
class Destination extends NamedElement {
attr String param;
}
// Links
@gmf.link(source="theData", target="action",
target.decoration="arrow", style="dash", width="1")
class ActionInputLink {
ref Action#input action;
ref Data#actionInputs theData;
}
@gmf.link(source="action", target="result", color="130,130,130",
target.decoration="arrow", style="solid", width="3")
class ActionOutputLink {
ref Action#output action;
ref ResultData#actionOutput result;
}
// Baseclass
class NamedElement {
attr String name;
}
After creating the editor i am not able to draw an ActionOutputLink (Link from ZipAction to ResultNode).
What am i doing wrong here?
Note: This is basically similar to the basically gmf-Example ( gmfsamples.tuxfamily.org/wiki/doku.php?id=gmf_tutorial5#overview).
Since i dont know too much about gmf i am using eugenia, which helps me a lot to stay with GMF
Thanks in advance.
Wolly
|
|
| | |
Re: [Eugenia] Can't draw link in generated editor. [message #772304 is a reply to message #772296] |
Thu, 29 December 2011 13:26 |
|
Hi Dimitris,
thanks for your reply.
In your screenshot there is one sort of Link: From Action to Resultnode.
Did u tried to add one more Resultnode and link it to the given Action? Like i said in my first posting i wasnt able to do so.
Can u draw more then one Link Action->ResultNode?
The "at most one"-Constraint: I havn't tried the EVL-constraints yet since i am battling more newbie-Problems like "Custom Icons for tools". With given GMF-Example i thought, that it is possible to achieve this constraint without EVL as done in the GMF-Example. In my mind i have also the word "Audit in gmfmap" for implementing constraints...
I will give EVL a try as soon as i solved the Problems with Custom Icons. At the Moment i am wondering, why i can see my icons in the palette but not in the toolbar Maybe i should write a posting about that...
Greetings,
Wolly
|
|
|
Re: [Eugenia] Can't draw link in generated editor. [message #772322 is a reply to message #772304] |
Thu, 29 December 2011 14:09 |
|
Hi Wolly,
I actually can't create any ActionInputLinks between a ZipAction and a ResultData instance. This seems to be a GMF bug as if I create a model in the tree editor, GMF is able to visualise it without problems. I'd suggest trying an alternative design where ActionInputLinks and ActionOutputLinks are contained (val) under Diagram and are ref'd by Data and Actions.
Cheers,
Dimitris
|
|
|
Re: [Eugenia] Can't draw link in generated editor. [message #772340 is a reply to message #772322] |
Thu, 29 December 2011 14:50 |
|
Hi Dimitris,
thats the way it works (and used in the Eugena GMF Filesystem-Tutorial).
So the answer to my initial posting is "..seems to be a GMF bug...".
I hoped to get the "at most one" constraint built-in like shown in the GMF-Tutorial. But then u obviously have to use (plain) GMF without Eugenia-support.
Well, then i have to use EVL for getting the constraint.
Greetings,
Wolly
|
|
|
Goto Forum:
Current Time: Fri Sep 20 15:47:16 GMT 2024
Powered by FUDForum. Page generated in 0.05042 seconds
|