Skip to content
Snippets Groups Projects
Commit 457e3ed8 authored by Luca Cristoforetti's avatar Luca Cristoforetti
Browse files

Merge branch '252-add-new-constructors-to-statestatus-checker' into 'master'

Resolve "Add new constructors to StateStatus checker"

Closes #252

See merge request CPS_Design/CHESS!60
parents 6698959c e41cbeac
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ import org.polarsys.chess.contracts.profile.chesscontract.util.EntityUtil; ...@@ -30,7 +30,7 @@ import org.polarsys.chess.contracts.profile.chesscontract.util.EntityUtil;
*/ */
public class StateStatus extends Checker { public class StateStatus extends Checker {
private Package systemViewPackage; private Package systemViewPackage;
private static final Logger logger = Logger.getLogger(StateStatus.class); protected static final Logger logger = Logger.getLogger(StateStatus.class);
private final EntityUtil entityUtil = EntityUtil.getInstance(); private final EntityUtil entityUtil = EntityUtil.getInstance();
private static final String checkerName = "StateStatus"; private static final String checkerName = "StateStatus";
...@@ -49,6 +49,23 @@ public class StateStatus extends Checker { ...@@ -49,6 +49,23 @@ public class StateStatus extends Checker {
super(checkerName, getTags(), priority); super(checkerName, getTags(), priority);
} }
/**
* Constructor with explicit tags.
* @param tags the tags identifying this checker
*/
public StateStatus(Set<String> tags) {
super(checkerName, tags);
}
/**
* Constructor with explicit tags and priority.
* @param tags the tags identifying this checker
* @param priority the priority
*/
public StateStatus(Set<String> tags, int priority) {
super(checkerName, tags, priority);
}
private static Set<String> getTags() { private static Set<String> getTags() {
Set<String> tags = new HashSet<String>(); Set<String> tags = new HashSet<String>();
tags.add("fast"); tags.add("fast");
...@@ -94,7 +111,7 @@ public class StateStatus extends Checker { ...@@ -94,7 +111,7 @@ public class StateStatus extends Checker {
* @param block * @param block
* @return list of errors * @return list of errors
*/ */
private List<CheckerMessage> checkForDeadStates(Class block) { protected List<CheckerMessage> checkForDeadStates(Class block) {
List<CheckerMessage> errors = new ArrayList<CheckerMessage>(); List<CheckerMessage> errors = new ArrayList<CheckerMessage>();
final Set<StateMachine> stateMachines = entityUtil.getNominalStateMachines(block); final Set<StateMachine> stateMachines = entityUtil.getNominalStateMachines(block);
......
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