Skip to content

Commit 80cd0ef

Browse files
authored
Updates for V2.3
1 parent 440803c commit 80cd0ef

File tree

8 files changed

+54
-10
lines changed

8 files changed

+54
-10
lines changed

BasicExpression.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3632,9 +3632,9 @@ else if (objectRef.type != null &&
36323632
{ context.add(0,objectRef.type.getEntity(entities)); }
36333633
else
36343634
{ System.err.println("! Warning: Cannot locate class of " + objectRef);
3635-
JOptionPane.showMessageDialog(null,
3635+
/* JOptionPane.showMessageDialog(null,
36363636
"Warning!: Cannot locate class of " + objectRef,
3637-
"Semantic error", JOptionPane.ERROR_MESSAGE);
3637+
"Semantic error", JOptionPane.ERROR_MESSAGE); */
36383638
}
36393639
}
36403640
else // objectRef == null
@@ -5427,8 +5427,8 @@ else if (objectRef.type != null && objectRef.type.isEntity(entities))
54275427

54285428
if (context.size() == 0)
54295429
{ if (entity == null)
5430-
{ System.out.println(">> No owning class found for " + this);
5431-
System.out.println();
5430+
{ // System.out.println(">> No owning class found for " + this);
5431+
// System.out.println();
54325432
// +
54335433
// " -- it must be a local variable/parameter");
54345434
// System.out.println(">> Or static feature/global use case");
@@ -7894,6 +7894,11 @@ public String queryFormJava7(java.util.Map env, boolean local)
78947894
return cmd;
78957895
}
78967896

7897+
if (data.equals("OclFile") && arrayIndex != null)
7898+
{ String ind = arrayIndex.queryFormJava7(env,local);
7899+
return "OclFile.OclFile_index.get(" + ind + ")";
7900+
}
7901+
78977902
if (umlkind == VALUE || umlkind == CONSTANT)
78987903
{ if (data.equals("{}") || data.equals("Set{}"))
78997904
{ return "new HashSet<Object>()"; } // new Set really

CGCondition.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ public void applyAction(Vector vars, Vector eargs,
224224
// If vv is ww`mf then evaluate ww`mf, if null then
225225
// it is intended as stereotype mf=stereo for ww.
226226

227+
// _* all stereo
228+
// sets the stereotype for each term in the _* list
229+
227230
if (isSubstitute || isMatches)
228231
{ return; }
229232

@@ -282,6 +285,29 @@ public void applyAction(Vector vars, Vector eargs,
282285
String varx = variable;
283286
String mffeat = null;
284287

288+
if (quantifier.equals("all") && "_*".equals(varx))
289+
{ // set each term in _* to the stereo
290+
291+
int starind = vars.indexOf(varx);
292+
293+
if (starind >= 0)
294+
{ Object obj = eargs.get(starind);
295+
if (obj instanceof Vector)
296+
{ Vector termlist = (Vector) obj;
297+
for (int p = 0; p < termlist.size(); p++)
298+
{ if (termlist.get(p) instanceof ASTTerm)
299+
{ ASTTerm trm = (ASTTerm) termlist.get(p);
300+
ASTTerm.setType(trm,stereo);
301+
ASTTerm.addStereo(trm,stereo);
302+
System.out.println("***>> Applying action _* all " + stereo + " to: " + trm);
303+
}
304+
}
305+
}
306+
}
307+
return;
308+
}
309+
310+
285311
Vector metafs = CGRule.metafeatures(variable);
286312

287313
// System.out.println("***>> Action metafeatures of " + variable + " are: " + metafs);

Compiler2.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2086,6 +2086,7 @@ public static Vector parse_rule_actions(String str)
20862086
{ // _i v
20872087
// _i not v
20882088
// e / x
2089+
// _* all v
20892090

20902091
Vector conds = new Vector();
20912092
Compiler2 newc = new Compiler2();
@@ -2106,6 +2107,13 @@ public static Vector parse_rule_actions(String str)
21062107
expectVar = true;
21072108
expectStereo = false;
21082109
}
2110+
else if (se.equals("_") && i + 1 < lexs.size() &&
2111+
"*".equals(lexs.get(i+1) + ""))
2112+
{ cg.setVariable("_*");
2113+
i++;
2114+
expectVar = false;
2115+
expectStereo = true;
2116+
}
21092117
else if (se.equals("not"))
21102118
{ cg.setNegative();
21112119
expectVar = false;
@@ -2116,6 +2124,11 @@ else if (se.equals("/"))
21162124
expectVar = false;
21172125
expectStereo = true;
21182126
}
2127+
else if (se.equals("all"))
2128+
{ cg.setUniversal();
2129+
expectVar = false;
2130+
expectStereo = true;
2131+
}
21192132
else if (se.equals("`") &&
21202133
i + 1 < lexs.size())
21212134
{ String mt = "" + lexs.get(i+1);
@@ -2136,7 +2149,7 @@ else if (expectStereo)
21362149
expectStereo = false;
21372150
}
21382151

2139-
System.out.println(se + " " + expectVar + " " + expectStereo + " " + cg);
2152+
// System.out.println(se + " " + expectVar + " " + expectStereo + " " + cg);
21402153
}
21412154

21422155
conds.add(cg);

UCDArea.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
/*
1212
* Classname : UCDArea
1313
*
14-
* Version information : 2.2
14+
* Version information : 2.3
1515
*
16-
* Date : January 2023
16+
* Date : December 2023
1717
*
1818
* Description: This class describes the area that all the painting for
1919
* the CD diagram will be performed and deals with painting them

UmlTool.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
/*
1111
* Classname : UmlTool
1212
*
13-
* Version information : 2.2
13+
* Version information : 2.3
1414
*
15-
* Date : January 2023
15+
* Date : December 2023
1616
*
1717
* Description : This describes the GUI interface of
1818
* the UML RSDS tool,
@@ -4327,7 +4327,7 @@ public static void main(String[] args)
43274327
return;
43284328
}
43294329

4330-
window.setTitle("Agile UML Toolset, Eclipse Incubation Project Version 2.2");
4330+
window.setTitle("AgileUML Toolset, Eclipse Incubation Project Version 2.3");
43314331
window.setControllerName("Controller");
43324332
window.setSize(500, 400);
43334333
window.setVisible(true);

cg.zip

2.75 KB
Binary file not shown.

libraries.zip

1.25 KB
Binary file not shown.

umlrsds.jar

6.75 KB
Binary file not shown.

0 commit comments

Comments
 (0)