GMF node disappears [message #1313493] |
Thu, 24 April 2014 22:51 |
Sam Brit Messages: 1 Registered: April 2014 |
Junior Member |
|
|
Hello,
I'm trying to create an editor that allows us to have nodes (goals) with an AND node between them. When running the editor, I create three nodes: two goals and an AND node. It's created the connection between Goal-AND and then when I create the connection to AND-Goal, the second goal just disappears in the editor, despite being in the emf resource.
What is the problem? The metamodel is:
@gmf(foo="bar")
@namespace(uri="goalModel/1.0", prefix="goalModel")
package goalmodel;
@gmf.diagram(foo="bar")
class GoalModel {
ref Goal[1] root;
val Node[*] nodes;
}
abstract class Node {
attr String name;
}
@gmf.node(figure="rectangle", label.icon="false", color="215,230,238", label="name", size="40,20", phantom="true")
class Goal extends Node {
@gmf.link(source.decoration="arrow")
val Link[*] links;
}
class Link {
attr String name;
}
@gmf.node(figure="rectangle", label.icon="false", color="215,230,238", label="name", size="10,10", phantom="true")
class AND extends Link {
@gmf.link
val Goal[*] goals;
}
Thank you!
|
|
|
Re: GMF node disappears [message #1314564 is a reply to message #1313493] |
Fri, 25 April 2014 12:56 |
|
Hi,
I'm not sure if phantom nodes work well with multiple levels of containment. Would it be possible to add a containment reference for links in GoalModel and turn the "links" and "goals" references to ref?
Cheers,
Dimitris
|
|
|
Powered by
FUDForum. Page generated in 0.03380 seconds