Hello,
new in Eugenia and the whole GMF stuff i am trying to build a graphical editor.
In my model i am using a custom figure as u can see in the following code snippet:
@gmf.node(label="name", tool.name="MergeData", color="255,100,0",
figure="org.eclipse.epsilon.eugenia.examples.flowchart.diagram.figures.DiamondFigure")
class MergeDiamond {
@gmf.affixed(foo="bar")
ref InPort[1..3] inPort;
@gmf.affixed(foo="bar")
ref OutPort[1] outPort;
}
In the corresponding ECore2GMF.eol i am trying to fix its size:
var mergeDiamond = GmfGraph!CustomFigure.all.selectOne(r|r.name = "MergeDiamondFigure");
if (mergeDiamond.isDefined()) {
var label = mergeDiamond.children.selectOne(r|r.name = "MergeDiamondLabelFigure");
label.text = "";
var fixSize = new GmfGraph!Dimension;
fixSize.dx = 41;
fixSize.dy = 41;
mergeDiamond.maximumSize = fixSize;
var fixSize2 = new GmfGraph!Dimension;
fixSize2.dx = 40;
fixSize2.dy = 40;
mergeDiamond.minimumSize = fixSize2;
}
Here is the code of the generated .gmfgraph:
<descriptors
name="MergeDiamondFigure">
<actualFigure
xsi:type="gmfgraph:CustomFigure"
name="MergeDiamondFigure"
qualifiedClassName="org.eclipse.epsilon.eugenia.examples.flowchart.diagram.figures.DiamondFigure">
<backgroundColor
xsi:type="gmfgraph:RGBColor"
red="255"
green="100"/>
<maximumSize
dx="41"
dy="41"/>
<minimumSize
dx="40"
dy="40"/>
<children
xsi:type="gmfgraph:Label"
name="MergeDiamondLabelFigure"
text=""/>
</actualFigure>
<accessors
accessor="getFigureMergeDiamondLabelFigure"
figure="//@figures.0/@descriptors.11/@actualFigure/@children.0"/>
</descriptors>
But what i thought i would see is not what i did get Sad
1. The custom figure stays white
2. I still can resize it greater than specified maxsize
A similar question for 2. (Is it possible to avoid resizing a figure during its creation and after it?) was asked in another thread, but following the link there i still didn't get an answer to this question and the other two asked there.
I can't post the link cause its my first posting here. So here is the topic and message-id of the thread: Problem with nodes affixed to an ellipse [message #658658]
So, my questions are:
1. Why am i not able to colorize the custom figure?
2. Why is it possible to resize it bigger then given maxsize?
3. Do i have to alter the generated diagram-code for creating the affixed Ports in the same Moment the Diamondfigure was created as in aforementioned thread described?
Thanks in advance.
Wolly