Commit 3dbd68da authored by rosemaryng's avatar rosemaryng
Browse files

Merged src/main/java/jmt/gui/jsimgraph/panels/ and...

Merged  src/main/java/jmt/gui/jsimgraph/panels/ and src/main/java/jmt/gui/jsimwiz/panels/JSimProblemsWindow
parent 8c09cfda
......@@ -405,6 +405,24 @@ public class JModelProblemsWindow extends JDialog {
description, stationKey, null));
}
}
if (mc.isThereClosedClassRoutingError()) {
HashMap<Object, Vector<Object>> temp = mc.getClosedClassesWithRoutingError();
Vector<Object> classKeys = mc.getClassModel().getClassKeys();
for (int i = 0; i < classKeys.size(); i++) {
Object classKey = classKeys.get(i);
String className = mc.getClassModel().getClassName(classKey);
Vector<Object> stationKeys = temp.get(classKey);
if (stationKeys != null) {
for (int j = 0; j < stationKeys.size(); j++) {
Object stationKey = stationKeys.get(j);
String stationName = mc.getStationModel().getStationName(stationKey);
problems.addElement(new ProblemElement(ModelChecker.ERROR_PROBLEM, ModelChecker.CLOSED_CLASS_ROUTING_ERROR,
"<html><div style=\"width:" + DESCRIPTION_HTML_WIDTH + "px;\">" + className + " routed to "
+ stationName + " linked only to sinks.</div></html>", stationKey, classKey));
}
}
}
}
if (mc.isThereInvalidMeasureError()) {
problems.addElement(new ProblemElement(ModelChecker.ERROR_PROBLEM, ModelChecker.INVALID_MEASURE_ERROR,
"<html><div style=\"width:" + DESCRIPTION_HTML_WIDTH + "px;\">Undefined station for performance index.</div></html>", null, null));
......@@ -521,6 +539,20 @@ public class JModelProblemsWindow extends JDialog {
+ " has an infinite enabling degree for a mode.</div></html>", stationKey, null));
}
}
//TODO rose: Check whether still works
if (mc.isThereImpatienceInStationBetweenForkJoinError()) {
Vector<Object> stationsWithError = mc.getStationsWithImpatienceAndConnectedToFork();
for (int i = 0; i < stationsWithError.size(); i++) {
Object stationKey = stationsWithError.get(i);
String stationName = mc.getStationModel().getStationName(stationKey);
problems.addElement(new ProblemElement(ModelChecker.ERROR_PROBLEM,
ModelChecker.IMPATIENCE_ENABLED_IN_STATION_BETWEEN_FORK_JOIN_ERROR,
"<html><div style=\"width:" + DESCRIPTION_HTML_WIDTH
+ "px;\">Impatience cannot be selected for stations connected to a fork. "
+ stationName + " must have its impatience selected as None.</div></html>",
stationKey, null));
}
}
if (mc.isThereNoOptionalLinkWarning()) {
Vector<Object> temp = mc.getStationsWithoutOptionalLink();
for (int i = 0; i < temp.size(); i++) {
......
......@@ -482,6 +482,19 @@ public class JSimProblemsWindow extends JFrame {
+ " has an infinite enabling degree for a mode.</div></html>", stationKey, null));
}
}
if (mc.isThereImpatienceInStationBetweenForkJoinError()) {
Vector<Object> stationsWithError = mc.getStationsWithImpatienceAndConnectedToFork();
for (int i = 0; i < stationsWithError.size(); i++) {
Object stationKey = stationsWithError.get(i);
String stationName = mc.getStationModel().getStationName(stationKey);
problems.addElement(new ProblemElement(ModelChecker.ERROR_PROBLEM,
ModelChecker.IMPATIENCE_ENABLED_IN_STATION_BETWEEN_FORK_JOIN_ERROR,
"<html><div style=\"width:" + DESCRIPTION_HTML_WIDTH
+ "px;\">Impatience cannot be selected for stations connected to a fork. "
+ stationName + " must have its impatience selected as None.</div></html>",
stationKey, null));
}
}
if (mc.isThereNoOptionalLinkWarning()) {
Vector<Object> temp = mc.getStationsWithoutOptionalLink();
for (int i = 0; i < temp.size(); i++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment