File tree Expand file tree Collapse file tree
org.omg.sysml.plantuml/src/org/omg/sysml/plantuml Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727package org .omg .sysml .plantuml ;
2828
2929import java .util .List ;
30+ import java .util .regex .Matcher ;
31+ import java .util .regex .Pattern ;
3032
3133import org .omg .sysml .expressions .util .EvaluationUtil ;
3234import org .omg .sysml .lang .sysml .ActorMembership ;
@@ -111,6 +113,8 @@ protected boolean addEvaluatedResults(Element elem) {
111113 return true ;
112114 }
113115
116+ private static Pattern patEqFeatureValue = Pattern .compile ("^\\ s*=" );
117+
114118 protected boolean appendFeatureValue (FeatureValue fv ) {
115119 Expression ex = fv .getValue ();
116120 String text = getText (fv );
@@ -121,6 +125,12 @@ protected boolean appendFeatureValue(FeatureValue fv) {
121125 if (pos >= 0 ) {
122126 text = text .substring (pos + "default" .length ()); //
123127 }
128+ } else {
129+ append (' ' ); // appendText() trims the text.
130+ Matcher m = patEqFeatureValue .matcher (text );
131+ if (!m .lookingAt ()) {
132+ text = "= " + text ;
133+ }
124134 }
125135 boolean flag = appendText (text , true );
126136 return addEvaluatedResults (ex ) || flag ;
You can’t perform that action at this time.
0 commit comments