Skip to content
Snippets Groups Projects
Commit dad9158c authored by Ludovic Apvrille's avatar Ludovic Apvrille
Browse files

Save and load sysmlv2 from TTool menu file

parent 4720beb5
No related branches found
No related tags found
No related merge requests found
......@@ -1181,7 +1181,8 @@ public class AvatarFromSysML {
st.getBlock().getStateMachine().addElement(nw);
}
}
if (s > 1 && !(e instanceof AvatarStartState || e instanceof AvatarStateElement)) { // too much input edges => redirected to error stopstate
if (s > 1 && !(e instanceof AvatarStartState || e instanceof AvatarStateElement)) { // too many input edges => redirected to error
// stopstate
addError(new AvatarFromSysMLError(AvatarFromSysMLError.ERROR, "state " + e.getName() + " in bloc " +
st.getBlock().getName() + " has more than one incomming transition"));
......
......@@ -341,51 +341,6 @@ public class AvatarPanelDrawer {
//Add Pragmas
makeSecurityPragmas(avspec, adp);
/*
if (avspec.getPragmas().size() > 0) {
AvatarBDPragma pragma = new AvatarBDPragma(xpos, ypos, xpos, xpos * 2, ypos, ypos * 2, false, null, abd);
// String[] arr = new String[avspec.getPragmas().size()];
String s = "";
// int i=0;
for (AvatarPragma p : avspec.getPragmas()) {
// arr[i] = p.getName();
TraceManager.addDev("Handling pragma: " + p.getName());
String t = "";
String[] split = p.getName().split(" ");
if (p.getName().startsWith("Confidentiality")) {
for (String str : split) {
if (str.contains(".")) {
String tmp = str.split("\\.")[0];
String tmp2 = str.split("\\.")[1];
t = t.concat(tmp.split("__")[tmp.split("__").length - 1] +
"." + tmp2.split("__")[tmp2.split("__").length - 1] + " ");
} else {
t = t.concat(str + " ");
}
}
} else if (p.getName().startsWith("Authenticity")) {
t = p.getName();
} else if (p.getName().startsWith("Initial")) {
t = p.getName();
} else {
t = p.getName();
}
//TraceManager.addDev("1. pragma=" + t);
t = t.trim();
if (t.startsWith("Confidentiality") || t.startsWith("Authenticity")) {
t = "#" + t;
}
//TraceManager.addDev("2. pragma=" + t);
s = s + "\n";
s = s.concat(t);
// i++;
}
pragma.setValue(s);
pragma.makeValue();
abd.addComponent(pragma, xpos, ypos, false, true);
}*/
//Add message and key datatype if there is a cryptoblock
......@@ -533,6 +488,9 @@ public class AvatarPanelDrawer {
if (p1 == null) {
TraceManager.addDev("NULL P1 in " + tranSourceMap.get(t).getName() + "/" + tranSourceMap.get(t).getValue());
p1 = tranSourceMap.get(t).findFirstFreeTGConnectingPoint(true, false);
if (p1 == null) {
TraceManager.addDev("\tstill NULL P1");
}
//p1=tranSourceMap.get(t).closerFreeTGConnectingPoint(x,y,true, true);
}
x = locMap.get(tranDestMap.get(t)).getX() + locMap.get(tranDestMap.get(t)).getWidth() / 2;
......@@ -552,6 +510,9 @@ public class AvatarPanelDrawer {
if (p2 == null) {
TraceManager.addDev("NULL P2 in " + locMap.get(tranDestMap.get(t)).getName() + "/" + locMap.get(tranDestMap.get(t)).getValue());
p2 = locMap.get(tranDestMap.get(t)).findFirstFreeTGConnectingPoint(false, true);
if (p2 == null) {
TraceManager.addDev("\tstill NULL P2");
}
}
}
} else {
......
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