Skip to content
Snippets Groups Projects
Commit d3ee90a8 authored by Sophie Coudert's avatar Sophie Coudert
Browse files

checkTypes restored

parent 5dabad1d
No related branches found
No related tags found
3 merge requests!504merge first stable version of Avatar-SysML V2,!503merge the first stable version of the Avatar-SysML parser/generator,!501Avatar sys ml 04 2024
......@@ -500,6 +500,7 @@ public class AvatarFromSysML {
// create method
AvatarMethod am = new AvatarMethod(sm.getName(),null);
// add method
System.out.println("$$$$$$$$$$$ " + theBlock.getName() + " : " + am.getName());
theBlock.addMethod(am);
// add input parameters to method
buildProfile(sm, am, theBlock);
......
......@@ -154,7 +154,7 @@ public class AvatarMethod {
// So, there is a return type!
rt = tmp.trim();
method = method.substring(index2 + 1, method.length()).trim();
if (!isAValidId(rt, false, false, false, false, extraTypes)) {
if (!isAValidId(rt, false, false, false, checkTypes, extraTypes)) {
TraceManager.addDev("Unvalid return type: " + rt);
return null;
}
......@@ -252,12 +252,12 @@ public class AvatarMethod {
return null;
}
TraceManager.addDev("Checking input parameter");
if (!isAValidId(splitted[i], false, false,false, false, extraTypes)) {
if (!isAValidId(splitted[i], false, false,false, checkTypes, extraTypes)) {
TraceManager.addDev("Unvalid input type #" + i + ": " + splitted[i]);
return null;
}
if (!isAValidId(splitted[i + 1], true, true,true, checkTypes, extraTypes)) {
if (!isAValidId(splitted[i + 1], true, true,true, false, extraTypes)) {
TraceManager.addDev("Unvalid id of parameter " + splitted[i + 1]);
return null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment