@@ -730,7 +730,8 @@ else if (objectRef != null)
730730
731731 res.prestate = prestate;
732732 res.atTime = atTime;
733- res.downcast = downcast;
733+ res.downcast = downcast;
734+ res.isStatic = isStatic;
734735 return res;
735736 }
736737
@@ -3227,7 +3228,8 @@ else if (objectRef.elementType != null && objectRef.elementType.isEntity())
32273228 }
32283229 }
32293230
3230- if ("newOclDate".equals(data))
3231+ if ("newOclDate".equals(data) ||
3232+ "newOclDate_Time".equals(data))
32313233 { type = new Type("OclDate", null);
32323234 umlkind = UPDATEOP;
32333235 isStatic = true;
@@ -3296,7 +3298,7 @@ else if (createdClass.startsWith("OclIterator_String"))
32963298 new Attribute("ss", new Type("String", null), ModelElement.INTERNAL);
32973299 par1.formalParameter = fparss;
32983300 }
3299- }
3301+ } // and String_String
33003302
33013303 return true;
33023304 }
@@ -3570,7 +3572,8 @@ else if (isCall(oref.data))
35703572
35713573 if (staticent != null)
35723574 { objectRef.umlkind = Expression.CLASSID;
3573-
3575+ // isStatic = true;
3576+
35743577 BehaviouralFeature bf = staticent.getStaticOperation(data,parameters);
35753578
35763579 if (bf != null)
@@ -3614,8 +3617,8 @@ else if (staticent.hasDefinedAttribute(data))
36143617
36153618 arrayType = type;
36163619 adjustTypeForArrayIndex(att);
3617- // System.out.println("*** Type of " + data + " is static ATTRIBUTE in entity " +
3618- // staticent + " type is " + type + "(" + elementType + ") Modality = " + modality);
3620+ System.out.println("*** Type of " + data + " is static ATTRIBUTE in entity " +
3621+ staticent + " type is " + type + "(" + elementType + ") Modality = " + modality);
36193622 return res;
36203623 }
36213624 }
@@ -14119,14 +14122,36 @@ public String cg(CGSpec cgs)
1411914122 Vector eargs = new Vector();
1412014123 Vector textrules = new Vector();
1412114124
14125+ if (("displayString".equals(data) ||
14126+ "displayint".equals(data) ||
14127+ "displaylong".equals(data) ||
14128+ "displaydouble".equals(data) ||
14129+ "displayboolean".equals(data) ||
14130+ "displaySequence".equals(data) ||
14131+ "displaySet".equals(data) ||
14132+ "displayMap".equals(data)) &&
14133+ parameters != null &&
14134+ parameters.size() == 1)
14135+ { Expression par1 = (Expression) parameters.get(0);
14136+ args.add(par1.cg(cgs));
14137+ eargs.add(par1);
14138+ CGRule r = cgs.matchedBasicExpressionRule(this,etext,textrules);
14139+ if (r != null)
14140+ { System.out.println(">> Matched rule: " + r + " to: " + etext + " with arguments= " + args);
14141+ String res = r.applyRule(args,eargs,cgs);
14142+ return res;
14143+ }
14144+ }
14145+
14146+
1412214147 if (umlkind == FUNCTION)
1412314148 { // process as the corresponding unary or binary expression
1412414149 if ("allInstances".equals(data))
14125- { args.add(objectRef + "");
14126- eargs.add(objectRef);
14127- CGRule r = cgs.matchedBasicExpressionRule(this,etext,textrules);
14128- if (r != null)
14129- { // System.out.println(">> Matched rule: " + r + " to: " + etext + " with arguments= " + args);
14150+ { args.add(objectRef + "");
14151+ eargs.add(objectRef);
14152+ CGRule r = cgs.matchedBasicExpressionRule(this,etext,textrules);
14153+ if (r != null)
14154+ { // System.out.println(">> Matched rule: " + r + " to: " + etext + " with arguments= " + args);
1413014155 String res = r.applyRule(args,eargs,cgs);
1413114156 return res;
1413214157 }
@@ -14244,7 +14269,13 @@ else if (objectRef != null)
1424414269 { parg = parg + ","; }
1424514270 // need special processig for parameters
1424614271 } */
14247- dataexp.parameters = null;
14272+ dataexp.parameters = null;
14273+
14274+ System.out.println(dataexp + " is static: " + dataexp.isStatic);
14275+ String dexcg = dataexp.cg(cgs);
14276+ System.out.println(dexcg);
14277+ System.out.println();
14278+
1424814279 args.add(dataexp.cg(cgs));
1424914280 args.add(pars);
1425014281 eargs.add(dataexp);
0 commit comments