Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/impl/NodeImpl.java')
-rw-r--r--plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/impl/NodeImpl.java32
1 files changed, 22 insertions, 10 deletions
diff --git a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/impl/NodeImpl.java b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/impl/NodeImpl.java
index 5a8784889..c04f99d88 100644
--- a/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/impl/NodeImpl.java
+++ b/plugins/org.eclipse.qvtd.compiler/src/org/eclipse/qvtd/compiler/internal/qvtp2qvts/impl/NodeImpl.java
@@ -179,6 +179,9 @@ public abstract class NodeImpl implements Node
s.setStyle(style);
}
s.setColor(getColor());
+ if (!isUnconditional()) {
+ s.setFillColor(getFillColor());
+ }
s.setPenwidth(getPenwidth());
s.appendAttributedNode(nodeName);
// if (isHead) {
@@ -298,6 +301,11 @@ public abstract class NodeImpl implements Node
return region.getName() + "::" + getName();
}
+ protected @NonNull String getFillColor() {
+ assert nodeRole != null;
+ return nodeRole.getFillColor();
+ }
+
@Override
public final @Nullable NodeConnection getIncomingConnection() {
return incomingConnection;
@@ -499,19 +507,23 @@ public abstract class NodeImpl implements Node
}
protected @Nullable String getStyle() {
- // if (isNull()) {
- // return "rounded";
- // }
- // if (isTrue() || getNodeRole().isExtraGuardVariable()) {
- // return null;
- // }
- boolean isDashed = !isMatched(); //!isRequired() && (isExpression() || !isRealized());
+ StringBuilder s = new StringBuilder();
if (isDataType()) {
- return isDashed ? "\"rounded,dashed\"" : "rounded";
+ s.append("rounded");
}
- else {
- return isDashed ? "dashed" : null;
+ if (!isMatched()) {
+ if (s.length() > 0) {
+ s.append(",");
+ }
+ s.append("dashed");
+ }
+ if (!isUnconditional()) {
+ if (s.length() > 0) {
+ s.append(",");
+ }
+ s.append("filled");
}
+ return "\"" + s.toString() + "\"";
}
@Override

Back to the top