[552823] Fix GraphML labels on operation edges
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtbase/src/org/eclipse/qvtd/pivot/qvtbase/graphs/GraphMLBuilder.java b/plugins/org.eclipse.qvtd.pivot.qvtbase/src/org/eclipse/qvtd/pivot/qvtbase/graphs/GraphMLBuilder.java
index c7ad071..80da212 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtbase/src/org/eclipse/qvtd/pivot/qvtbase/graphs/GraphMLBuilder.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtbase/src/org/eclipse/qvtd/pivot/qvtbase/graphs/GraphMLBuilder.java
@@ -228,7 +228,7 @@
s.pushTag("y:PolyLineEdge");
appendLineStyle(new LineStyle(lineColor, LineType.valueOf(lineType)));
appendArrows(sourceArrowType, targetArrowType);
- appendEdgeLabel(label, lineColor, null);
+ appendEdgeLabel(lineColor, label, null, null);
s.popTag();
s.popTag();
s.popTag();
@@ -263,7 +263,7 @@
s.popTag();
}
- protected void appendEdgeLabel(@Nullable String sourceLabel, String labelColor, @Nullable String targetLabel) {
+ protected void appendEdgeLabel(String labelColor, @Nullable String sourceLabel, @Nullable String midLabel, @Nullable String targetLabel) {
if (sourceLabel != null) {
s.pushTag("y:EdgeLabel");
s.appendElement("textColor", labelColor);
@@ -271,6 +271,13 @@
s.appendElement("modelPosition", "thead");
s.appendValueAndPopTag(sourceLabel);
}
+ if (midLabel != null) {
+ s.pushTag("y:EdgeLabel");
+ s.appendElement("textColor", labelColor);
+ s.appendElement("modelName", "six_pos");
+ s.appendElement("modelPosition", "head");
+ s.appendValueAndPopTag(midLabel);
+ }
if (targetLabel != null) {
s.pushTag("y:EdgeLabel");
s.appendElement("textColor", labelColor);
diff --git a/plugins/org.eclipse.qvtd.pivot.qvtbase/src/org/eclipse/qvtd/pivot/qvtbase/graphs/GraphMLStringBuilder.java b/plugins/org.eclipse.qvtd.pivot.qvtbase/src/org/eclipse/qvtd/pivot/qvtbase/graphs/GraphMLStringBuilder.java
index 42406a3..267d3be 100644
--- a/plugins/org.eclipse.qvtd.pivot.qvtbase/src/org/eclipse/qvtd/pivot/qvtbase/graphs/GraphMLStringBuilder.java
+++ b/plugins/org.eclipse.qvtd.pivot.qvtbase/src/org/eclipse/qvtd/pivot/qvtbase/graphs/GraphMLStringBuilder.java
@@ -78,7 +78,7 @@
s.pushTag("y:PolyLineEdge");
appendLineStyle(new LineStyle(lineColor, lineType, width));
appendArrows(sourceArrowType != null ? sourceArrowType.name() : ArrowType.none.name(), targetArrowType != null ? targetArrowType.name() : ArrowType.delta.name());
- appendEdgeLabel(sourceLabel, labelColor, targetLabel);
+ appendEdgeLabel(labelColor, sourceLabel, label, targetLabel);
s.popTag();
s.popTag();
s.popTag();