Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2013-01-04 11:55:04 -0500
committerHenrik Rentz-Reichert2013-01-04 11:55:04 -0500
commit80d7b852fc2435512d919ae351d8ce908749a4b7 (patch)
tree74f05e8ec9f5253c53cb42de4c3c976f73c5af39 /plugins/org.eclipse.etrice.abstractexec.behavior
parent2a2f1de4a2135598b750375accb105362c88e747 (diff)
downloadorg.eclipse.etrice-80d7b852fc2435512d919ae351d8ce908749a4b7.tar.gz
org.eclipse.etrice-80d7b852fc2435512d919ae351d8ce908749a4b7.tar.xz
org.eclipse.etrice-80d7b852fc2435512d919ae351d8ce908749a4b7.zip
[core.room, abstractexec] extended IRoomValidator interface
by adding name and description Also equipped Registry with capability to return infos and maintain an exclusion list (will be made accessible by a preference page later.
Diffstat (limited to 'plugins/org.eclipse.etrice.abstractexec.behavior')
-rw-r--r--plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java10
-rw-r--r--plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java63
2 files changed, 44 insertions, 29 deletions
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java
index a2a871f19..f6af883b3 100644
--- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java
+++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/AbstractExecutionValidator.java
@@ -96,4 +96,14 @@ public class AbstractExecutionValidator implements IRoomValidator {
}
}
+ @Override
+ public String getName() {
+ return "Abstract FSM Execution Validator";
+ }
+
+ @Override
+ public String getDescription() {
+ return "This validator checks the state machine against the protocol semantics of its ports.";
+ }
+
}
diff --git a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java
index c4774b55c..7bacb6610 100644
--- a/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java
+++ b/plugins/org.eclipse.etrice.abstractexec.behavior/src/org/eclipse/etrice/abstractexec/behavior/ReachabilityValidator.java
@@ -39,38 +39,43 @@ public class ReachabilityValidator implements IRoomValidator {
ActorClass ac = (ActorClass) object;
- NullDiagnostician diagnostician = new NullDiagnostician();
- GeneratorModelBuilder builder = new GeneratorModelBuilder(new NullLogger(), diagnostician);
- ExpandedActorClass xpac = builder.createExpandedActorClass(ac);
-
- if (xpac != null && !diagnostician.isFailed()) {
- ReachabilityCheck checker = new ReachabilityCheck(xpac);
- checker.computeReachability();
- TreeIterator<EObject> it = xpac.getStateMachine().eAllContents();
- while (it.hasNext()) {
- EObject item = it.next();
- if (item instanceof StateGraphItem)
- {
-
- StateGraphItem toCheck = (StateGraphItem) item;
- //System.out.println("Checked : " + toCheck.getName());
- if (!checker.isReachable(toCheck)) {
- //System.out.println("Unreachable "+ toCheck.getName());
-
- EObject orig = xpac.getOrig(toCheck);
- EObject container = orig.eContainer();
- @SuppressWarnings("unchecked")
- int idx = ((List<? extends EObject>)container.eGet(orig.eContainingFeature())).indexOf(orig);
- messageAcceptor.acceptWarning(
- "Unreachable state/point of graph",
- xpac.getOrig(toCheck).eContainer(), xpac.getOrig(toCheck).eContainingFeature(), idx,
- DIAG_CODE_UNREACHABLE, toCheck.getName());
- }
+ NullDiagnostician diagnostician = new NullDiagnostician();
+ GeneratorModelBuilder builder = new GeneratorModelBuilder(new NullLogger(), diagnostician);
+ ExpandedActorClass xpac = builder.createExpandedActorClass(ac);
+
+ if (xpac != null && !diagnostician.isFailed()) {
+ ReachabilityCheck checker = new ReachabilityCheck(xpac);
+ checker.computeReachability();
+ TreeIterator<EObject> it = xpac.getStateMachine().eAllContents();
+ while (it.hasNext()) {
+ EObject item = it.next();
+ if (item instanceof StateGraphItem)
+ {
+
+ StateGraphItem toCheck = (StateGraphItem) item;
+ if (!checker.isReachable(toCheck)) {
+ EObject orig = xpac.getOrig(toCheck);
+ EObject container = orig.eContainer();
+ @SuppressWarnings("unchecked")
+ int idx = ((List<? extends EObject>)container.eGet(orig.eContainingFeature())).indexOf(orig);
+ messageAcceptor.acceptWarning(
+ "Unreachable state/point of graph",
+ xpac.getOrig(toCheck).eContainer(), xpac.getOrig(toCheck).eContainingFeature(), idx,
+ DIAG_CODE_UNREACHABLE, toCheck.getName());
}
}
-
}
-
+ }
+ }
+
+ @Override
+ public String getName() {
+ return "State Reachability Validator";
+ }
+
+ @Override
+ public String getDescription() {
+ return "This validator checks the reachability of state graph items.";
}
}

Back to the top